| 1 |
%============================================================================== |
| 2 |
%============================================================================== |
| 3 |
\documentclass[12pt]{report} |
| 4 |
\usepackage{epsfig} |
| 5 |
\usepackage{hyperref} |
| 6 |
\usepackage{graphicx} |
| 7 |
\usepackage{include/harvard} |
| 8 |
\usepackage{alltt} |
| 9 |
\usepackage{longtable} |
| 10 |
\usepackage{moreverb} |
| 11 |
\usepackage{amsmath,amssymb} |
| 12 |
\usepackage{url} |
| 13 |
\usepackage{subfigure} |
| 14 |
\usepackage{xspace} |
| 15 |
\pagestyle{plain} |
| 16 |
\topmargin=0pt |
| 17 |
\textwidth=6.75in |
| 18 |
\textheight=9in |
| 19 |
\evensidemargin=-15pt |
| 20 |
\oddsidemargin=-15pt |
| 21 |
%============================================================================== |
| 22 |
\input{macros} |
| 23 |
%============================================================================== |
| 24 |
\def\norm#1{\parallel#1\parallel} |
| 25 |
\def\abs#1{\mid#1\mid} |
| 26 |
\def\eps{\epsilon} |
| 27 |
\def\R{{\rm R}} |
| 28 |
\def\Rn{{\rm R}^n} |
| 29 |
%============================================================================== |
| 30 |
%============================================================================== |
| 31 |
\begin{document} |
| 32 |
\bibliographystyle{include/agsm} |
| 33 |
% |
| 34 |
\title{ |
| 35 |
\LARGE {\cal AUTO}-07P :\\ |
| 36 |
\Large CONTINUATION AND BIFURCATION SOFTWARE \\ |
| 37 |
\Large FOR ORDINARY DIFFERENTIAL EQUATIONS\\ |
| 38 |
\author{ |
| 39 |
\Large Eusebius J. Doedel and Bart E. Oldeman\\ |
| 40 |
\Large Concordia University and McGill HPC Centre\\ |
| 41 |
\Large Montreal, Canada\\ |
| 42 |
\\ |
| 43 |
with major contributions by\\ |
| 44 |
\\ |
| 45 |
Alan R. Champneys (Bristol), |
| 46 |
Fabio Dercole (Milano), |
| 47 |
Thomas Fairgrieve (Toronto), |
| 48 |
\\ |
| 49 |
Yuri Kuznetsov (Utrecht), |
| 50 |
Randy Paffenroth (Pasadena), |
| 51 |
\\ |
| 52 |
Bj\"orn Sandstede (Brown), |
| 53 |
Xianjun Wang, |
| 54 |
and |
| 55 |
Chenghai Zhang.\\ |
| 56 |
}} |
| 57 |
\date{November 2019} |
| 58 |
\pagenumbering{alph} |
| 59 |
\maketitle |
| 60 |
\pagenumbering{arabic} |
| 61 |
\setcounter{page}{1} |
| 62 |
\tableofcontents |
| 63 |
% |
| 64 |
% |
| 65 |
\newpage |
| 66 |
~ |
| 67 |
\vskip.50truein |
| 68 |
\subsection*{Preface} |
| 69 |
This is a guide to the software package {\cal AUTO} |
| 70 |
for continuation and bifurcation problems in ordinary differential |
| 71 |
equations. |
| 72 |
Earlier versions of {\cal AUTO} were described in |
| 73 |
\citename{Do:81} \citeyear{Do:81}, |
| 74 |
\citename{DoKe:86} \citeyear{DoKe:86}, |
| 75 |
\citename{DoWa:95a} \citeyear{DoWa:95a}, |
| 76 |
\citename{WaDo:95b} \citeyear{WaDo:95b}, |
| 77 |
\citename{AUTO:97} \citeyear{AUTO:97}, |
| 78 |
\citename{AUTO:2000} \citeyear{AUTO:2000}. |
| 79 |
For a description of the basic algorithms see |
| 80 |
\citename{DoKeKe:91a} \citeyear{DoKeKe:91a}, |
| 81 |
\citename{DoKeKe:91b} \citeyear{DoKeKe:91b}. |
| 82 |
{\cal AUTO} incorporates the {\cal HomCont} algorithms of |
| 83 |
\citename{ChKu:94} \citeyear{ChKu:94}, |
| 84 |
\citename{ChKuSa:95} \citeyear{ChKuSa:95} |
| 85 |
for the bifurcation analysis of homoclinic orbits, and |
| 86 |
the BPcont algorithms of \citename{DercoleSMSC:08} |
| 87 |
\citeyear{DercoleSMSC:08} for the continuation of |
| 88 |
branch points in both symmetric and non-symmetric problems. |
| 89 |
The Floquet multiplier algorithms were written by |
| 90 |
\citename{Fa:94} \citeyear{Fa:94}, |
| 91 |
\citename{FaJe:91} \citeyear{FaJe:91}. |
| 92 |
A GUI was written by |
| 93 |
\citename{XJW:94} \citeyear{XJW:94}. |
| 94 |
The Python CLUI is the work of Randy Paffenroth. |
| 95 |
|
| 96 |
\vskip1.00truein |
| 97 |
\subsection*{Acknowledgments} |
| 98 |
The first author is much indebted to H.~B.~Keller |
| 99 |
of the California Institute of Technology for his inspiration, |
| 100 |
encouragement and support. |
| 101 |
He is also thankful to {\cal AUTO} users and research collaborators who have |
| 102 |
directly or indirectly contributed to its development, |
| 103 |
in particular, |
| 104 |
Jean Pierre Kern\'evez, UTC, Compi\`egne, France; |
| 105 |
Don Aronson, University of Minnesota, Minneapolis; |
| 106 |
Hans Othmer, University of Utah; and |
| 107 |
Frank Schilder, University of Surrey. |
| 108 |
Some material in this document related to the computation of connecting orbits |
| 109 |
was developed with Mark Friedman, University of Alabama, Huntsville. |
| 110 |
Also acknowledged is the work of Nguyen Thanh Long, |
| 111 |
Concordia University, Montreal, on the graphics program {\cal PLAUT}. |
| 112 |
Special thanks are due to Sheila Shull, California Institute of Technology, |
| 113 |
for her cheerful assistance in the distribution of {\cal AUTO} over a long period |
| 114 |
of time. |
| 115 |
Over the years, the development of {\cal AUTO} has been supported by |
| 116 |
various agencies through the California Institute of Technology, and |
| 117 |
by research grants from NSERC (Canada). |
| 118 |
|
| 119 |
The development of {\cal HomCont} has benefitted from help and advice from, |
| 120 |
among others, |
| 121 |
W.-J. Beyn, Universit\"{a}t Bielefeld, |
| 122 |
M.~J. Friedman, University of Alabama, |
| 123 |
A. Rucklidge, University of Cambridge, |
| 124 |
M. Koper, University of Utrecht, |
| 125 |
C.~J. Budd, University of Bath, and |
| 126 |
Financial support for this collaboration was also received from the U.K. |
| 127 |
Engineering and Physical Science Research Council and the Nuffield Foundation. |
| 128 |
|
| 129 |
\newpage |
| 130 |
~ |
| 131 |
\subsection*{License} |
| 132 |
{\cal AUTO} is available under the terms of the BSD license:\\ |
| 133 |
\begin{footnotesize} |
| 134 |
~\\ |
| 135 |
Copyright \copyright~1979--2007, E.~J.~Doedel, California Institute of |
| 136 |
Technology, and Concordia University. All rights reserved.\\ |
| 137 |
~\\ |
| 138 |
Redistribution and use in source and binary forms, with or without |
| 139 |
modification, are permitted provided that the following conditions are |
| 140 |
met: |
| 141 |
\begin{itemize} |
| 142 |
\item Redistributions of source code must retain the above copyright |
| 143 |
notice, this list of conditions and the following disclaimer. |
| 144 |
|
| 145 |
\item Redistributions in binary form must reproduce the above copyright |
| 146 |
notice, this list of conditions and the following disclaimer listed |
| 147 |
in this license in the documentation and/or other materials |
| 148 |
provided with the distribution. |
| 149 |
|
| 150 |
\item Neither the name of the copyright holders nor the names of its |
| 151 |
contributors may be used to endorse or promote products derived from |
| 152 |
this software without specific prior written permission. |
| 153 |
\end{itemize} |
| 154 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 155 |
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 156 |
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 157 |
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 158 |
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 159 |
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 160 |
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 161 |
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 162 |
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 163 |
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 164 |
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 165 |
\end{footnotesize} |
| 166 |
|
| 167 |
Note that the three-dimensional plotting tool {\cal PLAUT04} optionally |
| 168 |
depends on libraries that are covered by the GNU General Public |
| 169 |
License (GPL), in particular, Coin, SoQt and Qt. In that case the |
| 170 |
{\cal PLAUT04} binaries are also covered by the GPL. |
| 171 |
|
| 172 |
%============================================================================== |
| 173 |
%============================================================================== |
| 174 |
\chapter{Installing {\cal AUTO}.} \label{ch:Installing_AUTO} |
| 175 |
%============================================================================== |
| 176 |
%============================================================================== |
| 177 |
\section{ Installation.} \label{sec:Installation} |
| 178 |
%The {\cal AUTO} files {\filef auto.ps.gz, auto.tar.gz} and {\filef README} |
| 179 |
%are available via FTP from |
| 180 |
%directory {\filef pub/doedel/auto} at \url{ftp.cs.concordia.ca}. |
| 181 |
The {\cal AUTO} file \filef{auto07p-0.9.2.tar.gz} is |
| 182 |
available via \url{http://cmvl.cs.concordia.ca/auto}. |
| 183 |
%The {\filef README} file contains the instructions for printing this manual. |
| 184 |
Here it is assumed that you are using the Unix (e.g. \emph{bash}) shell |
| 185 |
and that the file \filef{auto07p-0.9.2.tar.gz} is in your main |
| 186 |
directory. See below for OS-specific notes. |
| 187 |
|
| 188 |
While in your main directory, enter the commands |
| 189 |
\commandf{gunzip auto07p-0.9.2.tar.gz}, |
| 190 |
followed by \commandf{tar xvfo auto07p-0.9.2.tar}. |
| 191 |
This will result in a directory \filef{auto}, |
| 192 |
with one subdirectory, \filef{auto/07p}. |
| 193 |
Type \commandf{cd auto/07p} |
| 194 |
to change directory to \filef{auto/07p}. |
| 195 |
Then type |
| 196 |
\commandf{./configure}~, |
| 197 |
to check your system for required compilers and libraries. |
| 198 |
Once the \filef{configure} script has finished you |
| 199 |
may then type \commandf{make} to compile \AUTO |
| 200 |
and its ancillary software. |
| 201 |
The \filef{configure} script is designed to detect the details |
| 202 |
of your system which \AUTO requires to compile successfully. |
| 203 |
If either the \filef{configure} script or the \filef{make} command |
| 204 |
should fail, you may assist the \filef{configure} script by giving |
| 205 |
it various command line options. Please type \commandf{./configure --help} |
| 206 |
for more details. |
| 207 |
Upon compilation, you may type |
| 208 |
\commandf{make clean} |
| 209 |
to remove unnecessary files. |
| 210 |
|
| 211 |
To run \AUTO you need to set your environment variables correctly. |
| 212 |
Assuming \AUTO is installed in your home directory, the following |
| 213 |
commands set your environment variables so that you will be able to |
| 214 |
run the \AUTO commands, and may be placed into your \filef{.login}, |
| 215 |
\filef{.profile}, or \filef{.cshrc} file, as appropriate. If you are |
| 216 |
using a \commandf{sh} compatible shell, such as \commandf{sh}, |
| 217 |
\commandf{bash}, \commandf{ksh}, or \commandf{ash} enter the command |
| 218 |
\commandf{source~ {\rm \$}HOME/auto/07p/cmds/auto.env.sh}. On the |
| 219 |
other hand, if you are using a \commandf{csh} compatible shell, such |
| 220 |
as \commandf{csh} or \commandf{tcsh}, enter the command \commandf{ |
| 221 |
source~ {\rm \$}HOME/auto/07p/cmds/auto.env}. |
| 222 |
|
| 223 |
The Graphical User Interface (GUI94) requires the {\cal X-Window} system |
| 224 |
and {\cal Motif}. |
| 225 |
Note that the GUI is not strictly necessary, since {\cal AUTO} can be |
| 226 |
run very effectively using the Unix Command Language User Interface (CLUI). |
| 227 |
Moreover, long or complicated sequences of {\cal AUTO} calculations can |
| 228 |
be programmed using the alternative Python CLUI. |
| 229 |
The GUI is not compiled by default. To compile |
| 230 |
\AUTO with the GUI, type \commandf{./configure --enable-gui} |
| 231 |
and then \commandf{make} in the directory \filef{auto/07p}. |
| 232 |
|
| 233 |
To use the Python CLUI and the ``@pp'' {\cal PyPLAUT} plotter it |
| 234 |
is strongly recommended to install NumPy |
| 235 |
(\url{https://numpy.org}), TkInter, and |
| 236 |
Matplotlib (\url{https://matplotlib.org/}). |
| 237 |
Python itself needs to be at least version 2.3 or higher, but 2.7 or |
| 238 |
higher is strongly recommended. |
| 239 |
For enhanced interactive use of the Python CLUI it is also worth |
| 240 |
installing IPython (\url{https://ipython.org}). |
| 241 |
|
| 242 |
The graphic tool for 3D \AUTO data visualization, {\cal PLAUT04}, is |
| 243 |
compiled by default, but depends on a few libraries that may not be |
| 244 |
in a standard installation of a typical Unix-like |
| 245 |
system. These libraries may be available as optional packages, |
| 246 |
though. In order of preference these are: |
| 247 |
\begin{enumerate} |
| 248 |
\item |
| 249 |
Coin3D (version 3.1.3 or higher) and SoQt (1.5.0 or higher) |
| 250 |
(recommended). |
| 251 |
\item |
| 252 |
Coin3D with the SoXt library, which interfaces with Motif |
| 253 |
instead of Qt. |
| 254 |
\end{enumerate} |
| 255 |
|
| 256 |
The \filef{configure} script checks |
| 257 |
for these libraries and outputs a warning if any of these libraries |
| 258 |
cannot be found. It first checks for SoQt, and then for SoXt, unless |
| 259 |
you pass \texttt{\hyphenchar\font45\relax --disable-plaut04-qt} |
| 260 |
as an option to \filef{configure}. |
| 261 |
If the libraries are not available you can still compile |
| 262 |
all other components of \AUTO using \filef{make}. |
| 263 |
|
| 264 |
The Fortran code uses several routines that were not standardardized |
| 265 |
prior to the Fortran 2003 standard, for timing, flushing output, and |
| 266 |
accessing command-line arguments. The \filef{configure} script first looks if |
| 267 |
the F2003 routines are supported (\filef{src/f2003.f90}), then checks |
| 268 |
for a set of routines that are widely implemented across Unix |
| 269 |
compilers (\filef{src/unix.f90}), and if that fails too, uses a set of |
| 270 |
dummy replacement routines (\filef{src/compat.f90}), which could be |
| 271 |
edited for some obscure installations. |
| 272 |
|
| 273 |
The PostScript conversion command \commandf{@ps} is compiled by |
| 274 |
default. Alternatively you can type \commandf{make} in the directory |
| 275 |
\filef{auto/07p/tek2ps}. |
| 276 |
To generate the on-line manual, type \commandf{make} in |
| 277 |
\filef{auto/07p/doc}, which depends on the presence of xfig's |
| 278 |
(transfig) fig2dev utility. |
| 279 |
|
| 280 |
To prepare {\cal AUTO} for transfer to another machine, |
| 281 |
type \commandf{make superclean} |
| 282 |
in the directory \filef{auto/07p} before creating the \filef{tar}-file. |
| 283 |
This will remove all executable, object, and other non-essential files, and |
| 284 |
thereby reduce the size of the package. |
| 285 |
|
| 286 |
Some {\cal LAPACK} routines used by {\cal AUTO} for computing eigenvalues and |
| 287 |
Floquet multipliers are included in the package |
| 288 |
(\citename{LAPACK:99} \citeyear{LAPACK:99}). |
| 289 |
The Python CLUI includes a slightly modified version of the Pointset |
| 290 |
and Point classes from PyDSTool by R.~Clewley, M.D.~LaMar, and E.~Sherwood |
| 291 |
(\url{https://github.com/robclewley/pydstool}) |
| 292 |
|
| 293 |
\subsection{Installation on Linux/Unix} |
| 294 |
A free Fortran 95 compiler, Gfortran, is shipped with most recent |
| 295 |
Linux distributions, or can be obtained at |
| 296 |
\url{http://gcc.gnu.org/wiki/Gfortran}. |
| 297 |
The following packages (and their dependencies) are recommended for |
| 298 |
Fedora and Red Hat and its derivatives: |
| 299 |
\begin{itemize} |
| 300 |
\item Python: \filef{python-matplotlib-tk} and \filef{ipython}. |
| 301 |
\item {\cal PLAUT04}: \filef{SoQt-devel} and \filef{qt-config}. |
| 302 |
\item {\cal PLAUT}: \filef{xterm}. |
| 303 |
\item GUI94: \filef{motif-devel}. |
| 304 |
\item manual: \LaTeX (\filef{texlive-*.noarch}) and \filef{transfig}. |
| 305 |
\end{itemize} |
| 306 |
and the following for Ubuntu and Debian: |
| 307 |
\begin{itemize} |
| 308 |
\item Python: \filef{python-matplotlib} and \filef{ipython}. |
| 309 |
\item {\cal PLAUT04}: SoQt (\filef{libsoqt4-dev}). |
| 310 |
\item {\cal PLAUT}: \filef{xterm}. |
| 311 |
\item GUI94: \filef{libmotif-dev}. |
| 312 |
\item manual: \LaTeX (\filef{texlive}, \filef{texlive-latex-extra}, and \filef{transfig}. |
| 313 |
\end{itemize} |
| 314 |
Other distributions may have packages with similar names. |
| 315 |
|
| 316 |
If you need to compile and install one of the above {\cal PLAUT04} libraries |
| 317 |
from the source code available at the above web site, and you |
| 318 |
find that, after that, {\cal PLAUT04} still does not work then you might need to |
| 319 |
adjust the environment variable {\tt LD\_LIBRARY\_PATH} to include |
| 320 |
the location of these libraries, for instance {\tt /usr/local/lib}. |
| 321 |
|
| 322 |
\subsection{Installation on Mac OS} |
| 323 |
\AUTO runs on Mac OS using the above instructions provided that |
| 324 |
you have the development tools installed (via \commandf{xcode-select |
| 325 |
--install}) or by installing XCode from the App Store. |
| 326 |
You do not need to start an X server to run AUTO. |
| 327 |
Furthermore, the following packages are recommended: |
| 328 |
\begin{itemize} |
| 329 |
\item Gfortran: See \url{http://gcc.gnu.org/wiki/GFortranBinaries}. |
| 330 |
Alternatively you can use Homebrew, see \url{https://brew.sh/}. |
| 331 |
\item Python: |
| 332 |
The default system Python in Mac OS is usable. |
| 333 |
There are other alternatives, for instance Anaconda |
| 334 |
at \url{https://www.anaconda.com/distribution/} and Miniconda |
| 335 |
at \url{https://docs.conda.io/en/latest/miniconda.html}. |
| 336 |
To be able to plot in the Python CLUI in some versions of Mac OS, |
| 337 |
\AUTO uses \filef{pythonw} instead of \filef{python}. |
| 338 |
This should happen automatically. |
| 339 |
\item {\cal PLAUT04}: PLAUT04 is more involved, as it depends on Qt version 4 |
| 340 |
which is no longer supported. You can still install it using Homebrew via |
| 341 |
\url{https://github.com/cartr/homebrew-qt4/blob/master/README.md}. |
| 342 |
You will then need to compile Coin and SoQt from source using the |
| 343 |
zipfiles available at |
| 344 |
\url{https://bitbucket.org/Coin3D/coin/downloads/} and |
| 345 |
\url{https://bitbucket.org/Coin3D/soqt/downloads/}. |
| 346 |
For SoQt to compile properly, you may need to patch its configure script |
| 347 |
and then compile as follows: |
| 348 |
\begin{verbatim} |
| 349 |
sed -i -e 's/^\(LIBS=\$sim_ac_uniqued_list\)$/# \1/' configure |
| 350 |
sh configure |
| 351 |
make |
| 352 |
sudo make install |
| 353 |
\end{verbatim} |
| 354 |
\item GUI94: This is possible with Homebrew via \commandf{brew install openmotif}. |
| 355 |
\item manual: \LaTeX\xspace and transfig (comes with xfig). |
| 356 |
\end{itemize} |
| 357 |
|
| 358 |
\subsection{Installation on Windows} |
| 359 |
A native, light-weight solution for running AUTO on Windows is |
| 360 |
to use MSYS2 (see \url{https://www.msys2.org}). |
| 361 |
To install this setup: |
| 362 |
\begin{itemize} |
| 363 |
\item |
| 364 |
Install MSYS2 (make sure to include msys-base, gcc and fortran) |
| 365 |
using the Graphical Installer at \url{https://www.msys2.org}. |
| 366 |
\item |
| 367 |
Start MSYS2 using the Start menu (using one of the MinGW entries, usually |
| 368 |
the 64-bit one). |
| 369 |
\item |
| 370 |
Install at least the following packages using \commandf{pacman -S}: |
| 371 |
\filef{gcc-fortran}, \filef{mingw-w64-x86\_64-python3-matplotlib}, |
| 372 |
and \filef{make}. |
| 373 |
\item |
| 374 |
Then you can unpack |
| 375 |
\AUTO using \filef{gunzip} and \filef{tar}, as described above. |
| 376 |
\item |
| 377 |
Now you should be able to run configure and make to compile \AUTO |
| 378 |
as shown above. |
| 379 |
\end{itemize} |
| 380 |
|
| 381 |
You can then use \AUTO using shell commands from the default MSYS shell |
| 382 |
environment. |
| 383 |
|
| 384 |
Alternatively, \AUTO runs on Windows as above using the Unix-like |
| 385 |
environment Cygwin (see \url{https://www.cygwin.com}), but the |
| 386 |
non-Cygwin setup is more responsive and is much easier to setup for |
| 387 |
Matplotlib. You can however use its X server and motif to compile |
| 388 |
and run the old {\cal PLAUT} and GUI94, if you so desire. |
| 389 |
|
| 390 |
With some effort it is possible to compile {\cal PLAUT04} |
| 391 |
on Windows (without an X server) using Coin, SoQt, and Qt. You can |
| 392 |
also find precompiled {\cal PLAUT04} binaries at |
| 393 |
\url{https://github.com/auto-07p/auto-07p/releases}. |
| 394 |
|
| 395 |
\section{ Restrictions on Problem Size.} \label{sec:Restrictions} |
| 396 |
There are no size restrictions in the file \filef{ |
| 397 |
auto/07p/include/auto.h} any more. This file now contains the |
| 398 |
default effective number of equation parameters {\tt NPAR}, set to 36 |
| 399 |
upon installation. It can be overridden in constant files. |
| 400 |
See also Section~\ref{sec:Restrictions_on_PAR}. |
| 401 |
The default can be changed by editing {\tt auto.h}. |
| 402 |
This must be followed by recompilation by typing \commandf{make} |
| 403 |
in the directory {\tt auto/07p/src}. |
| 404 |
|
| 405 |
Note that in certain cases the {\it effective dimension} may be greater |
| 406 |
than the user dimension. |
| 407 |
For example, for the continuation of folds, |
| 408 |
the effective dimension is 2{\tt NDIM}+1 for algebraic equations, |
| 409 |
and 2{\tt NDIM} for ordinary differential equations, respectively. |
| 410 |
Similarly, for the continuation of Hopf bifurcations, |
| 411 |
the effective dimension is 3{\tt NDIM}+2. |
| 412 |
|
| 413 |
|
| 414 |
\section{ Compatibility with Earlier Versions.} \label{sec:Compatibility} |
| 415 |
Unlike earlier versions, \AUTO can no longer be compiled using a pure |
| 416 |
Fortran 77 compiler, but you need at least a Fortran 90 compiler. |
| 417 |
A free Fortran 95 compiler, GFortran, is shipped with most recent |
| 418 |
Linux distributions, or can be obtained at |
| 419 |
\url{http://gcc.gnu.org/wiki/GFortran}, which contains binaries for |
| 420 |
Linux, Mac OS X and Windows. \AUTO was also tested with the free |
| 421 |
compiler {\tt g95}, and there exist various commercial Fortran |
| 422 |
9x compilers as well. |
| 423 |
|
| 424 |
The {\cal AUTO} input files are now called |
| 425 |
{\tt c.xxx} (the constants file), |
| 426 |
and |
| 427 |
{\tt h.xxx} (the {\cal HomCont} constants file, only used with {\cal HomCont}); |
| 428 |
the output files are called |
| 429 |
{\tt b.xxx} (the bifurcation-diagram-file), |
| 430 |
{\tt s.xxx} (the solution-file), |
| 431 |
and |
| 432 |
{\tt d.xxx} (the diagnostics-file). |
| 433 |
The command \commandf{@rn} can be used to rename all these files from |
| 434 |
their old names. |
| 435 |
There are also minor changes in the formatting of these files |
| 436 |
compared to recent versions of {\cal AUTO}, such as {\cal AUTO97} |
| 437 |
and {\cal AUTO2000}. |
| 438 |
The main change compared to {\cal AUTO97} is that there is now a |
| 439 |
programmable Python CLUI. The constants file can be written using |
| 440 |
a completely new, more flexible syntax, but the old syntax is |
| 441 |
still accepted, and files can be converted using the command |
| 442 |
\commandf{@cnvc} (see Section~\ref{sec:command_mode}). |
| 443 |
|
| 444 |
Due to the replacement of EISPACK routines by LAPACK routines for the |
| 445 |
computation of eigenvalues and eigenvectors, the sign of the |
| 446 |
eigenvectors may have flipped sometimes with respect to earlier |
| 447 |
versions. This affects the sign of some {\cal HomCont} |
| 448 |
test functions and the initial direction when using the homotopy |
| 449 |
method (you may have to flip the sign of the starting distance |
| 450 |
in the routine STPNT). Eigenvectors are now normalized to avoid |
| 451 |
future problems and improve consistency. |
| 452 |
|
| 453 |
Parameter derivatives in {\tt DFDP} are now significant when using {\cal |
| 454 |
HomCont}. If only the derivatives with respect to phase space variables |
| 455 |
are specified in {\tt DFDU}, please use the setting \parf{JAC=-1}. |
| 456 |
|
| 457 |
When upgrading from {\cal AUTO2000}, you can continue to use |
| 458 |
equations-files written in C. However, there is now a strict |
| 459 |
difference between indexing of the array {\tt par[]} in the |
| 460 |
C file and the references to it using {\tt PAR()} in constants |
| 461 |
files and output, using {\tt par[i]=PAR(I+1)}. In practise this |
| 462 |
means that you do not have to change the C file, but need to |
| 463 |
add 1 to all parameter indices in the constant files, namely |
| 464 |
{\tt ICP}, {\tt THL}, and {\tt UZR}. For example, |
| 465 |
the period is referenced by {\tt par[10]} in the C file, |
| 466 |
but by {\tt PAR(11)} in the constants file. Equation files |
| 467 |
written in C are used in the homoclinic branch switching |
| 468 |
demo in Chapter~\ref{ch:HomCont_hbs}. |
| 469 |
|
| 470 |
A detailed list of user-visible changes can be found in the file |
| 471 |
\filef{\$AUTO\_DIR/CHANGELOG}. |
| 472 |
|
| 473 |
\section{ Parallel Version.} \label{sec:Parallel} |
| 474 |
\AUTO contains code which allows |
| 475 |
it to run in on parallel computers. Namely, |
| 476 |
it can use either OpenMP to run most of its code in parallel |
| 477 |
on shared-memory multi-processors, or the MPI message passing |
| 478 |
library. |
| 479 |
When the \filef{configure} script is run it will try to |
| 480 |
detect if the Fortran compiler supports OpenMP; examples |
| 481 |
are Gfortran 4.2 or later and the Intel Fortran Compiler. |
| 482 |
If it is successful the necessary compiler flags are used |
| 483 |
to enable OpenMP in \AUTO. |
| 484 |
To force the \filef{configure} script not to use OpenMP, |
| 485 |
one may type \commandf{./configure --without-openmp}, |
| 486 |
and then type \commandf{make}. |
| 487 |
On the other hand, unless there is some |
| 488 |
particular difficulty, we recommend that that the |
| 489 |
\filef{configure} script be used without arguments, since the |
| 490 |
parallel version of \AUTO may easily be controlled, |
| 491 |
and even run in a serial mode, |
| 492 |
through the use of the environment variable {\tt OMP\_NUM\_THREADS}. |
| 493 |
|
| 494 |
For example, to run the \AUTO executable \filef{auto.exe} |
| 495 |
in serial mode you just type \commandf{export OMP\_NUM\_THREADS=1}. |
| 496 |
To run the same command in parallel on 4 processors you type |
| 497 |
\commandf{export OMP\_NUM\_THREADS=4}. Without any {\tt OMP\_NUM\_THREADS} |
| 498 |
set the number of processors that \AUTO will use can be equal to the |
| 499 |
actual number of processors on the system, or can be equal to one; |
| 500 |
this is system-dependent. |
| 501 |
|
| 502 |
The MPI message passing library is not used by default. You can enable it |
| 503 |
by typing \commandf{./configure --with-mpi}. If OpenMP and MPI are |
| 504 |
both used then \AUTO uses mixed (hybrid) mode, with MPI parallelisation |
| 505 |
occurring at the top level. |
| 506 |
|
| 507 |
Running the MPI version is somewhat more complex because of the fact |
| 508 |
that MPI normally uses some external program for starting the |
| 509 |
computational processes. The exact name and command line options of |
| 510 |
this external program depends on your MPI installation. A common name |
| 511 |
for this MPI external program is \filef{mpirun}, and a common command |
| 512 |
line option which defines the number of computational processes is \filef{ |
| 513 |
-np}. Accordingly, if you wanted to run the MPI version of \AUTO |
| 514 |
on four processors, with the above external program, you would |
| 515 |
type \filef{mpirun -np 4 file.exe}. Please see your local MPI |
| 516 |
documentation for more detail. |
| 517 |
|
| 518 |
Both the Python CLUI and the commands in the \filef{ auto/07p/cmds} |
| 519 |
directory described in Chapter~\ref{sec:command_mode} may be used with the |
| 520 |
MPI version as well, by setting the \commandf{ AUTO\_COMMAND\_PREFIX} |
| 521 |
environment variable. For example, to run \AUTO in parallel using |
| 522 |
the MPI library on 4 processors just type |
| 523 |
\commandf{export AUTO\_COMMAND\_PREFIX='mpirun -np 4'} |
| 524 |
before you run the Python CLUI \commandf{auto} or |
| 525 |
the commands in \filef{ auto/07p/cmds} normally. |
| 526 |
The previous example |
| 527 |
assumed you are using the \commandf{sh} shell or the \commandf{bash} shell; for |
| 528 |
other shells you should modify the commands appropriately, |
| 529 |
for example \commandf{setenv AUTO\_COMMAND\_PREFIX 'mpirun -np 4'} |
| 530 |
for the \commandf{csh} and \commandf{tcsh} shells. Alternatively, |
| 531 |
inside the Python |
| 532 |
CLUI and scripts you can use \commandf{import os} followed by |
| 533 |
\commandf{os.environ["AUTO\_COMMAND\_PREFIX"]="mpirun -np 4"}. |
| 534 |
|
| 535 |
%============================================================================== |
| 536 |
%============================================================================== |
| 537 |
\chapter{ Overview of Capabilities.} \label{ch:Overview} |
| 538 |
%============================================================================== |
| 539 |
%============================================================================== |
| 540 |
\section{ Summary.} \label{sec:Summary} |
| 541 |
{\cal AUTO} can do a limited bifurcation analysis of algebraic systems |
| 542 |
\begin{equation} \label{1} |
| 543 |
f( u , p ) = 0 , \qquad f(\cdot,\cdot) , u \in \Rn. |
| 544 |
\end{equation} |
| 545 |
The main algorithms in {\cal AUTO}, however, are aimed at the continuation |
| 546 |
of solutions of systems of ordinary differential equation (ODEs) of the form |
| 547 |
\begin{equation} \label{2} |
| 548 |
u'(t) = f\bigl( u(t) , p \bigr) , |
| 549 |
\qquad f(\cdot,\cdot) , u(\cdot) \in \Rn, |
| 550 |
\end{equation} |
| 551 |
subject to boundary (including initial) conditions and integral constraints. |
| 552 |
Above, $p$ denotes one or more free parameters. |
| 553 |
|
| 554 |
These boundary value algorithms also allow {\cal AUTO} to do certain stationary |
| 555 |
solution and wave calculations for the partial differential equation (PDE) |
| 556 |
\begin{equation} \label{3} |
| 557 |
u_t = D u_{xx} + f( u , p ), |
| 558 |
\qquad f(\cdot,\cdot) , u(\cdot) \in \Rn, |
| 559 |
\end{equation} |
| 560 |
where $D$ denotes a diagonal matrix of diffusion constants. |
| 561 |
|
| 562 |
The basic algorithms used in {\cal AUTO}, |
| 563 |
as well as related algorithms, can be found in |
| 564 |
\citename{HBK:77} \citeyear{HBK:77}, |
| 565 |
\citename{HBK:86} \citeyear{HBK:86}, |
| 566 |
\citename{DoKeKe:91a} \citeyear{DoKeKe:91a}, |
| 567 |
\citename{DoKeKe:91b} \citeyear{DoKeKe:91b}. |
| 568 |
|
| 569 |
Below, the basic capabilities of {\cal AUTO} are specified in more detail. |
| 570 |
Some representative demos are also indicated. |
| 571 |
|
| 572 |
\section{ Algebraic Systems.} \label{sec:algebraic_systems} |
| 573 |
Specifically, for (\ref{1}) {\cal AUTO} can~:~ |
| 574 |
|
| 575 |
\begin{itemize} |
| 576 |
\item[-] |
| 577 |
Compute solution families.\\ (Demo {\tt ab}; Run~2.) |
| 578 |
\item[-] |
| 579 |
Locate branch points, continue these in two or three parameters, |
| 580 |
and automatically compute |
| 581 |
bifurcating families. \\ (Demos {\tt pp2}; Run~1, and {\tt apbp}.) |
| 582 |
\item[-] |
| 583 |
Locate Hopf bifurcation points, continue these in two |
| 584 |
parameters, detect whether the Hopf bifurcation is sub- or |
| 585 |
supercritical, and detect zero-Hopf, Bogdanov-Takens, and |
| 586 |
generalized Hopf (Bautin) bifurcations.\\ (Demos {\tt pp3} and |
| 587 |
{\tt ppp}.) |
| 588 |
\item[-] |
| 589 |
Locate folds (limit points), continue these |
| 590 |
in two parameters, and detect cusp, zero-Hopf, and Bogdanov-Takens |
| 591 |
bifurcations. \\ |
| 592 |
\item[-] |
| 593 |
Locate branch points, folds, period-doubling, and torus |
| 594 |
(Neimark-Sacker) bifurcations, continue these in two or three |
| 595 |
parameters, and switch branches at branch points and |
| 596 |
period-doubling bifurcations |
| 597 |
for fixed points of the discrete dynamical system |
| 598 |
$u^{(k+1)}= f( u^{(k)}, p )$ \\ (Demo {\tt dd2}.) |
| 599 |
\item[-] |
| 600 |
Find extrema of an objective function along solution families |
| 601 |
and successively continue such extrema in more parameters. |
| 602 |
\\ (Demo {\tt opt}.) |
| 603 |
\end{itemize} |
| 604 |
|
| 605 |
|
| 606 |
\section{ Ordinary Differential Equations.} \label{sec:ODEs} |
| 607 |
For the ODE (\ref{2}) the program can~:~ |
| 608 |
|
| 609 |
\begin{itemize} |
| 610 |
\item[-] |
| 611 |
Compute families of stable and unstable periodic |
| 612 |
solutions and |
| 613 |
compute the Floquet multipliers, that determine stability, along |
| 614 |
these families. |
| 615 |
Starting data for the computation of periodic orbits are |
| 616 |
generated automatically at Hopf bifurcation points. \\ |
| 617 |
(Demo {\tt ab}; Run~2.) |
| 618 |
\item[-] |
| 619 |
Locate folds, branch points, period doubling bifurcations, |
| 620 |
and bifurcations to tori, along families of periodic solutions. |
| 621 |
Branch switching is possible at branch points and at period |
| 622 |
doubling bifurcations. \\ |
| 623 |
(Demos {\tt tor}, {\tt lor}.) |
| 624 |
\item[-] Continue folds, period-doubling bifurcations, |
| 625 |
and bifurcations to tori, in two parameters, detecting |
| 626 |
1:1, 1:2, 1:3 and 1:4 resonances. \\ |
| 627 |
(Demos {\tt plp}, {\tt pp3}, {\tt tor}.) |
| 628 |
|
| 629 |
The continuation of orbits of fixed period is also |
| 630 |
possible. This is the simplest way to compute curves of |
| 631 |
homoclinic orbits, if the period is sufficiently large. \\ |
| 632 |
(Demo {\tt pp2}.) |
| 633 |
|
| 634 |
The continuation of branch points in two parameters is only possible |
| 635 |
in non-generic problems, characterized by problem-specific symmetries.\\ |
| 636 |
(Demo {\tt lcbp}, Run~2.) |
| 637 |
|
| 638 |
Generically, in non-symmetric problems, branch points are continued |
| 639 |
in three parameters.\\ |
| 640 |
(Demos {\tt lcbp}, Run~3, and {\tt abcb}.) |
| 641 |
|
| 642 |
\item[-] Do each of the above for {\it rotations}, i.e., when some of the |
| 643 |
solution components are periodic modulo a phase gain of a |
| 644 |
multiple of $2 \pi$. \\ |
| 645 |
(Demo {\tt pen}.) |
| 646 |
\item[-] Follow curves of homoclinic orbits and detect and continue |
| 647 |
various codimension-2 bifurcations, using the {\cal HomCont} algorithms of |
| 648 |
\citename{ChKu:94} \citeyear{ChKu:94}, |
| 649 |
\citename{ChKuSa:95} \citeyear{ChKuSa:95}.\\ |
| 650 |
(Demos {\tt san}, {\tt mnt}, {\tt kpr}, {\tt cir}, |
| 651 |
{\tt she}, {\tt rev}.) |
| 652 |
\item[-] Locate extrema of an integral objective functional along a family |
| 653 |
of periodic solutions and successively continue such extrema |
| 654 |
in more parameters. \\ |
| 655 |
(Demo {\tt ops}.) |
| 656 |
\item[-] |
| 657 |
Compute curves of solutions to (\ref{2}) on $[0,1]$, subject to general |
| 658 |
nonlinear boundary and integral conditions. |
| 659 |
The boundary conditions need not be separated, i.e., they may |
| 660 |
involve both $u(0)$ and $u(1)$ simultaneously. |
| 661 |
The side conditions may also depend on parameters. |
| 662 |
The number of boundary conditions plus the number of integral |
| 663 |
conditions need not equal the dimension of the ODE, |
| 664 |
provided there is a corresponding number of additional |
| 665 |
parameter variables. \\ |
| 666 |
(Demos {\tt exp}, {\tt int}.) |
| 667 |
\item[-] |
| 668 |
Determine folds and branch points along |
| 669 |
solution families to the above boundary value problem. |
| 670 |
Branch switching is possible at branch points. |
| 671 |
Curves of folds and branch points can be computed.\\ |
| 672 |
(Demos {\tt bvp}, {\tt int}, {\tt sspg}.) |
| 673 |
\end{itemize} |
| 674 |
|
| 675 |
|
| 676 |
|
| 677 |
\section{ Parabolic PDEs.} \label{sec:Parabolic_PDEs} |
| 678 |
For (\ref{3}) the program can~:~ |
| 679 |
|
| 680 |
\begin{itemize} |
| 681 |
\item[-] |
| 682 |
Trace out families of spatially homogeneous solutions. |
| 683 |
This amounts to a bifurcation analysis of the algebraic |
| 684 |
system (\ref{1}). However, {\cal AUTO} uses a related system instead, |
| 685 |
in order to enable the detection of bifurcations to wave train |
| 686 |
solutions of given wave speed. More precisely, bifurcations |
| 687 |
to wave trains are detected as Hopf bifurcations along fixed |
| 688 |
point families of the related ODE |
| 689 |
\begin{equation} \label{4} \begin{array}{cl} |
| 690 |
& u'(z) = v(z) ,\\ |
| 691 |
& v'(z) =-D^{-1} \bigl[ c~v(z) + f\bigl( u(z) , p \bigr) \bigr], \\ |
| 692 |
\end{array} \end{equation} |
| 693 |
where $z = x - ct$ , with the wave speed $c$ specified by the user.\\ |
| 694 |
(Demo {\tt wav}; Run~2.) |
| 695 |
\item[-] |
| 696 |
Trace out families of periodic wave solutions to (\ref{3}) that emanate |
| 697 |
from a Hopf bifurcation point of Equation~\ref{4}. |
| 698 |
The wave speed $c$ is fixed along such a family, but |
| 699 |
the wave length $L$, i.e., the period of periodic solutions |
| 700 |
to (\ref{4}), |
| 701 |
will normally vary. If the wave length $L$ becomes large, |
| 702 |
i.e., if a homoclinic orbit of Equation~\ref{4} is approached, |
| 703 |
then the wave tends to a solitary wave solution of (\ref{3}). \\ |
| 704 |
(Demo {\tt wav}; Run~3.) |
| 705 |
\item[-] |
| 706 |
Trace out families of waves of fixed wave length $L$ in two parameters. |
| 707 |
The wave speed $c$ may be chosen as one of these parameters. |
| 708 |
If $L$ is large then such a continuation gives a family |
| 709 |
of approximate solitary wave solutions to (\ref{3}).\\ |
| 710 |
(Demo {\tt wav}; Run~4.) |
| 711 |
\item[-] |
| 712 |
Do time evolution calculations for (\ref{3}), given periodic |
| 713 |
initial data on the interval $[0,L]$. |
| 714 |
The initial data must be specified on $[0,1]$ and |
| 715 |
$L$ must be set separately because of internal scaling. |
| 716 |
The initial data may be given analytically or |
| 717 |
obtained from a previous computation of wave trains, solitary |
| 718 |
waves, or from a previous evolution calculation. |
| 719 |
Conversely, if an evolution calculation results in a |
| 720 |
stationary wave then this wave can be used as starting data |
| 721 |
for a wave continuation calculation.\\ |
| 722 |
(Demo {\tt wav}; Run~5.) |
| 723 |
\item[-] |
| 724 |
Do time evolution calculations for (\ref{3}) subject to user-specified |
| 725 |
boundary conditions. |
| 726 |
As above, the initial data must be specified on $[0,1]$ and the space |
| 727 |
interval length $L$ must be specified separately. |
| 728 |
Time evolution computations of (\ref{3}) are adaptive in space and |
| 729 |
in time. Discretization in time is not very accurate~: only |
| 730 |
implicit Euler. Indeed, time integration of (\ref{3}) has only been |
| 731 |
included as a convenience and it is not very efficient. |
| 732 |
(Demos {\tt pd1}, {\tt pd2}.) |
| 733 |
\item[-] |
| 734 |
Compute curves of stationary solutions to (\ref{3}) subject to user-specified |
| 735 |
boundary conditions. |
| 736 |
The initial data may be given analytically, obtained from a previous |
| 737 |
stationary solution computation, or from a time evolution calculation.\\ |
| 738 |
(Demos {\tt pd1}, {\tt pd2}.) |
| 739 |
\end{itemize} |
| 740 |
|
| 741 |
In connection with periodic waves, |
| 742 |
note that (\ref{4}) is just a special case of (\ref{2}) and |
| 743 |
that its fixed point analysis is a special case of (\ref{1}). |
| 744 |
One advantage of the built-in capacity of {\cal AUTO} to deal with |
| 745 |
problem (\ref{3}) is that the user need only specify $f$, $D$, and $c$. |
| 746 |
Another advantage is the compatibility of output data for |
| 747 |
restart purposes. This allows switching back and forth between |
| 748 |
evolution calculations and wave computations. |
| 749 |
|
| 750 |
\section{ Discretization.} \label{sec:Discretization} |
| 751 |
{\cal AUTO} discretizes ODE boundary value problems |
| 752 |
(which includes periodic solutions) by the method of orthogonal |
| 753 |
collocation using piecewise polynomials with 2-7 collocation points |
| 754 |
per mesh interval (\citename{dBSw:73} \citeyear{dBSw:73}). |
| 755 |
The mesh automatically adapts to the solution to equidistribute |
| 756 |
the local discretization error (\citename{RuCr:78} \citeyear{RuCr:78}). |
| 757 |
The number of mesh intervals and the number of collocation points |
| 758 |
remain constant during any given run, although they may be changed |
| 759 |
at restart points. |
| 760 |
The implementation is {\cal AUTO}-specific. In particular, the choice of |
| 761 |
local polynomial basis |
| 762 |
and the algorithm for solving the linearized collocation systems |
| 763 |
were specifically designed for use in numerical bifurcation analysis. |
| 764 |
|
| 765 |
%============================================================================== |
| 766 |
%============================================================================== |
| 767 |
\chapter{ User-Supplied Files.} \label{ch:User_supplied_files} |
| 768 |
%============================================================================== |
| 769 |
%============================================================================== |
| 770 |
The user must prepare the two files described below. |
| 771 |
This can be done with the GUI described in Chapter~\ref{ch:GUI}, |
| 772 |
or independently. |
| 773 |
|
| 774 |
\section{ The Equations-File \texttt{xxx.f90}, or \texttt{xxx.f}, or \texttt{xxx.c}} |
| 775 |
A source file {\tt xxx.f90} containing the Fortran routines |
| 776 |
{\tt FUNC}, {\tt STPNT}, {\tt BCND}, {\tt ICND}, {\tt FOPT}, and {\tt PVLS}. |
| 777 |
Here {\tt xxx} stands for a user-selected name. |
| 778 |
If any of these routines is irrelevant |
| 779 |
to the problem then its body need not be completed. |
| 780 |
Examples are in {\tt auto/07p/demos}, where, e.g., |
| 781 |
the file {\tt ab/ab.f90} defines a two-dimensional dynamical system, |
| 782 |
and the file {\tt exp/exp.f90} defines a boundary value problem. |
| 783 |
The simplest way to create a new equations-file is to copy |
| 784 |
an appropriate demo file. |
| 785 |
For a fully documented equations-file see |
| 786 |
{\tt auto/07p/demos/cusp/cusp.f90} or {\tt auto/07p/gui/aut.f90}. |
| 787 |
In GUI mode, this file can be directly loaded with the GUI-button |
| 788 |
{\it Equations/New}; see Section~\ref{sec:GUI_Menu_bar}. |
| 789 |
|
| 790 |
The equations-file can either be written in fixed-form (old-style) |
| 791 |
Fortran (.f), free-form Fortran (.f90) or in C (.c). |
| 792 |
|
| 793 |
\section{ The Constants-File \texttt{c.xxx}} |
| 794 |
{\cal AUTO}-constants for {\tt xxx.\{f,f90,c\}} are normally expected |
| 795 |
in a corresponding file {\tt c.xxx}. |
| 796 |
Specific examples include {\tt ab/c.ab} |
| 797 |
and {\tt exp/c.exp} in {\tt auto/07p/demos}. |
| 798 |
See Chapter~\ref{ch:AUTO_constants} |
| 799 |
for the significance of each constant. |
| 800 |
|
| 801 |
\newpage |
| 802 |
\section{ User-Supplied Routines.} \label{sec: User_supplied_routines} |
| 803 |
The purpose of each of the user-supplied routines in |
| 804 |
the file {\tt xxx.\{f90,f\}} is described below. |
| 805 |
|
| 806 |
\begin{itemize} |
| 807 |
\item[-] {\tt FUNC}~:~ |
| 808 |
defines the function $f(u,p)$ in (\ref{1}), (\ref{2}), or (\ref{3}). |
| 809 |
\item[-] {\tt STPNT}~:~ |
| 810 |
This routine is called only if {\tt IRS}=0 |
| 811 |
(see Section~\ref{sec:IRS} for {\tt IRS}), |
| 812 |
which typically is the case for the first run, or when a system |
| 813 |
is manually extended. A system is extended if {\tt NDIM} (see |
| 814 |
Section~\ref{sec:NDIM}) increases between runs. |
| 815 |
It defines a starting solution $(u,p)$ of (\ref{1}) or (\ref{2}). |
| 816 |
The starting solution should not be a branch point.\\ |
| 817 |
(Demos {\tt ab}, {\tt exp}, {\tt frc}, {\tt lor}.)\\ |
| 818 |
It extends an existing solution into higher dimensions in the demos |
| 819 |
{\tt p2c} and {\tt c2c}. |
| 820 |
\item[-] {\tt BCND}~:~ |
| 821 |
A routine {\tt BCND} that defines the boundary conditions. \\ |
| 822 |
(Demo {\tt exp}, {\tt kar}.) |
| 823 |
\item[-] {\tt ICND}~:~ |
| 824 |
A routine {\tt ICND} that defines the integral conditions. \\ |
| 825 |
(Demos {\tt int}, {\tt lin}.) |
| 826 |
\item[-] {\tt FOPT}~:~ |
| 827 |
A routine {\tt FOPT} that defines the objective functional. \\ |
| 828 |
(Demos {\tt opt}, {\tt ops}.) |
| 829 |
\item[-] {\tt PVLS}~:~ |
| 830 |
A routine {\tt PVLS} for defining ``solution measures''. |
| 831 |
This routine, using a ``\texttt{LOGICAL, SAVE :: first = .TRUE.}'' |
| 832 |
variable can also be used for initialization, as it is called |
| 833 |
first. \\ |
| 834 |
(Demo {\tt pvl}.) |
| 835 |
\end{itemize} |
| 836 |
|
| 837 |
In a C language equation file, these routines are written using |
| 838 |
lowercase letters; with Fortran you can use any case. |
| 839 |
|
| 840 |
\section{ User-Supplied Derivatives.} \label{sec:derivatives} |
| 841 |
If {\cal AUTO}-constant {\tt JAC} equals 0 |
| 842 |
then derivatives need not be specified in |
| 843 |
{\tt FUNC}, {\tt BCND}, {\tt ICND}, and {\tt FOPT}; see Section~\ref{sec:JAC}. |
| 844 |
If {\tt JAC=1} then derivatives must be given. |
| 845 |
If {\tt JAC=-1} then the parameter derivatives may be omitted in |
| 846 |
{\tt FUNC}. |
| 847 |
This may be necessary for sensitive |
| 848 |
problems, and is recommended for computations in which {\cal AUTO} |
| 849 |
generates an extended system. |
| 850 |
Derivatives are specified as follows, where zero entries may be |
| 851 |
omitted: |
| 852 |
\begin{itemize} |
| 853 |
\item[{\tt FUNC}] |
| 854 |
\begin{itemize} |
| 855 |
\item |
| 856 |
Derivatives with respect to phase space variables |
| 857 |
are specified in {\tt DFDU(1:NDIM, 1:NDIM)}. |
| 858 |
\item |
| 859 |
Parameter derivatives go into {\tt DFDP(1:NDIM, 1:NPAR)}. |
| 860 |
\end{itemize} |
| 861 |
\item[{\tt BCND}] |
| 862 |
\begin{itemize} |
| 863 |
\item |
| 864 |
Derivatives with respect to the two boundary conditions |
| 865 |
are specified in {\tt DBC(1:NBC, 1:NBC)} and {\tt DBC(1:NBC, NBC+1:2*NBC)}, |
| 866 |
respectively. |
| 867 |
\item |
| 868 |
Parameter derivatives go into {\tt DBC(1:NBC, 2*NBC+1:2*NBC+NPAR)}. |
| 869 |
\end{itemize} |
| 870 |
\item[{\tt ICND}] |
| 871 |
\begin{itemize} |
| 872 |
\item |
| 873 |
Derivatives with respect to the integral conditions |
| 874 |
are specified in {\tt DINT(1:NINT, 1:NINT)}. |
| 875 |
\item |
| 876 |
Parameter derivatives go into {\tt DINT(1:NINT, NINT+1:NINT+NPAR)}. |
| 877 |
\end{itemize} |
| 878 |
\end{itemize} |
| 879 |
Examples of user-supplied derivatives can be found in |
| 880 |
demos {\tt dd2}, {\tt int}, {\tt plp}, {\tt opt}, and {\tt ops}. |
| 881 |
|
| 882 |
%============================================================================== |
| 883 |
%============================================================================== |
| 884 |
\chapter{ Running {\cal AUTO} using Python Commands.} \label{ch:python_mode} |
| 885 |
%============================================================================== |
| 886 |
%============================================================================== |
| 887 |
|
| 888 |
\section{ Typographical Conventions } |
| 889 |
This chapter uses the following conventions. |
| 890 |
All code examples will be in in the following font. |
| 891 |
|
| 892 |
{\small \begin{center} \begin{boxedverbatim} |
| 893 |
AUTO> copydemo("ab") |
| 894 |
Copying demo ab ... done |
| 895 |
\end{boxedverbatim} |
| 896 |
\end{center} |
| 897 |
} |
| 898 |
|
| 899 |
To distinguish commands which are typed to the Unix |
| 900 |
shell from those which are typed to the \AUTO |
| 901 |
command line user interface (CLUI) we will use the |
| 902 |
following two prompts. |
| 903 |
|
| 904 |
\begin{tabular}{|l|l|} |
| 905 |
\hline |
| 906 |
\verb!>! & Commands which follow this prompt are for the Unix shell. \\ \hline |
| 907 |
\verb!AUTO>! & Commands which follow this prompt are for the \AUTO CLUI. \\ \hline |
| 908 |
\end{tabular} |
| 909 |
|
| 910 |
\section{ General Overview.} \label{sec:CLUI_Overview} |
| 911 |
The \AUTO command line user interface (CLUI) is similar |
| 912 |
to the command language described in Section~\ref{sec:command_mode} |
| 913 |
in that it facilitates the interactive creating and editing of |
| 914 |
equations-files and constants-files. |
| 915 |
It differs from the other command language in that it is based |
| 916 |
on the object-oriented scripting language \python (see \citename{Lut:96} \citeyear{Lut:96}) |
| 917 |
and provides extensive programming capabilities. |
| 918 |
This chapter will provide documentation for the \AUTO CLUI commands, |
| 919 |
but is not intended as a tutorial for the \python language. |
| 920 |
We will attempt to make this chapter self contained by describing |
| 921 |
all \python constructs that we use in the examples, but |
| 922 |
for more extensive documentation on the \python language, |
| 923 |
including tutorials and pointers to further documentation, |
| 924 |
please see \citename{Lut:96} \citeyear{Lut:96} or the |
| 925 |
web page \url{http://www.python.org} which contains |
| 926 |
an excellent tutorial at |
| 927 |
\url{http://www.python.org/doc/current/tut/tut.html}. |
| 928 |
|
| 929 |
To use the CLUI for a new equation, change to an empty directory. |
| 930 |
For an existing equations-file, change to its directory. |
| 931 |
(\emp{Do not activate the CLUI in the directory \filef{auto/07p} |
| 932 |
or in any of its subdirectories.}) |
| 933 |
Then type |
| 934 |
|
| 935 |
\centerline {\commandf{auto}.} |
| 936 |
|
| 937 |
If your command search path has been correctly set (see |
| 938 |
Section~\ref{sec:Installation}), this command will start the \AUTO CLUI |
| 939 |
interactive interpretor and provide you with the \AUTO CLUI prompt. |
| 940 |
|
| 941 |
\begin{figure}[htbp] |
| 942 |
{\small |
| 943 |
\begin{center} \begin{boxedverbatim} |
| 944 |
> auto |
| 945 |
Python 2.5.2 (r252:60911, Nov 14 2008, 19:46:32) |
| 946 |
[GCC 4.3.2] on linux2 |
| 947 |
Type "help", "copyright", "credits" or "license" for more information. |
| 948 |
(AUTOInteractiveConsole) |
| 949 |
AUTO> |
| 950 |
\end{boxedverbatim} |
| 951 |
\end{center} |
| 952 |
} |
| 953 |
\caption[Starting the \AUTO CLUI.] |
| 954 |
{Typing \commandf{auto} at the Unix shell prompt starts the |
| 955 |
\AUTO CLUI. } |
| 956 |
\label{exa:clui_starting} |
| 957 |
\end{figure} |
| 958 |
|
| 959 |
If you have IPython installed (\url{http://ipython.scipy.org}), then |
| 960 |
you can get a friendlier interface using the command |
| 961 |
\commandf{auto -i}, enabling TAB completion, persistent command-line |
| 962 |
history and other features. |
| 963 |
|
| 964 |
In addition to the examples in the following sections there are |
| 965 |
several example scripts which can be found in |
| 966 |
\filef{auto/07p/demos/python} and are listed in |
| 967 |
Table~\ref{tbl:demo_scripts}. These scripts are fully annotated and |
| 968 |
provide good examples of how \AUTO CLUI scripts are written. The |
| 969 |
scripts in \filef{auto/07p/demos/python/n-body} are especially lucid |
| 970 |
examples and perform various related parts of a calculation involving |
| 971 |
the gravitational N-body problem. |
| 972 |
Scripts which end in the |
| 973 |
suffix \filef{.auto} are called ``basic'' scripts and can |
| 974 |
be run by typing \commandf{auto scriptname.auto}. |
| 975 |
The scripts shown in Section~\ref{sec:clui_first_example} |
| 976 |
and Section~\ref{sec:clui_complex_example} are examples |
| 977 |
of basic scripts. |
| 978 |
Scripts which end in the |
| 979 |
suffix \filef{.xauto} are called ``expert'' scripts and can |
| 980 |
be run by typing \commandf{autox scriptname.xauto}. |
| 981 |
More information on expert scripts can be |
| 982 |
found in Section~\ref{sec:clui_extending}. |
| 983 |
See the \filef{README} file in that |
| 984 |
directory for more information. |
| 985 |
|
| 986 |
\begin{table}[htbp] |
| 987 |
\begin{center} |
| 988 |
\begin{tabular}{| l | l |} |
| 989 |
\hline |
| 990 |
Script & Description \\ |
| 991 |
\hline |
| 992 |
demo1.auto & \begin{minipage}{3in}\smallskip The demo script from Section~\ref{sec:clui_first_example}.\smallskip\end{minipage} \\ |
| 993 |
\hline |
| 994 |
demo2.auto, demo3.auto, and demo4.auto & \begin{minipage}{3in}\smallskip The demo scripts from Section~\ref{sec:clui_complex_example}.\smallskip\end{minipage} \\ |
| 995 |
\hline |
| 996 |
userScript.xauto & \begin{minipage}{3in}\smallskip The expert demo script from Figure~\ref{exa:clui_complex_function}.\smallskip\end{minipage} \\ |
| 997 |
\hline |
| 998 |
userScript.py & \begin{minipage}{3in}\smallskip The loadable expert demo script from Figure~\ref{exa:clui_complex_interactive}.\smallskip\end{minipage} \\ |
| 999 |
\hline |
| 1000 |
branches.auto & \begin{minipage}{3in}\smallskip The branch |
| 1001 |
manipulating script from Figure~\ref{exa:clui branch management}.\smallskip\end{minipage}\\ |
| 1002 |
\hline |
| 1003 |
fullTest.auto & \begin{minipage}{3in}\smallskip A script which uses the entire \AUTO command set, except for the plotting commands.\smallskip\end{minipage} \\ |
| 1004 |
\hline |
| 1005 |
plotter.auto & \begin{minipage}{3in}\smallskip A demonstration of some of the plotting capabilities of \AUTO. \smallskip\end{minipage}\\ |
| 1006 |
\hline |
| 1007 |
tutorial.auto & \begin{minipage}{3in}\smallskip A script which implements the tutorial from Section~\ref{sec:Demos_ab}. \smallskip\end{minipage}\\ |
| 1008 |
|
| 1009 |
\hline n-body/compute\_lagrange\_points\_family.auto |
| 1010 |
& \begin{minipage}{3in}\smallskip A basic script which computes and plots all of the |
| 1011 |
``Lagrange points'' as a function of the ratio of the masses of |
| 1012 |
the two planets.\smallskip\end{minipage}\\ |
| 1013 |
|
| 1014 |
\hline n-body/compute\_lagrange\_points\_0.5.auto |
| 1015 |
& \begin{minipage}{3in}\smallskip A basic script which computes all of the ``Lagrange |
| 1016 |
points'' for the case where the masses of the two planets are |
| 1017 |
equal, and saves the data. |
| 1018 |
\smallskip\end{minipage}\\ |
| 1019 |
|
| 1020 |
\hline n-body/compute\_periodic\_family.xauto |
| 1021 |
& \begin{minipage}{3in}\smallskip An expert script which starts at a ``Lagrange |
| 1022 |
point'' computed by compute\_lagrange\_points\_0.5.auto |
| 1023 |
and continues in the ratio of the masses until |
| 1024 |
a specified mass ratio is reached. It then computes |
| 1025 |
a family of periodic orbits for each pair of |
| 1026 |
purely complex eigenvalues. |
| 1027 |
\smallskip\end{minipage}\\ |
| 1028 |
|
| 1029 |
\hline n-body/to\_matlab.xauto |
| 1030 |
& \begin{minipage}{3in}\smallskip A script which takes a set of \AUTO data files and creates |
| 1031 |
a set of files formatted for importing into Matlab |
| 1032 |
for either plotting or further calculations. |
| 1033 |
\smallskip\end{minipage}\\ |
| 1034 |
\hline |
| 1035 |
\end{tabular} |
| 1036 |
\caption[Available demo scripts.] |
| 1037 |
{The various demonstration scripts for the \AUTO CLUI.} |
| 1038 |
\label{tbl:demo_scripts} |
| 1039 |
\end{center} |
| 1040 |
\end{table} |
| 1041 |
|
| 1042 |
\section{ First Example } \label{sec:clui_first_example} |
| 1043 |
|
| 1044 |
We begin with a simple example of the \AUTO CLUI. In this example we |
| 1045 |
copy the \filef{ab} demo from the \AUTO installation directory and |
| 1046 |
run it. For more information on the \filef{ab} demo see |
| 1047 |
Section~\ref{sec:Demos_ab}. |
| 1048 |
The commands listed in Table~\ref{tbl:example_clui_1} |
| 1049 |
will copy the demo files to your work directory and run |
| 1050 |
the first part of the demo. |
| 1051 |
The results of running these commands are shown in |
| 1052 |
Figure~\ref{exa:clui_first_example}. |
| 1053 |
|
| 1054 |
|
| 1055 |
\begin{table}[htbp] |
| 1056 |
\begin{center} |
| 1057 |
\begin{tabular}{| l | l |} |
| 1058 |
\hline |
| 1059 |
{\cal Unix}-COMMAND & ACTION \\ |
| 1060 |
\hline |
| 1061 |
%============================================================================== |
| 1062 |
\commandf{auto} & start the \AUTO CLUI\\ |
| 1063 |
\hline |
| 1064 |
\AUTO CLUI COMMAND & ACTION \\ |
| 1065 |
\hline |
| 1066 |
\commandf{demo('ab')} & copy the demo files to the work directory\\ |
| 1067 |
\commandf{ab = load(equation='ab')} & load the filename \filef{ab.f90} into the variable ab\\ |
| 1068 |
\commandf{ab = load(ab, constants='ab.1')} & load the contents of |
| 1069 |
the file \filef{c.ab.1} into the variable ab\\ |
| 1070 |
\commandf{run(ab)} & run \AUTO with the current set of files\\ |
| 1071 |
\hline |
| 1072 |
%============================================================================== |
| 1073 |
\end{tabular} |
| 1074 |
\caption[Running the demo \filef{ab} files.] |
| 1075 |
{Running the demo \filef{ab} files.} |
| 1076 |
\label{tbl:example_clui_1} |
| 1077 |
\end{center} |
| 1078 |
\end{table} |
| 1079 |
|
| 1080 |
\begin{figure}[htbp] |
| 1081 |
{\small \begin{center} \begin{boxedverbatim} |
| 1082 |
> auto |
| 1083 |
Python 2.5.2 (r252:60911, Nov 14 2008, 19:46:32) |
| 1084 |
[GCC 4.3.2] on linux2 |
| 1085 |
Type "help", "copyright", "credits" or "license" for more information. |
| 1086 |
(AUTOInteractiveConsole) |
| 1087 |
AUTO> demo('ab') |
| 1088 |
Copying demo ab ... done |
| 1089 |
Runner configured |
| 1090 |
AUTO> ab = load(equation='ab') |
| 1091 |
Runner configured |
| 1092 |
AUTO> ab = load(ab,constants='ab.1') |
| 1093 |
Runner configured |
| 1094 |
AUTO> run(ab) |
| 1095 |
gfortran -fopenmp -O -c ab.f90 -o ab.o |
| 1096 |
gfortran -fopenmp -O ab.o -o ab.exe /home/bart/auto/07p/lib/*.o |
| 1097 |
Starting ab ... |
| 1098 |
|
| 1099 |
BR PT TY LAB PAR(2) L2-NORM U(1) U(2) |
| 1100 |
1 1 EP 1 8.00000E+00 0.00000E+00 0.00000E+00 0.00000E+00 |
| 1101 |
1 31 UZ 2 1.40000E+01 0.00000E+00 0.00000E+00 0.00000E+00 |
| 1102 |
1 36 UZ 3 1.50000E+01 0.00000E+00 0.00000E+00 0.00000E+00 |
| 1103 |
1 41 UZ 4 1.60000E+01 0.00000E+00 0.00000E+00 0.00000E+00 |
| 1104 |
1 46 UZ 5 1.70000E+01 0.00000E+00 0.00000E+00 0.00000E+00 |
| 1105 |
1 51 UZ 6 1.80000E+01 0.00000E+00 0.00000E+00 0.00000E+00 |
| 1106 |
|
| 1107 |
Total Time 0.181E-01 |
| 1108 |
ab ... done |
| 1109 |
<_=bifDiag instance at 0x0972198c> |
| 1110 |
AUTO> |
| 1111 |
\end{boxedverbatim} |
| 1112 |
\end{center} |
| 1113 |
} |
| 1114 |
\caption[The first example of the \AUTO CLUI.] |
| 1115 |
{Typing \commandf{auto} at the Unix shell prompt starts the |
| 1116 |
\AUTO CLUI. The rest of the commands are interpreted by |
| 1117 |
the \AUTO CLUI.} |
| 1118 |
\label{exa:clui_first_example} |
| 1119 |
\end{figure} |
| 1120 |
|
| 1121 |
|
| 1122 |
Let us examine more closely what action each of the commands |
| 1123 |
performs. First, \commandf{demo('ab')} |
| 1124 |
(Section~\ref{sec:clui_ref_demo} in the reference) copies the files in |
| 1125 |
\filef{\$AUTO\_DIR/demo/ab} into the work directory. |
| 1126 |
|
| 1127 |
Next, \commandf{ab = load(equation='ab')} |
| 1128 |
(Section~\ref{sec:clui_ref_basic} in the reference) |
| 1129 |
informs the \AUTO CLUI that the name of |
| 1130 |
the user defined function file is \filef{ab.f90}. The commands |
| 1131 |
\commandf{load}, and the closely related \commandf{run}, are |
| 1132 |
two of the most commonly used commands in the |
| 1133 |
\AUTO CLUI, since they read and parse the user files which are |
| 1134 |
manipulated by other commands. The \AUTO CLUI stores this setting in |
| 1135 |
the variable {\tt ab} until it is changed by a command, |
| 1136 |
such as another \commandf{load} |
| 1137 |
command. The idea of storing information is one of the ideas that |
| 1138 |
sets the CLUI apart from the command language described in |
| 1139 |
Section~\ref{sec:command_mode}. |
| 1140 |
|
| 1141 |
Next, \commandf{ab = load(ab, constants='ab.1')} parses the \AUTO |
| 1142 |
constants file \filef{c.ab.1} and reads it into memory. Note that |
| 1143 |
\emp{changes to the file \filef{c.ab.1} after it has been loaded in |
| 1144 |
will not be used by \AUTO unless it is loaded in again after the |
| 1145 |
changes are made}. |
| 1146 |
|
| 1147 |
Finally, \commandf{run(ab)} |
| 1148 |
(Section~\ref{sec:clui_ref_basic} in the reference) |
| 1149 |
uses the user defined functions loaded |
| 1150 |
by the \commandf{load(equation='ab')} command, and the \AUTO constants |
| 1151 |
loaded by the \commandf{load(ab, constants = 'ab.1')} to run \AUTO. |
| 1152 |
|
| 1153 |
The \commandf{run} command returns a bifurcation diagram structure. It can |
| 1154 |
be referenced using the special \commandf{\_} variable in interactive |
| 1155 |
sessions, or assigned as \commandf{result=run(ab)}. The result |
| 1156 |
can then be referred to in further calculations, plotted, and saved. |
| 1157 |
|
| 1158 |
Figure~\ref{exa:clui_first_example} showed two of |
| 1159 |
the file types that the |
| 1160 |
\commandf{load} command can read into memory, namely |
| 1161 |
the user defined function file and the \AUTO constants |
| 1162 |
file (Section~\ref{ch:User_supplied_files}). |
| 1163 |
There are two other files types that can be read |
| 1164 |
in using the \commandf{load} command, and they are |
| 1165 |
the restart solution file (Section~\ref{ch:Output_files}) |
| 1166 |
and the {\cal HomCont} parameter |
| 1167 |
file (Section~\ref{sec:HomCont_files}). The \commandf{load} command |
| 1168 |
can also directly load AUTO constants. |
| 1169 |
|
| 1170 |
Note that the name given to the load |
| 1171 |
command is not the same as the filename which is read |
| 1172 |
in, for example \commandf{load(constants='ab.1')} reads in |
| 1173 |
the file \filef{c.ab.1}. This difference is |
| 1174 |
a result of the automatic transformation of the |
| 1175 |
filenames by the |
| 1176 |
\AUTO CLUI into the |
| 1177 |
standard names used by \AUTO. |
| 1178 |
The standard filename |
| 1179 |
transformations are shown in Table~\ref{tbl:clui_filename_translation}. |
| 1180 |
|
| 1181 |
\begin{table}[htbp] |
| 1182 |
\begin{center} |
| 1183 |
\begin{tabular}{| l | l | l | l |} |
| 1184 |
\hline |
| 1185 |
Long name & Short name & Name entered & Transformed file name \\ |
| 1186 |
\hline |
| 1187 |
equation & e & foo &foo.f90/foo.f/foo.c \\ |
| 1188 |
\hline |
| 1189 |
constants & c & foo & c.foo \\ |
| 1190 |
\hline |
| 1191 |
solution & s & foo & s.foo \\ |
| 1192 |
\hline |
| 1193 |
bifurcationDiagram & b & foo &b.foo \\ |
| 1194 |
\hline |
| 1195 |
diagnostics & d & foo &d.foo \\ |
| 1196 |
\hline |
| 1197 |
homcont & h & foo &h.foo \\ |
| 1198 |
\hline |
| 1199 |
\end{tabular} |
| 1200 |
\caption[Standard \AUTO CLUI filename translations.] |
| 1201 |
{This table shows the standard \AUTO CLUI filename |
| 1202 |
translations. In \filef{load} and \filef{run} |
| 1203 |
commands either the long name or the short name may be |
| 1204 |
used for loading the appropriate files.} |
| 1205 |
\label{tbl:clui_filename_translation} |
| 1206 |
\end{center} |
| 1207 |
\end{table} |
| 1208 |
|
| 1209 |
Since the \commandf{load} command is so common, there are |
| 1210 |
various shorthand versions of it. First, there are short versions |
| 1211 |
of the various arguments as shown in Table~\ref{tbl:clui_filename_translation}. |
| 1212 |
For example, the command \commandf{load(constants='ab.1')} can |
| 1213 |
be shortened to \commandf{load(c='ab.1')}. |
| 1214 |
Next, several different |
| 1215 |
files may be loaded at once using the same \commandf{load} command. |
| 1216 |
For example, the two commands in Figure~\ref{exa:clui_two_command} |
| 1217 |
have the same effect as the single command in |
| 1218 |
Figure~\ref{exa:clui_one_command}. |
| 1219 |
Last, you can bypass the \commandf{load} command, unless the |
| 1220 |
intermediate result is needed, and use the \commandf{run} command |
| 1221 |
directly on the \commandf{load} arguments, as in |
| 1222 |
Figure~\ref{exa:clui_one_run_command}. |
| 1223 |
|
| 1224 |
\begin{figure}[htbp] |
| 1225 |
{\small \begin{center} \begin{boxedverbatim} |
| 1226 |
AUTO> ab = load(e='ab') |
| 1227 |
Runner configured |
| 1228 |
AUTO> ab = load(ab,c='ab.1) |
| 1229 |
Runner configured |
| 1230 |
\end{boxedverbatim} |
| 1231 |
\end{center} |
| 1232 |
} |
| 1233 |
\caption[Loading two files individually] |
| 1234 |
{Loading two files individually.} |
| 1235 |
\label{exa:clui_two_command} |
| 1236 |
\end{figure} |
| 1237 |
|
| 1238 |
\begin{figure}[htbp] |
| 1239 |
{\small \begin{center} \begin{boxedverbatim} |
| 1240 |
AUTO> ab = load(e='ab',c='ab.1') |
| 1241 |
Runner configured |
| 1242 |
\end{boxedverbatim} |
| 1243 |
\end{center} |
| 1244 |
} |
| 1245 |
\caption[Loading two files at the same time] |
| 1246 |
{Loading two files at the same time.} |
| 1247 |
\label{exa:clui_one_command} |
| 1248 |
\end{figure} |
| 1249 |
|
| 1250 |
\begin{figure}[htbp] |
| 1251 |
{\small \begin{center} \begin{boxedverbatim} |
| 1252 |
AUTO> runab1 = run(e='ab',c='ab.1') |
| 1253 |
Runner configured |
| 1254 |
\end{boxedverbatim} |
| 1255 |
\end{center} |
| 1256 |
} |
| 1257 |
\caption[Loading two files at the same time and running] |
| 1258 |
{Loading two files at the same time and run using them.} |
| 1259 |
\label{exa:clui_one_run_command} |
| 1260 |
\end{figure} |
| 1261 |
|
| 1262 |
Also, since it is common that several files will be loaded that |
| 1263 |
have the same base name \commandf{load('ab')} performs the same |
| 1264 |
action as \commandf{load(e='ab', c='ab', s='ab', h='ab')}. |
| 1265 |
Note, for the command \commandf{load('ab')} it is not required that all |
| 1266 |
of the files exist. Information from all existing files is used only |
| 1267 |
if they exist, and no error message will be given for non-existing |
| 1268 |
files. However, later \commandf{run} commands may cause \AUTO to err |
| 1269 |
with incomplete information. |
| 1270 |
|
| 1271 |
\section{ Scripting } |
| 1272 |
|
| 1273 |
Section~\ref{sec:clui_first_example} showed commands |
| 1274 |
being interactively entered at the \AUTO CLUI |
| 1275 |
prompt, but since the \AUTO CLUI is based |
| 1276 |
on \python one has the ability to write |
| 1277 |
scripts for performing sequences of commands |
| 1278 |
automatically. A \python script is very similar |
| 1279 |
to the interactive mode shown in Section~\ref{sec:clui_first_example} |
| 1280 |
except that the commands are placed in a file and |
| 1281 |
read all at once. For example, if the |
| 1282 |
commands from Figure~\ref{exa:clui_first_example} where placed |
| 1283 |
into the file \filef{demo1.auto}, in the format shown in |
| 1284 |
Figure~\ref{exa:clui_first_script}, then the commands |
| 1285 |
could be run all at once by typing \commandf{auto demo1.auto}. |
| 1286 |
See Figure~\ref{exa:clui_run_first_script} for the |
| 1287 |
full output. |
| 1288 |
|
| 1289 |
\begin{figure}[htb] |
| 1290 |
{\small \begin{center} \begin{boxedverbatim} |
| 1291 |
demo('ab') |
| 1292 |
ab = load(equation='ab') |
| 1293 |
ab = load(ab, constants='ab.1') |
| 1294 |
run(ab) |
| 1295 |
\end{boxedverbatim} |
| 1296 |
\end{center} |
| 1297 |
} |
| 1298 |
\caption[First example of a \AUTO CLUI script.] |
| 1299 |
{The commands from Figure~\ref{exa:clui_first_example} |
| 1300 |
and they would appear in a \AUTO CLUI script file. |
| 1301 |
The source for this script can be found in \filef{\$AUTO\_DIR/demos/python/demo1.auto}. |
| 1302 |
} |
| 1303 |
\label{exa:clui_first_script} |
| 1304 |
\end{figure} |
| 1305 |
|
| 1306 |
\begin{figure}[htb] |
| 1307 |
{\small \begin{center} \begin{boxedverbatim} |
| 1308 |
> cat demo1.auto |
| 1309 |
demo('ab') |
| 1310 |
ab = load(equation='ab') |
| 1311 |
ab = load(ab, constants='ab.1') |
| 1312 |
run(ab) |
| 1313 |
|
| 1314 |
> auto demo1.auto |
| 1315 |
Copying demo ab ... done |
| 1316 |
Runner configured |
| 1317 |
Runner configured |
| 1318 |
Runner configured |
| 1319 |
gfortran -fopenmp -O -c ab.f90 -o ab.o |
| 1320 |
gfortran -fopenmp -O ab.o -o ab.exe /home/bart/auto/07p/lib/*.o |
| 1321 |
Starting ab ... |
| 1322 |
|
| 1323 |
BR PT TY LAB PAR(2) L2-NORM U(1) U(2) |
| 1324 |
1 1 EP 1 8.00000E+00 0.00000E+00 0.00000E+00 0.00000E+00 |
| 1325 |
1 31 UZ 2 1.40000E+01 0.00000E+00 0.00000E+00 0.00000E+00 |
| 1326 |
1 36 UZ 3 1.50000E+01 0.00000E+00 0.00000E+00 0.00000E+00 |
| 1327 |
1 41 UZ 4 1.60000E+01 0.00000E+00 0.00000E+00 0.00000E+00 |
| 1328 |
1 46 UZ 5 1.70000E+01 0.00000E+00 0.00000E+00 0.00000E+00 |
| 1329 |
1 51 EP 6 1.80000E+01 0.00000E+00 0.00000E+00 0.00000E+00 |
| 1330 |
|
| 1331 |
Total Time 0.193E-01 |
| 1332 |
ab ... done |
| 1333 |
> |
| 1334 |
\end{boxedverbatim} |
| 1335 |
\end{center} |
| 1336 |
} |
| 1337 |
\caption[Figure of running a simple \AUTO CLUI script.] |
| 1338 |
{This Figure starts by listing the contents |
| 1339 |
of the \filef{demo1.auto} file using the Unix |
| 1340 |
\commandf{cat} command. The file is then run through |
| 1341 |
the \AUTO CLUI by typing {auto demo1.auto} |
| 1342 |
and the output is shown.} |
| 1343 |
\label{exa:clui_run_first_script} |
| 1344 |
\end{figure} |
| 1345 |
|
| 1346 |
|
| 1347 |
\section{ Second Example } \label{sec:clui_complex_example} |
| 1348 |
|
| 1349 |
In Section~\ref{sec:clui_first_example} we showed a very simple |
| 1350 |
\AUTO CLUI script, in this Section we will describe a more |
| 1351 |
complex example, which introduces several new \AUTO CLUI |
| 1352 |
commands as well as a basic \python construct for looping. |
| 1353 |
We will not provide an exhaustive reference for |
| 1354 |
the \python language, but only |
| 1355 |
the very basics. For more extensive documentation we refer the |
| 1356 |
reader to \citename{Lut:96} \citeyear{Lut:96} or the |
| 1357 |
web page \url{http://www.python.org}. |
| 1358 |
In this section we will describe each line of the script |
| 1359 |
in detail, and the full text of the script is in |
| 1360 |
Figure~\ref{exa:clui_complex_script}. |
| 1361 |
|
| 1362 |
\begin{figure}[htbp] |
| 1363 |
{\small \begin{center} \begin{boxedverbatim} |
| 1364 |
demo('bvp') |
| 1365 |
|
| 1366 |
bvp = run('bvp') |
| 1367 |
branchpoints = bvp("BP") |
| 1368 |
for solution in branchpoints: |
| 1369 |
bp = load(solution, ISW=-1, NTST=50) |
| 1370 |
# Compute forwards |
| 1371 |
print "Solution label", bp["LAB"], "forwards" |
| 1372 |
fw = run(bp) |
| 1373 |
# Compute backwards |
| 1374 |
print "Solution label", bp["LAB"], "backwards" |
| 1375 |
bw = run(bp,DS='-') |
| 1376 |
both = fw + bw |
| 1377 |
merged = merge(both) |
| 1378 |
bvp = bvp + merged |
| 1379 |
|
| 1380 |
bvp=relabel(bvp) |
| 1381 |
save(bvp, 'bvp') |
| 1382 |
plot(bvp) |
| 1383 |
wait() |
| 1384 |
\end{boxedverbatim} |
| 1385 |
\end{center} |
| 1386 |
} |
| 1387 |
\caption[A complex example of a \AUTO CLUI script.] |
| 1388 |
{This Figure shows a more complex \AUTO CLUI script. |
| 1389 |
The source for this script can be found in \filef{\$AUTO\_DIR/demos/python/demo2.auto}. |
| 1390 |
} |
| 1391 |
\label{exa:clui_complex_script} |
| 1392 |
\end{figure} |
| 1393 |
|
| 1394 |
The script begins with a section, extracted into |
| 1395 |
Figure~\ref{exa:clui_complex_first}, which performs a task |
| 1396 |
identical to that shown in Figure~\ref{exa:clui_first_example} |
| 1397 |
except that the shorthand discussed in |
| 1398 |
Section~\ref{sec:clui_first_example} is used for the |
| 1399 |
\commandf{run} command. |
| 1400 |
|
| 1401 |
\begin{figure}[htbp] |
| 1402 |
{\small \begin{center} \begin{boxedverbatim} |
| 1403 |
demo('bvp') |
| 1404 |
|
| 1405 |
bvp = run('bvp') |
| 1406 |
\end{boxedverbatim} |
| 1407 |
\end{center} |
| 1408 |
} |
| 1409 |
\caption[The first part of the complex \AUTO CLUI script.] |
| 1410 |
{The first part of the complex \AUTO CLUI script.} |
| 1411 |
\label{exa:clui_complex_first} |
| 1412 |
\end{figure} |
| 1413 |
|
| 1414 |
Up to this point all of the commands presented have had |
| 1415 |
analogs in the command language discussed in |
| 1416 |
Section~\ref{sec:command_mode}, and the \AUTO CLUI has |
| 1417 |
been designed in this way to make it easy for users to |
| 1418 |
migrate from the old command language to the |
| 1419 |
\AUTO CLUI. The next section of the script extracted into |
| 1420 |
Figure~\ref{exa:clui_complex_first}, introduces a new |
| 1421 |
command, namely \commandf{branchpoints = bvp("BP")}, |
| 1422 |
which is the first command which has no analog in the |
| 1423 |
old command language. |
| 1424 |
The command \commandf{bvp("BP")}, given the output variable \commandf{bvp} |
| 1425 |
from the first run, returns a \python object which represents a list |
| 1426 |
of all branchpoint solutions. |
| 1427 |
Accordingly, this list is stored in the \python |
| 1428 |
variable \commandf{branchpoints}. |
| 1429 |
Note, variables in \python are different from those in languages |
| 1430 |
such as {\cal C} in that their type does not have to be |
| 1431 |
declared before they are created. |
| 1432 |
|
| 1433 |
\begin{figure}[htbp] |
| 1434 |
{\small \begin{center} \begin{boxedverbatim} |
| 1435 |
branchpoints = bvp("BP") |
| 1436 |
for solution in branchpoints: |
| 1437 |
bp = load(solution, ISW=-1, NTST=50) |
| 1438 |
# Compute forwards |
| 1439 |
print "Solution label", bp["LAB"], "forwards" |
| 1440 |
fw = run(bp) |
| 1441 |
# Compute backwards |
| 1442 |
print "Solution label", bp["LAB"], "backwards" |
| 1443 |
bw = run(bp,DS='-') |
| 1444 |
both = fw + bw |
| 1445 |
merged = merge(both) |
| 1446 |
bvp = bvp + merged |
| 1447 |
\end{boxedverbatim} |
| 1448 |
\end{center} |
| 1449 |
} |
| 1450 |
\caption[The second part of the complex \AUTO CLUI script.] |
| 1451 |
{The second part of the complex \AUTO CLUI script.} |
| 1452 |
\label{exa:clui_complex_second} |
| 1453 |
\end{figure} |
| 1454 |
|
| 1455 |
The next command, \commandf{for solution in branchpoints:} is |
| 1456 |
the \python syntax for loops. The \commandf{branchpoints} object |
| 1457 |
is a list of the branch point solutions from the first run. |
| 1458 |
The command |
| 1459 |
\commandf{for solution in branchpoints:} is used to loop |
| 1460 |
over all solutions in the branchpoints variable by |
| 1461 |
setting the variable \commandf{solution} to |
| 1462 |
be one of the solutions in \commandf{branchpoints} |
| 1463 |
and then calling the rest of the code in the |
| 1464 |
block. |
| 1465 |
|
| 1466 |
\python differs from most other computer languages in that |
| 1467 |
blocks of code are not defined by some delimiter, such |
| 1468 |
as \commandf{END DO} in {\cal Fortran}, but by indentation. |
| 1469 |
In Figure~\ref{exa:clui_complex_script} the commands starting with |
| 1470 |
\commandf{bvp=relabel(bvp)} are not |
| 1471 |
part of the loop, because they are indented |
| 1472 |
differently. This can be confusing first time users of \python, |
| 1473 |
but it has the advantage that the code |
| 1474 |
is forced to have a consistent indentation style. |
| 1475 |
|
| 1476 |
The next command in the script, |
| 1477 |
\commandf{bp = load(solution, ISW=-1, NTST=50)} |
| 1478 |
loads a solution with modified AUTO constants. All other constants are |
| 1479 |
the same as they were in the first run. |
| 1480 |
The \parf{ISW} value is changed to \parf{-1} (see |
| 1481 |
Section~\ref{sec:ISW}), so that a branch switch is performed, and |
| 1482 |
the \parf{NTST} value is changed to \parf{50} (see |
| 1483 |
Section~\ref{sec:NTST}). |
| 1484 |
Only ``in memory'' versions of the \AUTO constants are modified; |
| 1485 |
the original file \filef{c.bvp} is \emp{not} modified. |
| 1486 |
|
| 1487 |
Some diagnostics are then printed to the screen using a standard \python |
| 1488 |
\commandf{print} command: the label number of the branch point that |
| 1489 |
we switch at can be found by using \commandf{bp["LAB"]}. |
| 1490 |
In addition, as can be seen in Figure~\ref{exa:clui_complex_second}, |
| 1491 |
the \commandf{\#} character is the \python comment character. |
| 1492 |
When the \python interpretor encounters a \commandf{\#} character |
| 1493 |
it ignores everything from that character to the end of the line. |
| 1494 |
|
| 1495 |
We then use a \commandf{fw=run(bp)} command to perform the |
| 1496 |
calculation of the bifurcating branch from solution \commandf{bp}. |
| 1497 |
We print additional information and use the command |
| 1498 |
\commandf{bw = run(bp,DS='-')} to change the |
| 1499 |
\AUTO initial step size from positive to negative, which causes |
| 1500 |
\AUTO to compute the bifurcating branch in the other direction |
| 1501 |
(see Section~\ref{sec:DS}). |
| 1502 |
This output is appended to the existing output in the |
| 1503 |
\python variable \commandf{bvp} after some more processing. |
| 1504 |
First the command |
| 1505 |
\commandf{both = fw + bw} concatenates, using standard Python list |
| 1506 |
syntax, the forwards and backwards branches. Subsequently |
| 1507 |
\commandf{merged = merge(both)} merges the two branches into one |
| 1508 |
continuous branch where the backwards branch is flipped. |
| 1509 |
Finally, the command \commandf{bvp = bvp + merged} appends the |
| 1510 |
merged branch to the existing results. |
| 1511 |
|
| 1512 |
\begin{figure}[htbp] |
| 1513 |
{\small \begin{center} \begin{boxedverbatim} |
| 1514 |
bvp=relabel(bvp) |
| 1515 |
save(bvp, 'bvp') |
| 1516 |
plot(bvp) |
| 1517 |
wait() |
| 1518 |
\end{boxedverbatim} |
| 1519 |
\end{center} |
| 1520 |
} |
| 1521 |
\caption[The third part of the complex \AUTO CLUI script.] |
| 1522 |
{The third part of the complex \AUTO CLUI script.} |
| 1523 |
\label{exa:clui_complex_third} |
| 1524 |
\end{figure} |
| 1525 |
|
| 1526 |
The last section of the script, extracted into |
| 1527 |
Figure~\ref{exa:clui_complex_third}, |
| 1528 |
does some postprocessing and |
| 1529 |
plotting. First, the command \commandf{bvp=relabel(bvp)} relabels |
| 1530 |
so all solutions in the \commandf{bvp} object have unique labels |
| 1531 |
starting at 1. The command \commandf{save(bvp,'bvp')} |
| 1532 |
(Section~\ref{sec:clui_ref_basic} in the reference) |
| 1533 |
saves the results of the \AUTO runs into files using |
| 1534 |
the base name \filef{bvp} and the filename extensions in |
| 1535 |
Table~\ref{tbl:clui_filename_translation}. For example, |
| 1536 |
in this case the bifurcation diagram will be saved as \filef{b.bvp}, |
| 1537 |
the solution will be saved as \filef{s.bvp}, and |
| 1538 |
the diagnostics will be saved as \filef{d.bvp}. |
| 1539 |
|
| 1540 |
Now that the section of script shown in |
| 1541 |
Figure~\ref{exa:clui_complex_third} has finished computing the |
| 1542 |
bifurcation diagram, the command \commandf{plot(bvp)} |
| 1543 |
brings up a plotting window |
| 1544 |
(Section~\ref{sec:clui_ref_plot} in the reference), |
| 1545 |
and the command \commandf{wait()} causes the \AUTO CLUI |
| 1546 |
to wait for input. You may now exit the \AUTO CLUI |
| 1547 |
by pressing any key in the window in which you started |
| 1548 |
the \AUTO CLUI. |
| 1549 |
|
| 1550 |
For convenience, some of these commands have shorter forms. |
| 1551 |
For instance, the \commandf{load}, \commandf{run}, \commandf{merge}, |
| 1552 |
\commandf{relabel}, \commandf{save}, and \commandf{plot} commands |
| 1553 |
have the shorter forms \commandf{ld}, \commandf{r}, \commandf{mb}, |
| 1554 |
\commandf{rl}, \commandf{sv}, and \commandf{pl}, respectively. |
| 1555 |
All algebraic and functional expressions can be combined in the |
| 1556 |
usual way. Combining these techniques, a shorter version of the complex \AUTO |
| 1557 |
CLUI script is given in Figure~\ref{exa:clui_complex_fourth}. |
| 1558 |
|
| 1559 |
\begin{figure}[htbp] |
| 1560 |
{\small \begin{center} \begin{boxedverbatim} |
| 1561 |
demo('bvp') |
| 1562 |
|
| 1563 |
bvp=r('bvp') |
| 1564 |
for solution in bvp('BP'): |
| 1565 |
bp = ld(solution,NTST=50,ISW=-1) |
| 1566 |
# Compute forwards and backwards |
| 1567 |
bvp = bvp + mb(r(bp)+r(bp,DS='-')) |
| 1568 |
|
| 1569 |
bvp=rl(bvp) |
| 1570 |
pl(bvp) |
| 1571 |
sv(bvp,'bvp') |
| 1572 |
wait() |
| 1573 |
\end{boxedverbatim} |
| 1574 |
\end{center} |
| 1575 |
} |
| 1576 |
\caption[A complex example of a \AUTO CLUI script.] |
| 1577 |
{This Figure shows a shorter version of the more complex \AUTO CLUI |
| 1578 |
script given above. |
| 1579 |
The source for this script can be found in \filef{\$AUTO\_DIR/demos/python/demo3.auto}. |
| 1580 |
} |
| 1581 |
\label{exa:clui_complex_fourth} |
| 1582 |
\end{figure} |
| 1583 |
|
| 1584 |
Even shorter forms are possible to save you typing using features |
| 1585 |
borrowed from ipython, both in \commandf{auto -i} and in plain |
| 1586 |
\commandf{auto}. Those forms use auto-parentheses and auto-quotes: |
| 1587 |
for a command that does not assign to a variable you can skip the |
| 1588 |
parentheses, and by using a ``,'' on the first character of a line |
| 1589 |
you force all parameters to be quoted. For example, you can just |
| 1590 |
type \commandf{pl bvp} to plot the bifurcation diagram and solutions |
| 1591 |
in the object \commandf{bvp}. |
| 1592 |
Beware that these extra short forms are only possible in |
| 1593 |
normal auto scripts and at the AUTO CLUI prompt, and only if they |
| 1594 |
start in the first column, but not in the |
| 1595 |
``expert'' scripts described in the next section. |
| 1596 |
The even shorter version of the complex \AUTO |
| 1597 |
CLUI script is given in Figure~\ref{exa:clui_complex_fifth}. |
| 1598 |
It should be clear that these super-short forms save you typing |
| 1599 |
at the command prompt but do not help readability in scripts. |
| 1600 |
\begin{figure}[htbp] |
| 1601 |
{\small \begin{center} \begin{boxedverbatim} |
| 1602 |
,demo bvp |
| 1603 |
|
| 1604 |
bvp=r('bvp') |
| 1605 |
for solution in bvp('BP'): |
| 1606 |
bp = ld(solution,NTST=50,ISW=-1) |
| 1607 |
# Compute forwards and backwards |
| 1608 |
bvp = bvp + mb(r(bp)+r(bp,DS='-')) |
| 1609 |
|
| 1610 |
bvp=rl(bvp) |
| 1611 |
pl bvp |
| 1612 |
sv bvp, 'bvp' |
| 1613 |
wait |
| 1614 |
\end{boxedverbatim} |
| 1615 |
\end{center} |
| 1616 |
} |
| 1617 |
\caption[Another complex example of a \AUTO CLUI script.] |
| 1618 |
{This Figure shows an even shorter version of the more complex \AUTO CLUI |
| 1619 |
script given above. |
| 1620 |
The source for this script can be found in \filef{\$AUTO\_DIR/demos/python/demo4.auto}. |
| 1621 |
} |
| 1622 |
\label{exa:clui_complex_fifth} |
| 1623 |
\end{figure} |
| 1624 |
|
| 1625 |
|
| 1626 |
|
| 1627 |
\section{ Extending the \AUTO CLUI } \label{sec:clui_extending} |
| 1628 |
|
| 1629 |
The code in Figure~\ref{exa:clui_complex_script} |
| 1630 |
performed a very useful and common procedure, it started an \AUTO |
| 1631 |
calculation and performed additional continuations |
| 1632 |
at every point which \AUTO detected as a bifurcation. |
| 1633 |
Unfortunately, the script as written can only be used |
| 1634 |
for the \filef{bvp} demo. In this section we will |
| 1635 |
generalize the script in Figure~\ref{exa:clui_complex_script} |
| 1636 |
for use with any demo, and demonstrate how it |
| 1637 |
can be imported back into the interactive |
| 1638 |
mode to create a new command |
| 1639 |
for the \AUTO CLUI. Several examples of such |
| 1640 |
``expert'' scripts can be found in \filef{auto/07p/demos/python/n-body}. |
| 1641 |
|
| 1642 |
Just as loops and conditionals can be used in \python, |
| 1643 |
one can also define functions. For example, |
| 1644 |
Figure~\ref{exa:clui_complex_function} is a |
| 1645 |
functional version of script from |
| 1646 |
Figure~\ref{exa:clui_complex_script}. |
| 1647 |
The changes are actually quite minor. |
| 1648 |
The first line, \commandf{from auto import *}, |
| 1649 |
includes the definitions of the \AUTO CLUI commands, |
| 1650 |
and must be included in all \AUTO CLUI scripts |
| 1651 |
which define functions. |
| 1652 |
The next line, |
| 1653 |
\commandf{def myRun(demoname):}, |
| 1654 |
begins the function definition, and |
| 1655 |
creates a function named \commandf{myRun} which |
| 1656 |
takes one argument \commandf{demoname}. The |
| 1657 |
rest of the script is the same except that it |
| 1658 |
has been indented to indicate that it is |
| 1659 |
part of the function definition, all occurrences |
| 1660 |
of string \commandf{'bvp'} have been replaced |
| 1661 |
with the variable \commandf{demoname}, and the variable |
| 1662 |
\commandf{bvp} was replaced by the variable \commandf{r}. |
| 1663 |
Finally we have added a line \commandf{myRun('bvp')} |
| 1664 |
which actually calls the function we have |
| 1665 |
created and runs the same computation as |
| 1666 |
the original script. |
| 1667 |
|
| 1668 |
\begin{figure}[htbp] |
| 1669 |
{\small \begin{center} \begin{boxedverbatim} |
| 1670 |
from auto import * |
| 1671 |
|
| 1672 |
def myRun(demoname): |
| 1673 |
|
| 1674 |
demo(demoname) |
| 1675 |
|
| 1676 |
r = run(demoname) |
| 1677 |
branchpoints = r("BP") |
| 1678 |
for solution in branchpoints: |
| 1679 |
bp = load(solution, ISW=-1, NTST=50) |
| 1680 |
# Compute forwards |
| 1681 |
print "Solution label", bp["LAB"], "forwards" |
| 1682 |
fw = run(bp) |
| 1683 |
# Compute backwards |
| 1684 |
print "Solution label", bp["LAB"], "backwards" |
| 1685 |
bw = run(bp,DS='-') |
| 1686 |
both = fw + bw |
| 1687 |
merged = merge(both) |
| 1688 |
r = r + merged |
| 1689 |
|
| 1690 |
r=relabel(r) |
| 1691 |
save(r, demoname) |
| 1692 |
plot(r) |
| 1693 |
wait() |
| 1694 |
|
| 1695 |
myRun('bvp') |
| 1696 |
|
| 1697 |
\end{boxedverbatim} |
| 1698 |
\end{center} |
| 1699 |
} |
| 1700 |
\caption[A complex \AUTO CLUI script as a function.] |
| 1701 |
{This Figure shows a complex \AUTO CLUI script |
| 1702 |
written as a function. |
| 1703 |
The source for this script can be found in \filef{\$AUTO\_DIR/demos/python/userScript.xauto}. |
| 1704 |
} |
| 1705 |
\label{exa:clui_complex_function} |
| 1706 |
\end{figure} |
| 1707 |
|
| 1708 |
While the script in Figure~\ref{exa:clui_complex_function} is |
| 1709 |
only slightly different then the one showed in |
| 1710 |
Figure~\ref{exa:clui_complex_script} it is much more powerful. |
| 1711 |
Not only can it be used as a script for running any demo |
| 1712 |
by modifying the last line, it can be read back into |
| 1713 |
the interactive mode of the \AUTO CLUI and |
| 1714 |
used to create a new command, |
| 1715 |
as in Figure~\ref{exa:clui_complex_interactive}. |
| 1716 |
First, we create a file called \filef{userScript.py} |
| 1717 |
which contains the script from |
| 1718 |
Figure~\ref{exa:clui_complex_function}, with |
| 1719 |
one minor modification. We want the function only |
| 1720 |
to run when we use it interactively, not when |
| 1721 |
the file \filef{userScript.py} is read in, so we |
| 1722 |
remove the last line where the function is called. |
| 1723 |
We start the \AUTO CLUI with the Unix command |
| 1724 |
\commandf{auto}, and once the \AUTO CLUI is running |
| 1725 |
we use the command \commandf{from userScript import *}, |
| 1726 |
to import the file \filef{userScript.py} into the |
| 1727 |
\AUTO CLUI. The \commandf{import} command makes |
| 1728 |
all functions in that file available for |
| 1729 |
our use (in this case \commandf{myRun} is the only |
| 1730 |
one). It is important to note that |
| 1731 |
\commandf{from userScript import *} does \emp{not} |
| 1732 |
use the \filef{.py} extension on the file name. |
| 1733 |
After importing our new function, we may use it |
| 1734 |
just like any other function in the \AUTO |
| 1735 |
CLUI, for example by typing \commandf{myRun('bvp')}. |
| 1736 |
|
| 1737 |
\begin{figure}[htbp] |
| 1738 |
{\small \begin{center} \begin{boxedverbatim} |
| 1739 |
> cp \$AUTO\_DIR/python/demo/userScript.py . |
| 1740 |
> ls |
| 1741 |
userScript.py |
| 1742 |
> cat userScript.py |
| 1743 |
# This is an example script for the AUTO07p command line user |
| 1744 |
# interface. See the "Command Line User Interface" chapter in the |
| 1745 |
# manual for more details. |
| 1746 |
from auto import * |
| 1747 |
|
| 1748 |
def myRun(demoname): |
| 1749 |
|
| 1750 |
demo(demoname) |
| 1751 |
|
| 1752 |
r = run(demoname) |
| 1753 |
branchpoints = r("BP") |
| 1754 |
for solution in branchpoints: |
| 1755 |
bp = load(solution, ISW=-1, NTST=50) |
| 1756 |
# Compute forwards |
| 1757 |
print "Solution label", bp["LAB"], "forwards" |
| 1758 |
fw = run(bp) |
| 1759 |
# Compute backwards |
| 1760 |
print "Solution label", bp["LAB"], "backwards" |
| 1761 |
bw = run(bp,DS='-') |
| 1762 |
both = fw + bw |
| 1763 |
merged = merge(both) |
| 1764 |
r = r + merged |
| 1765 |
|
| 1766 |
r=relabel(r) |
| 1767 |
save(r, demoname) |
| 1768 |
plot(r) |
| 1769 |
wait() |
| 1770 |
|
| 1771 |
> auto |
| 1772 |
Python 2.5.2 (r252:60911, Nov 14 2008, 19:46:32) |
| 1773 |
[GCC 4.3.2] on linux2 |
| 1774 |
Type "help", "copyright", "credits" or "license" for more information. |
| 1775 |
(AUTOInteractiveConsole) |
| 1776 |
AUTO> from userScript import * |
| 1777 |
AUTO> myRun('bvp') |
| 1778 |
... |
| 1779 |
\end{boxedverbatim} |
| 1780 |
\end{center} |
| 1781 |
} |
| 1782 |
\caption[An example of using a user created function interactively.] |
| 1783 |
{This Figure shows the functional version of the |
| 1784 |
\AUTO CLUI from Figure~\ref{exa:clui_complex_function} being |
| 1785 |
used as an extension to the \AUTO CLUI. The source |
| 1786 |
code for this script can be found in |
| 1787 |
\filef{\$AUTO\_DIR/python/demo/userScript.py }} |
| 1788 |
\label{exa:clui_complex_interactive} |
| 1789 |
\end{figure} |
| 1790 |
|
| 1791 |
\section{ Bifurcation Diagram Objects} |
| 1792 |
The \commandf{run} and \commandf{loadbd} commands (see |
| 1793 |
Section~\ref{sec:clui_ref_basic} in the reference for details) |
| 1794 |
return a ~\python structure which we refer to as a \emph{bifurcation |
| 1795 |
diagram object}. It represents the information that is also stored |
| 1796 |
in \AUTO's output files (\filef{fort.7}, \filef{fort.8}, |
| 1797 |
and \filef{fort.9}, or \filef{b.*}, \filef{s.*}, and \filef{d.*}), |
| 1798 |
and in \AUTO's constant files. |
| 1799 |
For example, the command \commandf{loadbd('ab')} |
| 1800 |
returns an object corresponding to the files \filef{b.ab}, |
| 1801 |
\filef{s.ab}, and \filef{d.ab}. |
| 1802 |
(if you are using the standard |
| 1803 |
filename translations from Table~\ref{tbl:clui_filename_translation}). |
| 1804 |
The command \commandf{run('ab')} returns |
| 1805 |
an object corresponding to the output of the run. |
| 1806 |
|
| 1807 |
The bifurcation diagram object encapsulates all this information in |
| 1808 |
an easy to use form. |
| 1809 |
This object is a list of all of the branches in the appropriate |
| 1810 |
bifurcation diagram file, and each branch behaves like an array |
| 1811 |
(a PyDSTool Pointset subclass, to be precise). This array can be |
| 1812 |
viewed as a list of all of the points in the appropriate |
| 1813 |
bifurcation diagram file, and each point is a \python |
| 1814 |
dictionary with entries for each piece of data for the point. |
| 1815 |
For example, the sequence of commands |
| 1816 |
in Figure~\ref{exa:clui parse diagram}, prints out the |
| 1817 |
label of the first point of a branch in a bifurcation diagram. |
| 1818 |
The query-able parts of the object are listed in |
| 1819 |
Table~\ref{tbl:clui parse diagram}. |
| 1820 |
|
| 1821 |
The individual elements of the array may be accessed |
| 1822 |
in a number of ways: by index of the point using the |
| 1823 |
\commandf{[]} syntax, a column using \commandf{['columnname']} syntax, |
| 1824 |
or by label number or type name plus one-based index using the |
| 1825 |
\commandf{()} syntax. For example, assume that the parsed object is contained |
| 1826 |
in a variable \commandf{data}, and the first branch is in a variable |
| 1827 |
\commandf{br=data[0]}. |
| 1828 |
The first point may then be accessed |
| 1829 |
using the command \commandf{br[0]}, while the column |
| 1830 |
with label \parf{PAR(1)} may be accessed using the command |
| 1831 |
\commandf{br['PAR(1)']}. |
| 1832 |
The point with label \commandf{57} may be accessed using the command |
| 1833 |
\commandf{br(57)}, and the second Hopf bifurcation point using |
| 1834 |
the command \commandf{br('HB2')} |
| 1835 |
Using the \commandf{()} syntax you can also obtain new lists of |
| 1836 |
points: \commandf{br('HB')} gives a list of all Hopf bifurcation |
| 1837 |
points, \commandf{br([1,4])} gives the points with labels 1 and 4, |
| 1838 |
and \commandf{br(['UZ',4])} gives all user defined points and label |
| 1839 |
4. |
| 1840 |
|
| 1841 |
The \commandf{['columnname']} syntax is especially useful for |
| 1842 |
plotting, as is illustrated in Figure~\ref{exa:bdplot}. Here the |
| 1843 |
\python package matplotlib is directly used to plot a branch. |
| 1844 |
Of course, the command \commandf{plot} may also be used, but |
| 1845 |
sometimes more control may be needed. |
| 1846 |
|
| 1847 |
\begin{figure}[htbp] |
| 1848 |
{\small \begin{center} \begin{boxedverbatim} |
| 1849 |
AUTO> demo('lrz') |
| 1850 |
Copying demo lrz ... done |
| 1851 |
Runner configured |
| 1852 |
AUTO> data=run('lrz') |
| 1853 |
gfortran -fopenmp -O -c lrz.f90 -o lrz.o |
| 1854 |
gfortran -fopenmp -O lrz.o -o lrz.exe /home/bart/auto/07p/lib/*.o |
| 1855 |
Starting lrz ... |
| 1856 |
(...) |
| 1857 |
lrz ... done |
| 1858 |
AUTO> print data |
| 1859 |
|
| 1860 |
BR PT TY LAB rho L2-NORM x y z |
| 1861 |
1 1 EP 1 0.00000E+00 0.00000E+00 0.00000E+00 0.00000E+00 0.00000E+00 |
| 1862 |
1 5 BP 2 1.00000E+00 0.00000E+00 0.00000E+00 0.00000E+00 0.00000E+00 |
| 1863 |
1 13 UZ 3 3.00000E+01 0.00000E+00 0.00000E+00 0.00000E+00 0.00000E+00 |
| 1864 |
|
| 1865 |
BR PT TY LAB rho L2-NORM x y z |
| 1866 |
2 42 HB 4 2.47368E+01 2.62685E+01 7.95602E+00 7.95602E+00 2.37368E+01 |
| 1867 |
2 45 UZ 5 3.00000E+01 3.15542E+01 8.79394E+00 8.79394E+00 2.90000E+01 |
| 1868 |
|
| 1869 |
BR PT TY LAB rho L2-NORM x y z |
| 1870 |
2 42 HB 6 2.47368E+01 2.62685E+01 -7.95602E+00 -7.95602E+00 2.37368E+01 |
| 1871 |
2 45 UZ 7 3.00000E+01 3.15542E+01 -8.79394E+00 -8.79394E+00 2.90000E+01 |
| 1872 |
|
| 1873 |
AUTO> br=data[1] |
| 1874 |
AUTO> print br |
| 1875 |
BR PT TY LAB rho L2-NORM x y z |
| 1876 |
2 42 HB 4 2.47368E+01 2.62685E+01 7.95602E+00 7.95602E+00 2.37368E+01 |
| 1877 |
2 45 UZ 5 3.00000E+01 3.15542E+01 8.79394E+00 8.79394E+00 2.90000E+01 |
| 1878 |
AUTO> print br[0] |
| 1879 |
{'TY number': 0, 'PT': -1, 'BR': 2, 'index': 0, 'section': 0, |
| 1880 |
'data': [0.99999994, 0.0, 0.0, 0.0, 0.0], 'TY name': 'No Label', 'LAB': 0} |
| 1881 |
AUTO> print br['rho'] |
| 1882 |
[ 0.99999994 1.001875 1.00747645 1.01786791 1.03426011 1.05801491 |
| 1883 |
1.08738983 1.12195713 1.16544975 1.21923418 1.28474069 1.36345331 |
| 1884 |
(...) |
| 1885 |
15.15715248 16.76398367 18.53533839 20.48761501 22.63885621 24.73684368 |
| 1886 |
27.10974374 29.72303283 30. ] |
| 1887 |
AUTO> print br(4) |
| 1888 |
BR PT TY LAB ISW NTST NCOL NDIM IPS IPRIV |
| 1889 |
2 42 HB 4 1 1 0 3 1 0 |
| 1890 |
(...) |
| 1891 |
\end{boxedverbatim} |
| 1892 |
\end{center} |
| 1893 |
} |
| 1894 |
\caption[An example of processing a bifurcation diagram of a run.] |
| 1895 |
{This figure shows an example of parsing a bifurcation diagram. |
| 1896 |
First the demo involving the Lorenz equations named 'lrz' is copied |
| 1897 |
and we perform its first run. We then print |
| 1898 |
the result, its second branch, the first point on this branch, |
| 1899 |
the column corresponding to 'rho', and the point with |
| 1900 |
label 4 on this branch. |
| 1901 |
} |
| 1902 |
\label{exa:clui parse diagram} |
| 1903 |
\end{figure} |
| 1904 |
|
| 1905 |
\begin{figure}[htbp] |
| 1906 |
{\small \begin{center} \begin{boxedverbatim} |
| 1907 |
AUTO> import pylab |
| 1908 |
AUTO> pylab.plot(br['rho'],br['x']) |
| 1909 |
[<matplotlib.lines.Line2D object at 0x9b1356c>] |
| 1910 |
AUTO> pylab.show() |
| 1911 |
\end{boxedverbatim} |
| 1912 |
\end{center} |
| 1913 |
} |
| 1914 |
\caption{Following the example in Figure~\ref{exa:clui parse diagram} |
| 1915 |
we can plot a subset of the bifurcation diagram, that is, the second |
| 1916 |
branch, directly using matplotlib.} |
| 1917 |
\label{exa:bdplot} |
| 1918 |
\end{figure} |
| 1919 |
|
| 1920 |
\begin{table}[htbp] |
| 1921 |
\begin{center} |
| 1922 |
\begin{tabular}{| l | l |} |
| 1923 |
\hline |
| 1924 |
Query string & Meaning \\ |
| 1925 |
\hline |
| 1926 |
TY name & The short name for the solution type (see Table~\ref{tbl:clui type translation}). \\ |
| 1927 |
\hline |
| 1928 |
TY number & The number of the solution type (see Table~\ref{tbl:clui type translation}). \\ |
| 1929 |
\hline |
| 1930 |
BR & The branch number. \\ |
| 1931 |
\hline |
| 1932 |
PT & The point number. \\ |
| 1933 |
\hline |
| 1934 |
LAB & The solution label, if any. \\ |
| 1935 |
\hline |
| 1936 |
section & A unique identifier for each branch in a file with multiple branches. \\ |
| 1937 |
\hline |
| 1938 |
data & An array which contains the \AUTO output. \\ |
| 1939 |
\hline |
| 1940 |
\end{tabular} |
| 1941 |
\caption[Contents of a bifurcation diagram object.] |
| 1942 |
{This table shows the strings that can be used to |
| 1943 |
query a bifurcation diagram object and their |
| 1944 |
meanings.} |
| 1945 |
\label{tbl:clui parse diagram} |
| 1946 |
\end{center} |
| 1947 |
\end{table} |
| 1948 |
|
| 1949 |
\begin{table}[htbp] |
| 1950 |
\begin{center} |
| 1951 |
\begin{tabular}{| l | l | l |} |
| 1952 |
\hline |
| 1953 |
Type & Short Name & Number \\ |
| 1954 |
\hline |
| 1955 |
No Label & No Label & \\ |
| 1956 |
\hline |
| 1957 |
Branch point (algebraic problem) & BP & 1 \\ |
| 1958 |
\hline |
| 1959 |
Fold (algebraic problem) & LP & 2 \\ |
| 1960 |
\hline |
| 1961 |
Hopf bifurcation (algebraic problem) & HB & 3 \\ |
| 1962 |
\hline |
| 1963 |
Regular point (every NPR steps) & RG & 4 \\ |
| 1964 |
\hline |
| 1965 |
User requested point & UZ & -4 \\ |
| 1966 |
\hline |
| 1967 |
Fold (ODE) & LP & 5 \\ |
| 1968 |
\hline |
| 1969 |
Bifurcation point (ODE) & BP & 6 \\ |
| 1970 |
\hline |
| 1971 |
Period doubling bifurcation (ODE) & PD & 7 \\ |
| 1972 |
\hline |
| 1973 |
Bifurcation to invariant torus (ODE) & TR & 8 \\ |
| 1974 |
\hline |
| 1975 |
Normal begin or end & EP & 9 \\ |
| 1976 |
\hline |
| 1977 |
Abnormal termination & MX & -9 \\ |
| 1978 |
\hline |
| 1979 |
\end{tabular} |
| 1980 |
\caption[Type translations.] |
| 1981 |
{This table shows the various types of points |
| 1982 |
that can be in solution and bifurcation diagram |
| 1983 |
files, with their short names and numbers.} |
| 1984 |
\label{tbl:clui type translation} |
| 1985 |
\end{center} |
| 1986 |
\end{table} |
| 1987 |
|
| 1988 |
\begin{table}[htbp] |
| 1989 |
\begin{center} |
| 1990 |
\begin{tabular}{| l | l | l |} |
| 1991 |
\hline |
| 1992 |
Type & Short Name & Number \\ |
| 1993 |
\hline |
| 1994 |
Bogdanov-Takens bifurcation (algebraic problem) & BT & -21, -31 \\ |
| 1995 |
\hline |
| 1996 |
Cusp (algebraic problem) & CP & -22 \\ |
| 1997 |
\hline |
| 1998 |
Generalized Hopf bifurcation (algebraic problem) & GH & -32 \\ |
| 1999 |
\hline |
| 2000 |
Zero-Hopf bifurcation (algebraic problem) & ZH & -13, -23, -33 \\ |
| 2001 |
\hline |
| 2002 |
1:1 Resonance bifurcation (ODE, maps) & R1 & -25, -55, -85 \\ |
| 2003 |
\hline |
| 2004 |
1:2 Resonance bifurcation (ODE, maps) & R2 & -76, -86 \\ |
| 2005 |
\hline |
| 2006 |
1:3 Resonance bifurcation (ODE, maps) & R3 & -87 \\ |
| 2007 |
\hline |
| 2008 |
1:4 Resonance bifurcation (ODE, maps) & R4 & -88 \\ |
| 2009 |
\hline |
| 2010 |
Fold-flip bifurcation (maps) & LPD & 28, 78 \\ |
| 2011 |
\hline |
| 2012 |
Fold-torus bifurcation (maps) & LTR & 23, 83 \\ |
| 2013 |
\hline |
| 2014 |
Flip-torus bifurcation (maps) & PTR & 77, 87 \\ |
| 2015 |
\hline |
| 2016 |
Torus-torus bifurcation (maps) & TTR & 88 \\ |
| 2017 |
\hline |
| 2018 |
\end{tabular} |
| 2019 |
\caption[Codimension-two type translations.] |
| 2020 |
{This table shows the various types of codimension-two points |
| 2021 |
as in Table~\ref{tbl:clui type translation}. The absolute value |
| 2022 |
of the number divided by 10 gives the type of the branch on which |
| 2023 |
the codimension-two bifurcation occurs.} |
| 2024 |
\label{tbl:clui codim2 type translation} |
| 2025 |
\end{center} |
| 2026 |
\end{table} |
| 2027 |
|
| 2028 |
Additionally three special keys can be used to query a branch: use |
| 2029 |
\commandf{br['BR']} to obtain the branch number, \commandf{br['TY']} |
| 2030 |
for the branch type, and \commandf{br['TY number']} for the |
| 2031 |
corresponding number. These keys are also useful to change |
| 2032 |
bifurcation diagram files, as is illustrated in |
| 2033 |
Figure~\ref{exa:clui branch management}. Note that you can |
| 2034 |
interactively change branch numbers, solution numbers and delete |
| 2035 |
branches and solutions using the \commandf{@lb} command |
| 2036 |
(see Chapter~\ref{sec:command_mode}). |
| 2037 |
|
| 2038 |
\begin{figure}[htbp] |
| 2039 |
{\small \begin{center} \begin{boxedverbatim} |
| 2040 |
# get and run the ab demo |
| 2041 |
demo('ab') |
| 2042 |
auto('ab.auto') |
| 2043 |
# load data from b.ab, s.ab, and d.ab |
| 2044 |
ab = loadbd('ab') |
| 2045 |
# change the branch number to either 1 or 2 depending on IPS |
| 2046 |
for branch in ab: |
| 2047 |
branch['BR'] = branch.c['IPS'] |
| 2048 |
# delete the last branch |
| 2049 |
del ab[-1] |
| 2050 |
# subtract the first branch from all other branches with respect to PAR(1) |
| 2051 |
ab = subtract(ab, ab, 'PAR(1)') |
| 2052 |
# plot the branches, coloring by branch number |
| 2053 |
plot(ab, coloring_method='branch', color_list='black red') |
| 2054 |
wait() |
| 2055 |
# save data to b.abnew, s.abnew, and d.abnew |
| 2056 |
save(ab, 'abnew') |
| 2057 |
\end{boxedverbatim} |
| 2058 |
\end{center} |
| 2059 |
} |
| 2060 |
\caption{This example shows how to change branch numbers and delete a |
| 2061 |
branch in the 'ab' demo output file. Using |
| 2062 |
the \parf{coloring\_method='branch'} setting you can then give one |
| 2063 |
color to all branches of fixed points and one other color to all |
| 2064 |
branches of periodic orbits. |
| 2065 |
The source for this script can be found in |
| 2066 |
\filef{\$AUTO\_DIR/demos/python/branches.auto}.} |
| 2067 |
\label{exa:clui branch management} |
| 2068 |
\end{figure} |
| 2069 |
|
| 2070 |
\subsection{ Solutions} |
| 2071 |
You can also obtain solutions from a bifurcation diagram structure, |
| 2072 |
by using the \commandf{()} syntax directly on the diagram instead of |
| 2073 |
on individual branches. |
| 2074 |
For example, in the above example the command |
| 2075 |
\commandf{s=data()} |
| 2076 |
returns an object which encapsulates |
| 2077 |
all solutions in a easy to use form. |
| 2078 |
|
| 2079 |
The object returned in this way |
| 2080 |
is a list of all of the solutions in the appropriate |
| 2081 |
bifurcation solution file, and each solution is a Python |
| 2082 |
dictionary with entries for each piece of |
| 2083 |
data for the solution. For example, the sequence of commands |
| 2084 |
in Figure~\ref{exa:clui parse solution}, prints out the |
| 2085 |
label of the first solution in a bifurcation solution. |
| 2086 |
The query-able parts of the object are listed in |
| 2087 |
Table~\ref{tbl:clui parse solution}. |
| 2088 |
|
| 2089 |
\begin{figure}[htbp] |
| 2090 |
{\small \begin{center} \begin{boxedverbatim} |
| 2091 |
AUTO> s=data() |
| 2092 |
AUTO> sol=s[3] #or s(4), data(4), s('HB1'), or data('HB1') |
| 2093 |
AUTO> print sol |
| 2094 |
BR PT TY LAB ISW NTST NCOL NDIM IPS IPRIV |
| 2095 |
2 42 HB 4 1 1 0 3 1 0 |
| 2096 |
Pointset lrz (parameterized) |
| 2097 |
Independent variable: |
| 2098 |
t: [ 0.] |
| 2099 |
Coordinates: |
| 2100 |
U(1): [ 7.95601972] |
| 2101 |
U(2): [ 7.95601972] |
| 2102 |
U(3): [ 23.73684367] |
| 2103 |
Labels by index: Empty |
| 2104 |
Active ICP: [1] |
| 2105 |
rldot: [0.69738311435] |
| 2106 |
udotps: Pointset lrz (non-parameterized) |
| 2107 |
Coordinates: |
| 2108 |
UDOT(1): [ 0.11686228] |
| 2109 |
UDOT(2): [ 0.11686228] |
| 2110 |
UDOT(3): [ 0.69738311] |
| 2111 |
Labels by index: Empty |
| 2112 |
PAR(1:5): 2.4736843668E+01 2.6666666667E+00 1.0000000000E+01 0 0 |
| 2113 |
PAR(6:10): 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0 0 |
| 2114 |
PAR(11:11): 6.5283032822E-01 |
| 2115 |
AUTO> print sol['LAB'] |
| 2116 |
4 |
| 2117 |
AUTO> print sol['L2-NORM'] # or sol.b['L2-NORM'] |
| 2118 |
26.268502943 |
| 2119 |
AUTO> sol[0] |
| 2120 |
{'u': [7.9560197197999996, 7.9560197197999996, 23.736843667999999], |
| 2121 |
't': 0.0, 'u dot': [0.11686227712, 0.11686227712, 0.69738311435]} |
| 2122 |
AUTO> sol['t'] |
| 2123 |
array([ 0.]) |
| 2124 |
AUTO> sol['U(1)'] |
| 2125 |
array([ 7.95601972]) |
| 2126 |
AUTO> sol.PAR(1) # or sol['PAR(1)'] |
| 2127 |
24.736843667999999 |
| 2128 |
AUTO> pylab.plot(sol['U(1)'],sol['U(2)'],'+') |
| 2129 |
[<matplotlib.lines.Line2D object at 0x9c3348c>] |
| 2130 |
AUTO> pylab.show() |
| 2131 |
\end{boxedverbatim} |
| 2132 |
\end{center} |
| 2133 |
} |
| 2134 |
\caption[An example of parsing solutions.] |
| 2135 |
{This figure shows an example of parsing solutions. |
| 2136 |
The first command, \commandf{s=data()}, extracts a list of all solutions |
| 2137 |
stored in the bifurcation diagram object \commandf{data} from the |
| 2138 |
'lrz' demo in Figure~\ref{exa:clui parse diagram} |
| 2139 |
and puts it into the variable \commandf{s}. |
| 2140 |
The command \commandf{sol=s[3]} obtains the fourth solution. |
| 2141 |
Next, \commandf{print sol} displays it. |
| 2142 |
The last commands illustrate how to extract components from |
| 2143 |
this fourth solution: its label, its first point, its time array, its first |
| 2144 |
coordinate array, its first parameter, and a plot of the first two |
| 2145 |
coordinates. |
| 2146 |
} |
| 2147 |
\label{exa:clui parse solution} |
| 2148 |
\end{figure} |
| 2149 |
|
| 2150 |
\begin{table}[htbp] |
| 2151 |
\begin{center} |
| 2152 |
\begin{tabular}{| l | l |} |
| 2153 |
\hline |
| 2154 |
Query string & Meaning \\ |
| 2155 |
\hline |
| 2156 |
data & \begin{minipage}{4in} \smallskip An array which contains the |
| 2157 |
\AUTO output. Each array entry is a Python dictionary with a scalar |
| 2158 |
entry 't' denoting time, |
| 2159 |
and sub-arrays for the solution vector 'u' and the solution |
| 2160 |
direction vector 'u dot'.\\ |
| 2161 |
Other syntax: \commandf{s[0]}, \commandf{s['t']}, \commandf{s['U(1)']}. |
| 2162 |
\smallskip \end{minipage} \\ |
| 2163 |
\hline |
| 2164 |
BR & \begin{minipage}{4in} \smallskip The number of the branch to which the solution belongs. \smallskip \end{minipage} \\ |
| 2165 |
\hline |
| 2166 |
IPRIV & \begin{minipage}{4in} \smallskip A private field for use by |
| 2167 |
toolboxes. \smallskip \end{minipage} \\ |
| 2168 |
\hline |
| 2169 |
IPS & \begin{minipage}{4in} \smallskip The user-specified problem type. See Section~\ref{sec:IPS}. \smallskip \end{minipage} \\ |
| 2170 |
\hline |
| 2171 |
ISW & \begin{minipage}{4in} \smallskip The ISW value used to start the calculation. See Section~\ref{sec:ISW}. \smallskip \end{minipage} \\ |
| 2172 |
\hline |
| 2173 |
LAB & \begin{minipage}{4in} \smallskip The label of the solution. \smallskip \end{minipage} \\ |
| 2174 |
\hline |
| 2175 |
NCOL & \begin{minipage}{4in} \smallskip The number of collocation points used to compute the solution. See Section~\ref{sec:NCOL}. \smallskip \end{minipage} \\ |
| 2176 |
\hline |
| 2177 |
NDIM & \begin{minipage}{4in} \smallskip The user-specified number of dimensions. See Section~\ref{sec:NDIM}. \smallskip \end{minipage} \\ |
| 2178 |
\hline |
| 2179 |
NTST & \begin{minipage}{4in} \smallskip The number of mesh intervals used to compute the solution. See Section~\ref{sec:NTST}. \smallskip \end{minipage} \\ |
| 2180 |
\hline |
| 2181 |
Parameters & \begin{minipage}{4in} \smallskip The value of all of the parameters for the solution. \smallskip \end{minipage} \\ |
| 2182 |
parameters & \begin{minipage}{4in} \smallskip 'p' and 'parameters' are aliases.\end{minipage} \\ |
| 2183 |
p & \begin{minipage}{4in} \smallskip Other syntax: \commandf{s.PAR(1)}, \commandf{s['PAR(1)']} \smallskip \end{minipage} \\ |
| 2184 |
\hline |
| 2185 |
PT & \begin{minipage}{4in} \smallskip The number of the point in the given branch. \smallskip \end{minipage} \\ |
| 2186 |
\hline |
| 2187 |
TY & \begin{minipage}{4in} \smallskip A short string which describes the type of the solution (see Table~\ref{tbl:clui type translation}). \smallskip \end{minipage} \\ |
| 2188 |
\hline |
| 2189 |
TY number & \begin{minipage}{4in} \smallskip A number which describes the type of the solution (see Table~\ref{tbl:clui type translation}). \smallskip \end{minipage} \\ |
| 2190 |
\hline |
| 2191 |
Active ICP & \begin{minipage}{4in} \smallskip |
| 2192 |
The values of the (one-based) indices of the free parameters. |
| 2193 |
\smallskip \end{minipage} \\ |
| 2194 |
\hline |
| 2195 |
rldot & \begin{minipage}{4in} \smallskip The values |
| 2196 |
of the parameter direction vector.\smallskip \end{minipage} \\ |
| 2197 |
\hline |
| 2198 |
\end{tabular} |
| 2199 |
\caption[Contents of a solution object.] |
| 2200 |
{This table shows the strings that can be used to |
| 2201 |
query a solution object and their |
| 2202 |
meanings.} |
| 2203 |
\label{tbl:clui parse solution} |
| 2204 |
\end{center} |
| 2205 |
\end{table} |
| 2206 |
|
| 2207 |
The individual elements of the list may, again, be accessed |
| 2208 |
in two ways, either by the index of the solution using the |
| 2209 |
\commandf{[]} syntax or by label number or type name using the |
| 2210 |
\commandf{()} syntax. For example, assume that the parsed object is contained |
| 2211 |
in a variable \commandf{s=data()}. |
| 2212 |
The first solution may be accessed |
| 2213 |
using the command \commandf{s[0]}, while the solution with |
| 2214 |
label \commandf{57} may be accessed using the command \commandf{s(57)}. |
| 2215 |
|
| 2216 |
Individual solutions can be also be obtained directly from the |
| 2217 |
bifurcation diagram object \commandf{data} in the same way as for |
| 2218 |
individual points above, by using \commandf{s=data(label)}. |
| 2219 |
For example, the solution with label \commandf{57} may be accessed |
| 2220 |
using the command |
| 2221 |
\commandf{data(57)}, and the second Hopf bifurcation solution using |
| 2222 |
the command \commandf{data('HB2')}. |
| 2223 |
All individual solutions can then be used as a starting point for a new run. |
| 2224 |
|
| 2225 |
Similarly, using the \commandf{()} syntax you can also obtain new lists of |
| 2226 |
solutions: \commandf{data('HB')} gives a list of all Hopf bifurcation |
| 2227 |
solutions, \commandf{data([1,4])} gives the solutions with labels 1 and 4, |
| 2228 |
and \commandf{data(['UZ',4])} gives all user defined solutions and |
| 2229 |
label 4. A for loop can then iterate through the list and provide new |
| 2230 |
starting solutions. |
| 2231 |
|
| 2232 |
Solutions can be deleted using the commands \commandf{dlb}, |
| 2233 |
\commandf{dsp}, \commandf{klb}, and \commandf{ksp}, described in |
| 2234 |
the reference, Section~\ref{sec:clui_ref_filemaint}. The command |
| 2235 |
\commandf{relabel}, as described before, gives each solution a unique |
| 2236 |
label starting at 1. Finally, you can change individual solution |
| 2237 |
labels using the \commandf{relabel} \emph{method}: |
| 2238 |
\commandf{data.relabel(9, 57)} relabels label 9 to label 57, making |
| 2239 |
sure that the label changes both in the bifurcation diagram and in |
| 2240 |
the solution. |
| 2241 |
|
| 2242 |
\subsection{Summary and reference} |
| 2243 |
We have defined the following objects: |
| 2244 |
\begin{description} |
| 2245 |
\item[Bifurcation diagram object]: |
| 2246 |
\commandf{bd=run(...)}, \commandf{bd=loadbd(...)}. |
| 2247 |
\item[Branch]: |
| 2248 |
\commandf{bd[0], bd[1], bd[2], ...}. |
| 2249 |
\item[Branch AUTO constants]: |
| 2250 |
\commandf{bd[0].c, bd[1].c, bd[2].c, ...}.\\ |
| 2251 |
\commandf{bd.c} refers to \commandf{bd[0].c}. |
| 2252 |
\item[Branch column]: |
| 2253 |
\commandf{bd['PAR(1')], bd[0]['PAR(1)'], bd[1]['L2-NORM'], ...}.\\ |
| 2254 |
Here \commandf{bd['PAR(1)']} is a shortcut for \commandf{bd[0]['PAR(1)']}. |
| 2255 |
\item[Point]: |
| 2256 |
\commandf{bd[0][0], bd[1](5), bd[1]('UZ1'), bd(1).b, bd('UZ1').b, ...}. |
| 2257 |
\item[Point list]: |
| 2258 |
\commandf{bd[0]('UZ'), bd[0]([1,2]), bd[0](['UZ','HB1',7]), ...}. |
| 2259 |
\item[Solution]: |
| 2260 |
\commandf{bd(5), bd('UZ1'), bd()[0], ...}. |
| 2261 |
\item[Solution list]: |
| 2262 |
\commandf{s=bd(), s('UZ'), bd('UZ'), bd([1,2]), bd(['UZ','HB1',7]), ...}. |
| 2263 |
\item[Solution column]: |
| 2264 |
\commandf{bd('UZ1')['t'], bd('UZ1')['U(1)'], ...}. |
| 2265 |
\item[Solution measures]: |
| 2266 |
\commandf{bd('UZ1')['L2-NORM'], ...}.\\ |
| 2267 |
This example is a shortcut for \commandf{bd('UZ1').b['L2-NORM']}: here you |
| 2268 |
can use any column name from the bifurcation diagram. |
| 2269 |
\item[Solution point]: |
| 2270 |
\commandf{bd('UZ1')(0), bd('UZ1')[0], ...}.\\ |
| 2271 |
Here the \commandf{bd('UZ1')(t)} notation gives the point at |
| 2272 |
time \commandf{t}. |
| 2273 |
\item[Solution AUTO constants]: |
| 2274 |
\commandf{bd(5).c, bd('UZ1').c, bd()[0].c, ...}.\\ |
| 2275 |
These constants are copied from the corresponding branch |
| 2276 |
constants, removing the constants \parf{IRS}, \parf{PAR}, \parf{U}, |
| 2277 |
\parf{sv}, \parf{s}, and \parf{dat}, because those constants need |
| 2278 |
to change between runs. The AUTO constant |
| 2279 |
\parf{IRS} is automatically set to the solution label. |
| 2280 |
\end{description} |
| 2281 |
|
| 2282 |
\section{ Importing data from Python or external tools.} \label{sec:clui_importing} |
| 2283 |
A solution can be created from a Python list or Numerical Python |
| 2284 |
array using the \commandf{load} command. The syntax is slightly |
| 2285 |
different depending on whether you create a point or an orbit. |
| 2286 |
|
| 2287 |
Use \commandf{ s = load(u,PAR=p)} where \commandf{u} is a Python list |
| 2288 |
or a numpy array representing a solution. For a point |
| 2289 |
such an array is just the point itself, for example, |
| 2290 |
\commandf{u = [x, y, z]} or |
| 2291 |
\commandf{u = [0, 0, 0]}. For an orbit such an array must be given |
| 2292 |
column-wise, as \commandf{u = [[t0, ..., tn], [x0, ..., xn], [y0, |
| 2293 |
..., yn], ...]}. |
| 2294 |
The \commandf{PAR=p} keyword argument takes a dictionary \commandf{p} |
| 2295 |
as described in Section~\ref{sec:PAR}, for instance, \commandf{PAR=\{1:5.0, |
| 2296 |
2:0.0\}} to set \parf{PAR(1)=5.0} and \parf{PAR(2)=0.0}. |
| 2297 |
|
| 2298 |
You can check your new solution using the command \commandf{print s}. |
| 2299 |
|
| 2300 |
An external orbit from an ASCII file can be directly imported by |
| 2301 |
AUTO via the \parf{dat} AUTO constant, see Section~\ref{sec:dat}. |
| 2302 |
|
| 2303 |
\section{ Exporting output data for use by Python or external |
| 2304 |
visualization tools.} \label{sec:clui_exporting} |
| 2305 |
|
| 2306 |
The bifurcation and solution file classes have three methods that are |
| 2307 |
particularily useful for creating data which can be used in other |
| 2308 |
programs. First, there is a method called \commandf{toArray} which |
| 2309 |
takes a bifurcation diagram or solution and |
| 2310 |
returns a Python array (a list of lists). Second, the method |
| 2311 |
\commandf{toarray} returns a Numerical Python (numpy) array, |
| 2312 |
which works for |
| 2313 |
branches, points and solutions (but not for lists of branches). |
| 2314 |
Third, there is a method called |
| 2315 |
\commandf{writeRawFilename} which will create a standard ASCII file |
| 2316 |
which contains the bifurcation diagram or the solution. |
| 2317 |
In the solution ASCII file, the first element of each row will be |
| 2318 |
the 't' value and the following elements will be the |
| 2319 |
values of the components at that 't' value. Such ASCII files |
| 2320 |
can be readily parsed and plotted by external tools such as |
| 2321 |
Gnuplot and MATLAB. |
| 2322 |
|
| 2323 |
For example, we assume |
| 2324 |
that a bifurcation diagram object is contained in a variable |
| 2325 |
\commandf{bd}, for instance, using \commandf{bd=loadbd('ab')}. If |
| 2326 |
one wanted to have the bifurcation diagram returned as a Python list |
| 2327 |
one would type \commandf{bd.toArray()}. Similarily, if one wanted |
| 2328 |
to write out the bifurcation diagram to the file \commandf{outputfile} |
| 2329 |
one would type \commandf{bd.writeRawFilename('outputfile')}. |
| 2330 |
|
| 2331 |
To get the solution with label \commandf{57} returned as a numpy |
| 2332 |
array one would type \commandf{bd(57).toarray()}. |
| 2333 |
Similarily, if one wanted to write out the solution |
| 2334 |
to the file \commandf{outputfile} one would type |
| 2335 |
\commandf{bd(57).writeRawFilename('outputfile')}. |
| 2336 |
|
| 2337 |
\section{ The \filef{.autorc} or \filef{autorc} File } |
| 2338 |
|
| 2339 |
Much of the default behavior of the \AUTO CLUI |
| 2340 |
can be controlled by the \filef{.autorc} file. |
| 2341 |
The \filef{.autorc} file can exist in |
| 2342 |
either the main \AUTO directory, the users |
| 2343 |
home directory, or the current directory. In the current directory |
| 2344 |
it can also have the name \filef{autorc}, that is, without the dot. |
| 2345 |
For any |
| 2346 |
option which is defined in more then one file, |
| 2347 |
the \filef{.autorc} file |
| 2348 |
in the current directory (if it exists) takes precedence, |
| 2349 |
followed by the \filef{.autorc} file |
| 2350 |
in the users home directory (if it exists), and then the |
| 2351 |
\filef{.autorc} file in the main \AUTO directory. Hence, |
| 2352 |
options may be defined on either a per directory, per |
| 2353 |
user, or global basis. |
| 2354 |
|
| 2355 |
The first section of the \filef{.autorc} file |
| 2356 |
begins with the line \commandf{[AUTO\_command\_aliases]} |
| 2357 |
and this section defines short names, or aliases, |
| 2358 |
for the \AUTO CLUI commands. |
| 2359 |
Each line thereafter is a definition of |
| 2360 |
a command, similiar to |
| 2361 |
\commandf{branchPoint =commandQueryBranchPoint}. |
| 2362 |
The right hand side of the assignment |
| 2363 |
is the internal \AUTO CLUI name for the command, |
| 2364 |
while the left hand side is the desired alias. |
| 2365 |
Aliases and |
| 2366 |
internal names may be used interchangably, but the |
| 2367 |
intention is that the aliases will be more commonly |
| 2368 |
used. A default set of aliases is provided, and |
| 2369 |
these aliases will be used in the examples in the |
| 2370 |
rest of this Chapter. The default aliases |
| 2371 |
are listed in the reference in Section~\ref{sec:clui reference}. |
| 2372 |
|
| 2373 |
%FIXME: Fix the documentation here |
| 2374 |
{\em NOTE: Defaults for the plotting tool may be included in |
| 2375 |
the .autorc file as well.} |
| 2376 |
|
| 2377 |
\section{ Plotting Tool}\label{clui:plotting} |
| 2378 |
|
| 2379 |
The plotting tool can be run by using the command |
| 2380 |
\commandf{plot(bd)} to plot a bifurcation diagram object \parf{bd} |
| 2381 |
after a calculation has been run, or using the command |
| 2382 |
\commandf{plot()} to plot the files \filef{fort.7} and \filef{fort.8}, |
| 2383 |
or using the command \commandf{plot('foo')} to plote the data in the |
| 2384 |
files \filef{s.foo} and \filef{b.foo}. |
| 2385 |
|
| 2386 |
The menu bar provides two buttons. The \commandf{File} |
| 2387 |
button brings up a menu which allows the user to save |
| 2388 |
the current plot as a Postscript file or |
| 2389 |
to quit the plotting tool. |
| 2390 |
The \commandf{Options} button allows the plotter |
| 2391 |
configuration options to be modified. |
| 2392 |
The available options are decribed in |
| 2393 |
Table~\ref{tbl:clui plotter specific options}. In addition, the options can |
| 2394 |
be set and figures can be saved from within the CLUI. For example, |
| 2395 |
the set of commands in Figure~\ref{exa:plotter_example} shows how to |
| 2396 |
create a plot, change its background color to black, and save it. The |
| 2397 |
demo script \filef{auto/07p/demo/python/plotter.py} contains several |
| 2398 |
examples of changing options in plotters. |
| 2399 |
The special argument |
| 2400 |
\commandf{hide=True} to \commandf{plot} does not produce an on-screen |
| 2401 |
plot, which is useful for quick automatic generation of saved figure files. |
| 2402 |
|
| 2403 |
If you are using matplotlib, then you will find seven icons that allow |
| 2404 |
you to use various zoom functions: a home button to go back to the |
| 2405 |
original plot, back and forward buttons to go back and forwards |
| 2406 |
between zooms, a button to select pan/zoom mode, a button to select |
| 2407 |
rectangular zoom mode, a button to which brings up sliders that |
| 2408 |
adjust margins, and a floppy disk button that you can use |
| 2409 |
to save the plot to a file. |
| 2410 |
In ``zoom to rect'' mode, the left mouse button may be held down to create |
| 2411 |
a box in the plot. When the left button is released the plot will |
| 2412 |
zoom to the selected portion of the diagram. Similarly, the right |
| 2413 |
mouse button can be used to zoom out. In ``pan/zoom'' mode, dragging |
| 2414 |
with the left mouse button pressed pans (shifts) the graph, whereas |
| 2415 |
dragging with the right mouse button zooms in and out. |
| 2416 |
|
| 2417 |
If you are \emph{not} using matplotlib, then |
| 2418 |
pressing the right mouse button in the plotting window brings |
| 2419 |
up a menu of buttons which control several aspects |
| 2420 |
of the plotting window. The top two toggle buttons |
| 2421 |
control what function the left button performs. |
| 2422 |
The \commandf{print value} button causes the |
| 2423 |
left button to print out the numerical value underneath |
| 2424 |
the pointer when it is clicked. |
| 2425 |
When \commandf{zoom} button is checked the left |
| 2426 |
mouse button may be held down to create |
| 2427 |
a box in the plot. When the left button |
| 2428 |
is released the plot will zoom to the selected |
| 2429 |
portion of the diagram. |
| 2430 |
The \commandf{unzoom} button returns the |
| 2431 |
diagram to the default zoom. |
| 2432 |
The \commandf{Postscript} button allows the user |
| 2433 |
to save the plot as a Postscript file. |
| 2434 |
The \commandf{Configure...} button brings up |
| 2435 |
the dialog for setting configuration options. |
| 2436 |
|
| 2437 |
\begin{figure}[htbp] |
| 2438 |
{\small \begin{center} \begin{boxedverbatim} |
| 2439 |
AUTO> p=plot() |
| 2440 |
Created plot |
| 2441 |
AUTO> p.config(bg="black") |
| 2442 |
AUTO> p.savefig("black.eps") |
| 2443 |
AUTO> p=plot(hide=True) |
| 2444 |
Created plot |
| 2445 |
AUTO> p.savefig("white.eps") |
| 2446 |
\end{boxedverbatim} |
| 2447 |
\end{center} |
| 2448 |
} |
| 2449 |
\caption[Configuring a plotter.] |
| 2450 |
{This example shows how a plotter is created, |
| 2451 |
how the background color may be changed to black, |
| 2452 |
how a figure is saved, and how an invisible plot is |
| 2453 |
saved to a file. |
| 2454 |
All other configuration options are set similarily. |
| 2455 |
Note, the above commands assume that the files |
| 2456 |
fort.7 and fort.8 exist in the current directory. |
| 2457 |
} |
| 2458 |
\label{exa:plotter_example} |
| 2459 |
\end{figure} |
| 2460 |
|
| 2461 |
\begin{longtable}{| l | l |} |
| 2462 |
\hline |
| 2463 |
Query string & Meaning \\ |
| 2464 |
\hline |
| 2465 |
1\_1\_resonance\_symbol & The symbol to use for 1:1 resonance points. \\ |
| 2466 |
\hline |
| 2467 |
1\_2\_resonance\_symbol & The symbol to use for 1:2 resonance points. \\ |
| 2468 |
\hline |
| 2469 |
1\_3\_resonance\_symbol & The symbol to use for 1:3 resonance points. \\ |
| 2470 |
\hline |
| 2471 |
1\_4\_resonance\_symbol & The symbol to use for 1:4 resonance points. \\ |
| 2472 |
\hline |
| 2473 |
azimuth & Azimuth of the axes in 3D plots. \\ |
| 2474 |
\hline |
| 2475 |
background & The background color of the plot. \\ |
| 2476 |
\hline |
| 2477 |
bifurcation\_column\_defaults & A set of bifurcation columns the user is likely to use. \\ |
| 2478 |
\hline |
| 2479 |
bifurcation\_coordnames & Names to use instead of PAR(1),... for bifurcation diagrams. \\ |
| 2480 |
\hline |
| 2481 |
bifurcation\_diagram & A parsed bifurcation diagram file to plot. \\ |
| 2482 |
\hline |
| 2483 |
bifurcation\_diagram\_filename & The filename of the bifurcation diagram to plot. \\ |
| 2484 |
\hline |
| 2485 |
bifurcation\_symbol & The symbol to use for bifurcation points. \\ |
| 2486 |
\hline |
| 2487 |
bifurcation\_x & The column to plot along the X-axis for bifurcation diagrams. \\ |
| 2488 |
\hline |
| 2489 |
bifurcation\_y & The column to plot along the Y-axis for bifurcation diagrams. \\ |
| 2490 |
\hline |
| 2491 |
bifurcation\_z & The column to plot along the Z-axis for bifurcation diagrams. \\ |
| 2492 |
\hline |
| 2493 |
bogdanov\_takens\_symbol & The symbol to use for Bogdanov-Takens points. \\ |
| 2494 |
\hline |
| 2495 |
bottom\_margin & The margin between the graph and the bottom edge. \\ |
| 2496 |
\hline |
| 2497 |
color\_list & A list of colors to use for multiple plots. \\ |
| 2498 |
\hline |
| 2499 |
coloring\_method & color\_list index: 'branch' (BR), 'type' (TY), or 'curve' (seq.). \\ |
| 2500 |
\hline |
| 2501 |
cusp\_symbol & The symbol to use for Cusp points. \\ |
| 2502 |
\hline |
| 2503 |
d0, d1, d2, d3, d4 & Redefine d0, d1, d2, etc. setting to use with |
| 2504 |
{\cal PyPLAUT} (\commandf{@pp}). \\ |
| 2505 |
\hline |
| 2506 |
dashes & List of dash, no-dash lengths for dashed lines. \\ |
| 2507 |
\hline |
| 2508 |
decorations & Turn on or off the axis, tick marks, etc. \\ |
| 2509 |
\hline |
| 2510 |
default\_option & Default d0, d1, d2, etc. setting to use with {\cal |
| 2511 |
PyPLAUT} (\commandf{@pp}). \\ |
| 2512 |
\hline |
| 2513 |
elevation & Elevation of the axes in 3D plots. \\ |
| 2514 |
\hline |
| 2515 |
error\_symbol & The symbol to use for error points. \\ |
| 2516 |
\hline |
| 2517 |
even\_tick\_length & The length of the even tick marks. \\ |
| 2518 |
\hline |
| 2519 |
flip\_torus\_symbol & The symbol to use for flip-torus points. \\ |
| 2520 |
\hline |
| 2521 |
fold\_flip\_symbol & The symbol to use for fold-flip points. \\ |
| 2522 |
\hline |
| 2523 |
fold\_torus\_symbol & The symbol to use for fold-torus points. \\ |
| 2524 |
\hline |
| 2525 |
foreground & The background color of the plot. \\ |
| 2526 |
\hline |
| 2527 |
generalized\_hopf\_symbol & The symbol to use for Generalized Hopf points. \\ |
| 2528 |
\hline |
| 2529 |
grid & Turn on or off the grid. \\ |
| 2530 |
\hline |
| 2531 |
height & Height of the graph. \\ |
| 2532 |
\hline |
| 2533 |
hopf\_symbol & The symbol to use for Hopf bifurcation points. \\ |
| 2534 |
\hline |
| 2535 |
index & An array of indices to plot.\\ |
| 2536 |
\hline |
| 2537 |
label & An array of labels to plot, or 'all' for all labels.\\ |
| 2538 |
\hline |
| 2539 |
labelnames & A dictionary mapping names in \filef{fort.7} to axis labels.\\ |
| 2540 |
\hline |
| 2541 |
label\_defaults & A set of labels that the user is likely to use. \\ |
| 2542 |
\hline |
| 2543 |
left\_margin & The margin between the graph and the left edge. \\ |
| 2544 |
\hline |
| 2545 |
letter\_symbols & Whether to use letter (True) or symbols (False) for special points. \\ |
| 2546 |
\hline |
| 2547 |
limit\_point\_symbol & The symbol to use for limit points. \\ |
| 2548 |
\hline |
| 2549 |
line\_width & Width to use for lines and curves. \\ |
| 2550 |
\hline |
| 2551 |
mark\_t & The t value to marker with a small ball. \\ |
| 2552 |
\hline |
| 2553 |
maxx & The upper bound for the x-axis of the plot. \\ |
| 2554 |
\hline |
| 2555 |
maxy & The upper bound for the y-axis of the plot. \\ |
| 2556 |
\hline |
| 2557 |
maxz & The upper bound for the z-axis of the plot. \\ |
| 2558 |
\hline |
| 2559 |
minx & The lower bound for the x-axis of the plot. \\ |
| 2560 |
\hline |
| 2561 |
miny & The lower bound for the y-axis of the plot. \\ |
| 2562 |
\hline |
| 2563 |
minz & The lower bound for the z-axis of the plot. \\ |
| 2564 |
\hline |
| 2565 |
odd\_tick\_length & The length of the odd tick marks. \\ |
| 2566 |
\hline |
| 2567 |
period\_doubling\_symbol & The symbol to use for period doubling bifurcation points. \\ |
| 2568 |
\hline |
| 2569 |
ps\_colormode & The PostScript output mode: 'color', 'gray' or 'monochrome'. \\ |
| 2570 |
\hline |
| 2571 |
right\_margin & The margin between the graph and the left edge. \\ |
| 2572 |
\hline |
| 2573 |
runner & The runner object from which to get data. \\ |
| 2574 |
\hline |
| 2575 |
smart\_label & Whether to use a smart but slower label placement algorithm. \\ |
| 2576 |
\hline |
| 2577 |
special\_point\_colors & An array of colors used to mark special points. \\ |
| 2578 |
\hline |
| 2579 |
special\_point\_radius & The radius of the spheres used to mark special points. \\ |
| 2580 |
\hline |
| 2581 |
solution & A parsed solution file to plot. \\ |
| 2582 |
\hline |
| 2583 |
solution\_column\_defaults & A set of solution columns the user is likely to use.\\ |
| 2584 |
\hline |
| 2585 |
solution\_coordnames & Variable names to use instead of U(1),... for solutions. \\ |
| 2586 |
\hline |
| 2587 |
solution\_filename & The filename of the solution to plot. \\ |
| 2588 |
\hline |
| 2589 |
solution\_indepvarname & Variable name to use instead of 't' for solutions. \\ |
| 2590 |
\hline |
| 2591 |
solution\_x & The column to plot along the X-axis for solutions. \\ |
| 2592 |
\hline |
| 2593 |
solution\_y & The column to plot along the Y-axis for solutions. \\ |
| 2594 |
\hline |
| 2595 |
solution\_z & The column to plot along the Z-axis for solutions. \\ |
| 2596 |
\hline |
| 2597 |
stability & Turn on or off stability information using dashed curves. \\ |
| 2598 |
\hline |
| 2599 |
symbol\_font & The font to use for marker symbols. \\ |
| 2600 |
\hline |
| 2601 |
symbol\_color & The color to use for the marker symbols. \\ |
| 2602 |
\hline |
| 2603 |
tick\_label\_template & A string which defines the format of the tick labels. \\ |
| 2604 |
\hline |
| 2605 |
tick\_length & The length of the tick marks. \\ |
| 2606 |
\hline |
| 2607 |
top\_margin & The margin between the graph and the top edge. \\ |
| 2608 |
\hline |
| 2609 |
top\_title & The label for the top title. \\ |
| 2610 |
\hline |
| 2611 |
top\_title\_fontsize & The font size for the top title. \\ |
| 2612 |
\hline |
| 2613 |
torus\_symbol & The symbol to use for torus bifurcation points. \\ |
| 2614 |
\hline |
| 2615 |
torus\_torus\_symbol & The symbol to use for torus-torus points. \\ |
| 2616 |
\hline |
| 2617 |
type & The type of the plot, either ``solution'' or ``bifurcation''. \\ |
| 2618 |
\hline |
| 2619 |
use\_labels & Whether or not to display label numbers in the graph. \\ |
| 2620 |
\hline |
| 2621 |
use\_symbols & Whether or not to display bifurcation symbols in the graph. \\ |
| 2622 |
\hline |
| 2623 |
user\_point\_symbol & The symbol to use for user defined output points. \\ |
| 2624 |
\hline |
| 2625 |
width & Width of the graph. \\ |
| 2626 |
\hline |
| 2627 |
xlabel & The label for the x-axis. \\ |
| 2628 |
\hline |
| 2629 |
xlabel\_fontsize & The font size for the x-axis label. \\ |
| 2630 |
\hline |
| 2631 |
xticks & The number of ticks on the x-axis. \\ |
| 2632 |
\hline |
| 2633 |
ylabel & The label for the y-axis. \\ |
| 2634 |
\hline |
| 2635 |
ylabel\_fontsize & The font size for the y-axis label. \\ |
| 2636 |
\hline |
| 2637 |
yticks & The number of ticks on the y-axis. \\ |
| 2638 |
\hline |
| 2639 |
zero\_hopf\_symbol & The symbol to use for zero-Hopf points. \\ |
| 2640 |
\hline |
| 2641 |
zlabel & The label for the z-axis. \\ |
| 2642 |
\hline |
| 2643 |
zlabel\_fontsize & The font size for the z-axis label. \\ |
| 2644 |
\hline |
| 2645 |
zticks & The number of ticks on the z-axis. \\ |
| 2646 |
\hline |
| 2647 |
\caption[The options for the PyPLAUT plotting window.] |
| 2648 |
{This table shows the options that |
| 2649 |
can be set for the PyPLAUT plotting window and their meanings.} |
| 2650 |
\label{tbl:clui plotter specific options} |
| 2651 |
\end{longtable} |
| 2652 |
|
| 2653 |
\section{ The Plotting Tool PLAUT04} |
| 2654 |
|
| 2655 |
The \AUTO plotting tool {\cal PLAUT04} as described |
| 2656 |
in Chapter~\ref{ch:PLAUT04}, can be run from the Python CLUI |
| 2657 |
using the command |
| 2658 |
\commandf{plot3} or \commandf{commandPlotter3D}, in a similar |
| 2659 |
fashion to \commandf{plot}. It does not use the options that |
| 2660 |
are used for the plotting window produced by \commandf{plot}. |
| 2661 |
|
| 2662 |
\section{ Quick Reference } \label{sec:clui quick reference} |
| 2663 |
|
| 2664 |
In this section we have created a table of all of the \AUTO CLUI |
| 2665 |
commands, their abbreviations, and a one line description of what |
| 2666 |
function they perform. Each command may be entered using |
| 2667 |
its full name or any of its aliases. |
| 2668 |
|
| 2669 |
\begin{longtable}{|p{1.1in}|l|p{2.5in}|} |
| 2670 |
\hline |
| 2671 |
Command, Aliases & Long name & Description\\ \hline |
| 2672 |
append ap & commandAppend & Append data files.\\ \hline |
| 2673 |
cat & commandCat & Print the contents of a file\\ \hline |
| 2674 |
cd & commandCd & Change directories.\\ \hline |
| 2675 |
clean cl & commandClean & Clean the current directory.\\ \hline |
| 2676 |
demo dm & commandCopyAndLoadDemo & Copy a demo into the current directory and load it.\\ \hline |
| 2677 |
copy cp & commandCopyDataFiles & Copy data files.\\ \hline |
| 2678 |
copydemo & commandCopyDemo & Copy a demo into the current directory.\\ \hline |
| 2679 |
save sv & commandCopyFortFiles & Save data files.\\ \hline |
| 2680 |
gui & commandCreateGUI & Show AUTOs graphical user interface.\\ \hline |
| 2681 |
delete, dl & commandDeleteDataFiles & Delete data files.\\ \hline |
| 2682 |
df deletefort & commandDeleteFortFiles & Clear the current directory of fort files.\\ \hline |
| 2683 |
dlb & commandDeleteLabels & Delete special labels.\\ \hline |
| 2684 |
dsp & commandDeleteSpecialPoints & Delete special points.\\ \hline |
| 2685 |
double & commandDouble & Double a solution.\\ \hline |
| 2686 |
man & commandInteractiveHelp & Get help on the AUTO commands.\\ \hline |
| 2687 |
klb & commandKeepLabels & Keep special labels.\\ \hline |
| 2688 |
ksp & commandKeepSpecialPoints & Keep special points.\\ \hline |
| 2689 |
ls & commandLs & List the current directory.\\ \hline |
| 2690 |
merge mb & commandMergeBranches & Merge branches in data files. \\ \hline |
| 2691 |
move mv & commandMoveFiles & Move data-files to a new name.\\ \hline |
| 2692 |
cn constantsget & commandParseConstantsFile & Get the current continuation constants.\\ \hline |
| 2693 |
bt diagramandsolutionget & commandParseDiagramAndSolutionFile & Parse both bifurcation diagram and solution.\\ \hline |
| 2694 |
dg diagramget & commandParseDiagramFile & Parse a bifurcation diagram.\\ \hline |
| 2695 |
sl solutionget & commandParseSolutionFile & Parse solution file:\\ \hline |
| 2696 |
plot p2 pl & commandPlotter & plotting of data.\\ \hline |
| 2697 |
plot3 p3 & commandPlotter3D & PLAUT04 plotting of data.\\ \hline |
| 2698 |
branchpoint br bp & commandQueryBranchPoint & Print the ``branch-point function''.\\ \hline |
| 2699 |
eigenvalue ev eg & commandQueryEigenvalue & Print eigenvalues of Jacobian (algebraic case).\\ \hline |
| 2700 |
floquet fl & commandQueryFloquet & Print the Floquet multipliers.\\ \hline |
| 2701 |
hopf hb hp & commandQueryHopf & Print the value of the ``Hopf function''.\\ \hline |
| 2702 |
iterations it & commandQueryIterations & Print the number of Newton interations.\\ \hline |
| 2703 |
limitpoint lm lp & commandQueryLimitpoint & Print the value of the ``limit point function''.\\ \hline |
| 2704 |
note nt & commandQueryNote & Print notes in info file.\\ \hline |
| 2705 |
secondaryperiod sc sp & commandQuerySecondaryPeriod & Print value of ``secondary-periodic bif. fcn''.\\ \hline |
| 2706 |
stepsize ss st & commandQueryStepsize & Print continuation step sizes.\\ \hline |
| 2707 |
quit q & commandQuit & Quit the AUTO CLUI.\\ \hline |
| 2708 |
relabel rl & commandRelabel & Relabel data files.\\ \hline |
| 2709 |
run r rn & commandRun & Run AUTO.\\ \hline |
| 2710 |
ch changeconstant cc & commandRunnerConfigFort2 & Modify continuation constants.\\ \hline |
| 2711 |
hch & commandRunnerConfigFort12 & Modify HomCont continuation constants.\\ \hline |
| 2712 |
load ld & commandRunnerLoadName & Load files into the AUTO runner.\\ \hline |
| 2713 |
printconstant pc pr & commandRunnerPrintFort2 & Print continuation parameters.\\ \hline |
| 2714 |
hpr & commandRunnerPrintFort12 & Print HomCont continuation parameters.\\ \hline |
| 2715 |
shell & commandShell & Run a shell command.\\ \hline |
| 2716 |
splabs & commandSpecialPointLabels & Return special labels.\\ \hline |
| 2717 |
subtract sb & commandSubtractBranches & Subtract branches in data files.\\ \hline |
| 2718 |
triple tr & commandTriple & Triple a solution.\\ \hline |
| 2719 |
us userdata & commandUserData & Covert user-supplied data files.\\ \hline |
| 2720 |
wait & commandWait & Wait for the user to enter a key.\\ \hline |
| 2721 |
auto execfile ex & & Execute an AUTO CLUI script.\\ \hline |
| 2722 |
demofile dmf & & Execute an AUTO CLUI script, line by line (demo |
| 2723 |
mode). \\ \hline |
| 2724 |
\end{longtable} |
| 2725 |
For convenience, you can use ``!'' to run a shell command. Moreover |
| 2726 |
the common shell commands \commandf{clear}, \commandf{less}, |
| 2727 |
\commandf{mkdir}, \commandf{rmdir}, |
| 2728 |
\commandf{cp}, \commandf{mv}, \commandf{rm}, \commandf{ls}, |
| 2729 |
\commandf{cd}, and \commandf{cat}, and all \AUTO Unix commands that are described |
| 2730 |
in Chapter~\ref{sec:command_mode} and start with an ``@''-sign can be |
| 2731 |
entered directly, without the ``!''. |
| 2732 |
\pagebreak |
| 2733 |
\section{ Reference } \label{sec:clui reference} |
| 2734 |
\subsection{Basic commands.} \label{sec:clui_ref_basic} |
| 2735 |
\begin{description} |
| 2736 |
\item[run] |
| 2737 |
Run \AUTO. |
| 2738 |
|
| 2739 |
Type \commandf{r=run([data],[options])} to run \AUTO from solution data with the given |
| 2740 |
\AUTO constants or file keyword options. |
| 2741 |
|
| 2742 |
The results are stored in the bifurcation diagram r which you can |
| 2743 |
later print with \commandf{print r}, obtain branches from via r[0], r[1], ..., |
| 2744 |
and obtain solutions from via r(3), r(5), r('LP2'), where 3 and 5 |
| 2745 |
are label numbers, and 'LP2' refers to the second LP label. |
| 2746 |
|
| 2747 |
\commandf{run(data)} runs \AUTO in the following way for different types of \parf{data}: |
| 2748 |
\begin{itemize} |
| 2749 |
\item |
| 2750 |
A solution: \AUTO starts from solution \parf{data}, with \AUTO constants \parf{data.c}. |
| 2751 |
\item |
| 2752 |
A bifurcation diagram: \AUTO start from the solution specified by |
| 2753 |
the \AUTO constant \parf{IRS}, or if \parf{IRS} is not specified, the last solution |
| 2754 |
in \parf{data}, \parf{data()[-1]}, with \AUTO constants \parf{data()[-1].c}. |
| 2755 |
\item |
| 2756 |
A string: \AUTO uses the solution in the file \filef{s.data} together with the |
| 2757 |
constants in the files \filef{c.data}, and \filef{h.data}. Not all of these |
| 2758 |
files need to be present. |
| 2759 |
\end{itemize} |
| 2760 |
|
| 2761 |
If no solution \parf{data} is specified, then the global values from the |
| 2762 |
\commandf{load} command (below) are used instead, where |
| 2763 |
options which are not explicitly set retain their previous value. |
| 2764 |
|
| 2765 |
Keyword argument options can be \AUTO constants, such as \parf{DS=0.05}, |
| 2766 |
or \parf{ISW=-1}, or specify a constant or solution file. These override |
| 2767 |
the constants in \filef{s.c}, where applicable. See \commandf{load}:\\ |
| 2768 |
\commandf{run(s,options)} is equivalent to \commandf{run(load(s,options))} |
| 2769 |
|
| 2770 |
Example: given a bifurcation diagram bd, with a branch point |
| 2771 |
solution, switch branches and stop at the first Hopf bifurcation:\\ |
| 2772 |
\commandf{hb = run(bd('BP1'),ISW=-1,STOP='HB1')} |
| 2773 |
|
| 2774 |
Special keyword arguments are \parf{sv} and \parf{ap}; \parf{sv} is also an \AUTO |
| 2775 |
constant:\\ |
| 2776 |
\commandf{run(bd('BP1'),ISW=-1,STOP='HB1',sv='hb',ap='all')}\\ |
| 2777 |
saves to the files \filef{b.hb}, \filef{s.hb} and \filef{d.hb}, |
| 2778 |
and appends to \filef{b.all}, \filef{s.all}, and \filef{d.all}. |
| 2779 |
|
| 2780 |
\textbf{Aliases:} r rn commandRun |
| 2781 |
|
| 2782 |
\item[load] |
| 2783 |
Load files into the \AUTO runner or return modified solution data. |
| 2784 |
|
| 2785 |
Type \commandf{result=load([options])} to modify the \AUTO runner.\\ |
| 2786 |
Type \commandf{result=load(data,[options])} to return possibly |
| 2787 |
modified solution data.\\ |
| 2788 |
|
| 2789 |
The type of the result is a solution object. |
| 2790 |
|
| 2791 |
\commandf{load(data,[options])} returns a solution in the following way for |
| 2792 |
different types of data: |
| 2793 |
\begin{itemize} |
| 2794 |
\item |
| 2795 |
A solution: load returns the solution data, with \AUTO constants |
| 2796 |
modified by options. |
| 2797 |
\item |
| 2798 |
A bifurcation diagram or a solution list: |
| 2799 |
returns the solution specified by |
| 2800 |
the \AUTO constant \parf{IRS}, or if \parf{IRS} is not specified, the last solution |
| 2801 |
in \parf{s}. |
| 2802 |
\item |
| 2803 |
A string: \AUTO uses the solution in the file 's.s' together with the |
| 2804 |
constants in the files 'c.s', and 'h.s'. Not all of these |
| 2805 |
files need to be present. |
| 2806 |
\item |
| 2807 |
A Python list array or a numpy array representing a solution, |
| 2808 |
returns a solution with the given contents. Such an array must be given |
| 2809 |
column-wise, as [[t0, ..., tn], [x0, ..., xn], [y0, ..., yn], |
| 2810 |
...], or for a point solution as [x, y, z, ...]. |
| 2811 |
\end{itemize} |
| 2812 |
|
| 2813 |
There are many possible options: |
| 2814 |
\begin{verbatim} |
| 2815 |
Long name Short name Description |
| 2816 |
------------------------------------------- |
| 2817 |
equation e The equations file |
| 2818 |
constants c The AUTO constants file |
| 2819 |
homcont h The Homcont parameter file |
| 2820 |
solution s The restart solution file |
| 2821 |
NDIM,IPS,etc AUTO constants. |
| 2822 |
BR,PT,TY,LAB Solution constants. |
| 2823 |
\end{verbatim} |
| 2824 |
If data is not specified or data is a string then options which |
| 2825 |
are not explicitly set retain their previous value. |
| 2826 |
For example one may type: \commandf{s=load(e='ab',c='ab.1')} to |
| 2827 |
use \filef{ab.f90}, \filef{ab.f}, or \filef{ab.c} as |
| 2828 |
the equations file and \filef{c.ab.1} as the constants file. |
| 2829 |
|
| 2830 |
Type \commandf{s=load('name')} to load all files with base 'name'. |
| 2831 |
This does the same thing as running |
| 2832 |
\commandf{s=load(e='name',c='name,h='name',s='name')}. |
| 2833 |
|
| 2834 |
You can also specify \AUTO Constants, e.g., \parf{DS=0.05}, or \parf{IRS=2}. |
| 2835 |
Special values for \parf{DS} are \parf{'+'} (forwards) and \parf{'-'} (backwards).\\ |
| 2836 |
Example: \commandf{s = load(s,DS='-')} changes \parf{s.c['DS']} to \parf{-s.c['DS']}. |
| 2837 |
|
| 2838 |
\textbf{Aliases:} ld commandRunnerLoadName |
| 2839 |
|
| 2840 |
\item[loadbd] |
| 2841 |
Load bifurcation diagram files. |
| 2842 |
|
| 2843 |
Type \commandf{b=loadbd([options])} to load output files or output data. |
| 2844 |
There are three possible options: |
| 2845 |
\begin{verbatim} |
| 2846 |
Long name Short name Description |
| 2847 |
------------------------------------------- |
| 2848 |
bifurcationdiagram b The bifurcation diagram file |
| 2849 |
solution s The solution file or list of solutions |
| 2850 |
diagnostics d The diagnostics file |
| 2851 |
\end{verbatim} |
| 2852 |
|
| 2853 |
Type \commandf{loadbd('name')} to load all files with base 'name'. |
| 2854 |
This does the same thing as running\\ |
| 2855 |
\commandf{loadbd(b='name',s='name,d='name')}.\\ |
| 2856 |
\commandf{plot(b)} will then plot the 'b' and 's' components. |
| 2857 |
|
| 2858 |
Returns a bifurcation diagram object representing the files in b. |
| 2859 |
|
| 2860 |
\textbf{Aliases:} bd commandParseOutputFiles |
| 2861 |
|
| 2862 |
\item[save] |
| 2863 |
Save data files. |
| 2864 |
|
| 2865 |
Type \commandf{save(x,'xxx')} to save bifurcation diagram \parf{x} |
| 2866 |
to the files \filef{b.xxx}, \filef{s.xxx}, \filef{d.xxx}. |
| 2867 |
Existing files with these names will be overwritten. |
| 2868 |
If \parf{x} is a solution, a list of solutions, or does not contain any |
| 2869 |
bifurcation diagram or diagnostics data, then only the file \filef{s.xxx} |
| 2870 |
is saved to. |
| 2871 |
|
| 2872 |
Type \commandf{save('xxx')} to save the output-files \filef{fort.7}, |
| 2873 |
\filef{fort.8}, \filef{fort.9}, to \filef{b.xxx}, \filef{s.xxx}, |
| 2874 |
\filef{d.xxx}. Existing files with these names will be overwritten. |
| 2875 |
|
| 2876 |
\textbf{Aliases:} commandCopyFortFiles |
| 2877 |
|
| 2878 |
\item[append] |
| 2879 |
|
| 2880 |
Append data files. |
| 2881 |
|
| 2882 |
Type \commandf{append(x,'xxx')} to append bifurcation diagram x |
| 2883 |
to the data-files \filef{b.xxx}, \filef{s.xxx}, and \filef{d.xxx}. This is equivalent to |
| 2884 |
the command\\ |
| 2885 |
\commandf{save(x+load('xxx'),'xxx')} |
| 2886 |
|
| 2887 |
Type \commandf{append('xxx',xxx)} to append existing data-files \filef{s.xxx}, \filef{b.xxx}, |
| 2888 |
and \filef{d.xxx} to bifurcation diagram x. This is equivalent to |
| 2889 |
the command\\ |
| 2890 |
\commandf{x=load('xxx')+x} |
| 2891 |
|
| 2892 |
Type \commandf{append('xxx')} to append the output-files \filef{fort.7}, \filef{fort.8}, |
| 2893 |
\filef{fort.9}, to existing data-files \filef{s.xxx}, \filef{b.xxx}, and \filef{d.xxx}. |
| 2894 |
|
| 2895 |
Type \commandf{append('xxx','yyy')} to append existing data-files \filef{s.xxx}, \filef{b.xxx}, |
| 2896 |
and \filef{d.xxx} to data-files \filef{s.yyy}, \filef{b.yyy}, and |
| 2897 |
\filef{d.yyy}. |
| 2898 |
|
| 2899 |
\textbf{Aliases:} ap commandAppend |
| 2900 |
\end{description} |
| 2901 |
|
| 2902 |
\subsection{Plotting commands.} \label{sec:clui_ref_plot} |
| 2903 |
|
| 2904 |
\begin{description} |
| 2905 |
\item[plot] |
| 2906 |
Plotting of data. |
| 2907 |
|
| 2908 |
Type \commandf{plot(x)} to run the graphics program PyPLAUT for the graphical |
| 2909 |
inspection of bifurcation diagram or solution data in x. |
| 2910 |
|
| 2911 |
Type \commandf{plot('xxx')} to run the graphics program PyPLAUT for the graphical |
| 2912 |
inspection of the data-files \filef{b.xxx} and \filef{s.xxx}. |
| 2913 |
|
| 2914 |
Type \commandf{plot()} to run the graphics program for the graphical |
| 2915 |
inspection of the output-files \filef{fort.7} and \filef{fort.8}. |
| 2916 |
|
| 2917 |
Values also present in the file \filef{autorc}, such as |
| 2918 |
\commandf{color\_list = "black green red blue orange"} can be provided as |
| 2919 |
keyword arguments, as well as \commandf{hide=True} which hides the |
| 2920 |
on-screen plot. |
| 2921 |
|
| 2922 |
The return value, for instance, \commandf{p} for |
| 2923 |
\commandf{p=plot(x)} will be the handle for the graphics window. |
| 2924 |
It has p.config() and p.savefig() methods that allow you to configure |
| 2925 |
and save the plot. When plotting, see \commandf{help(p.config)} |
| 2926 |
and \commandf{help(p.savefig)} for details. |
| 2927 |
|
| 2928 |
\textbf{Aliases:} p2 pl commandPlotter |
| 2929 |
|
| 2930 |
\item[plot3] |
| 2931 |
Plotting of data using PLAUT04. |
| 2932 |
|
| 2933 |
Type \commandf{plot3(x)} to run the graphics program PLAUT04 for the graphical |
| 2934 |
inspection of bifurcation diagram or solution data in x. |
| 2935 |
|
| 2936 |
Type \commandf{plot3('xxx')} to run the graphics program PLAUT04 for the graphical |
| 2937 |
inspection of the data-files \filef{b.xxx} and \filef{s.xxx}. |
| 2938 |
|
| 2939 |
Type \commandf{plot3()} to run the graphics program PLAUT04 for the graphical |
| 2940 |
inspection of the output-files \filef{fort.7} and \filef{fort.8}. |
| 2941 |
|
| 2942 |
Type \commandf{plot3(...,r3b=True)} to run PLAUT04 in restricted three body |
| 2943 |
problem mode. |
| 2944 |
|
| 2945 |
\textbf{Aliases:} p3 commandPlotter3D |
| 2946 |
\end{description} |
| 2947 |
|
| 2948 |
\subsection{File-manipulation.} \label{sec:clui_ref_files} |
| 2949 |
\begin{description} |
| 2950 |
\item[copy] |
| 2951 |
Copy data files. |
| 2952 |
|
| 2953 |
Type \commandf{copy(name1, name2)}, or \commandf{copy(name1, |
| 2954 |
name2, name3)}, or \commandf{copy(name1, name2, name3, name4)} to |
| 2955 |
copy the data-files \filef{dir1/c.xxx}, \filef{dir1/b.xxx}, |
| 2956 |
\filef{dir1/s.xxx}, and \filef{dir1/d.xxx}, to \filef{dir2/c.yyy}, |
| 2957 |
\filef{dir2/b.yyy}, \filef{dir2/s.yyy}, and \filef{dir2/d.yyy}. |
| 2958 |
|
| 2959 |
Type \commandf{copy('xxx','yyy')} to copy the data-files \filef{c.xxx}, |
| 2960 |
\filef{d.xxx}, \filef{b.xxx}, and \filef{h.xxx} to \filef{c.yyy}, |
| 2961 |
\filef{d.yyy}, \filef{b.yyy}, and \filef{h.yyy}. |
| 2962 |
|
| 2963 |
The values of \filef{dir1/?.xxx} and \filef{dir2/?.yyy} are as |
| 2964 |
follows, depending on whether \filef{name1} is a directory or |
| 2965 |
\filef{name2} is a directory: |
| 2966 |
|
| 2967 |
\commandf{copy(name1, name2)}\\ |
| 2968 |
no directory names: \filef{./?.name1} and \filef{./?.name2}\\ |
| 2969 |
\filef{name1} is a directory: \filef{name1/?.name2} and \filef{./?.name2}\\ |
| 2970 |
\filef{name2} is a directory: \filef{./?.name1} and \filef{name2/?.name1} |
| 2971 |
|
| 2972 |
\commandf{copy(name1, name2, name3)}\\ |
| 2973 |
\filef{name1} is a directory: \filef{name1/?.name2} and \filef{./?.name3}\\ |
| 2974 |
\filef{name2} is a directory: \filef{./?.name1} and \filef{name2/?.name3} |
| 2975 |
|
| 2976 |
\commandf{copy(name1, name2, name3, name4)}\\ |
| 2977 |
\filef{name1/?.name2} and \filef{name3/?.name4} |
| 2978 |
|
| 2979 |
\textbf{Aliases:} cp commandCopyDataFiles |
| 2980 |
|
| 2981 |
\item[move] |
| 2982 |
Move data-files to a new name. |
| 2983 |
|
| 2984 |
Type \commandf{move(name1, name2)}, or \commandf{move(name1, |
| 2985 |
name2, name3)}, or \commandf{move(name1, name2, name3, name4)} to |
| 2986 |
move the data-files \filef{dir1/b.xxx}, \filef{dir1/s.xxx}, and |
| 2987 |
\filef{dir1/d.xxx}, to \filef{dir2/b.yyy}, \filef{dir2/s.yyy}, and |
| 2988 |
\filef{dir2/d.yyy}, and copy the constants |
| 2989 |
file \filef{dir1/c.xxx} to \filef{dir2/c.yyy}. |
| 2990 |
|
| 2991 |
The values of \filef{dir1/?.xxx} and \filef{dir2/?.yyy} are determined |
| 2992 |
in the same way as for \commandf{copy} above. |
| 2993 |
|
| 2994 |
\textbf{Aliases:} mv commandMoveFiles |
| 2995 |
|
| 2996 |
\item[df] |
| 2997 |
Clear the current directory of fort files. |
| 2998 |
|
| 2999 |
Type \commandf{df()} to clean the current directory. This command will |
| 3000 |
delete all files of the form \filef{fort.*}. |
| 3001 |
|
| 3002 |
\textbf{Aliases:} deletefort commandDeleteFortFiles |
| 3003 |
|
| 3004 |
\item[clean] |
| 3005 |
Clean the current directory. |
| 3006 |
|
| 3007 |
Type \commandf{clean()} to clean the current directory. This command will |
| 3008 |
delete all files of the form \filef{fort.*}, \filef{*.*\~{}}, |
| 3009 |
\filef{*.o}, and \filef{*.exe}. |
| 3010 |
|
| 3011 |
\textbf{Aliases:} |
| 3012 |
cl commandClean |
| 3013 |
|
| 3014 |
\item[delete] |
| 3015 |
Delete data files. |
| 3016 |
|
| 3017 |
Type \commandf{delete('xxx')} to delete the data-files \filef{d.xxx}, |
| 3018 |
\filef{b.xxx}, and \filef{s.xxx} (if you are using the default |
| 3019 |
filename templates). |
| 3020 |
|
| 3021 |
\textbf{Aliases:} dl commandDeleteDataFiles |
| 3022 |
\end{description} |
| 3023 |
|
| 3024 |
\subsection{Diagnostics.} \label{sec:clui_ref_diagnostics} |
| 3025 |
|
| 3026 |
\begin{description} |
| 3027 |
\item[limitpoint] |
| 3028 |
Print the value of the ``limit point function''. |
| 3029 |
|
| 3030 |
Type \commandf{limitpoint(x)} to list the value of the ``limit point function'' |
| 3031 |
in the diagnostics of the bifurcation diagram object \parf{x}. |
| 3032 |
This function vanishes at a limit point (fold). |
| 3033 |
|
| 3034 |
Type \commandf{limitpoint()} to list the value of the ``limit point function'' |
| 3035 |
in the output-file \filef{fort.9}. |
| 3036 |
|
| 3037 |
Type \commandf{limitpoint('xxx')} to list the value of the ``limit point function'' |
| 3038 |
in the info file \filef{d.xxx}. |
| 3039 |
|
| 3040 |
\textbf{Aliases:} lm lp commandQueryLimitpoint |
| 3041 |
|
| 3042 |
\item[branchpoint] |
| 3043 |
Print the ``branch-point function''. |
| 3044 |
|
| 3045 |
Type \commandf{branchpoint(x)} to list the value of the ``branch-point function'' |
| 3046 |
in the diagnostics of the bifurcation diagram object \parf{x}. |
| 3047 |
This function vanishes at a branch point. |
| 3048 |
|
| 3049 |
Type \commandf{branchpoint()} to list the value of the ``branch-point function'' |
| 3050 |
in the output-file \filef{fort.9}. |
| 3051 |
|
| 3052 |
Type \commandf{branchpoint('xxx')} to list the value of the ``branch-point function'' |
| 3053 |
in the info file \filef{d.xxx}. |
| 3054 |
|
| 3055 |
\textbf{Aliases:} br bp commandQueryBranchPoint |
| 3056 |
|
| 3057 |
\item[hopf] |
| 3058 |
Print the value of the ``Hopf function''. |
| 3059 |
|
| 3060 |
Type \commandf{hopf(x)} to list the value of the ``Hopf function'' |
| 3061 |
in the diagnostics of the bifurcation diagram object \parf{x}. |
| 3062 |
This function vanishes at a Hopf bifurcation point. |
| 3063 |
|
| 3064 |
Type \commandf{hopf()} to list the value of the ``Hopf function'' |
| 3065 |
in the output-file \filef{fort.9}. |
| 3066 |
|
| 3067 |
Type \commandf{hopf('xxx')} to list the value of the ``Hopf function'' |
| 3068 |
in the info file \filef{d.xxx}. |
| 3069 |
|
| 3070 |
\textbf{Aliases:} hb hp commandQueryHopf |
| 3071 |
|
| 3072 |
\item[secondaryperiod] |
| 3073 |
Print value of ``secondary-periodic bif. fcn''. |
| 3074 |
|
| 3075 |
Type \commandf{secondaryperiod(x)} to list the value of the |
| 3076 |
``secondary-periodic bifurcation function'' |
| 3077 |
in the diagnostics of the bifurcation diagram object \parf{x}. |
| 3078 |
This function vanishes at period-doubling and torus bifurcations. |
| 3079 |
|
| 3080 |
Type \commandf{secondaryperiod()} to list the value of the |
| 3081 |
``secondary-periodic bifurcation function'' |
| 3082 |
in the output-file \filef{fort.9}. |
| 3083 |
|
| 3084 |
Type \commandf{secondaryperiod('xxx')} to list the value of the |
| 3085 |
``secondary-periodic bifurcation function'' |
| 3086 |
in the info file \filef{d.xxx}. |
| 3087 |
|
| 3088 |
\textbf{Aliases:} sc sp commandQuerySecondaryPeriod |
| 3089 |
|
| 3090 |
\item[iterations] |
| 3091 |
Print the number of Newton interations. |
| 3092 |
|
| 3093 |
Type \commandf{iterations(x)} to list the number of Newton iterations per |
| 3094 |
continuation step in the diagnostics of the bifurcation diagram |
| 3095 |
object \parf{x}. |
| 3096 |
|
| 3097 |
Type \commandf{iterations()} to list the number of Newton iterations per |
| 3098 |
continuation step in \filef{fort.9}. |
| 3099 |
|
| 3100 |
Type \commandf{iterations('xxx')} to list the number of Newton iterations per |
| 3101 |
continuation step in the info file \filef{d.xxx}. |
| 3102 |
|
| 3103 |
\textbf{Aliases:} it commandQueryIterations |
| 3104 |
|
| 3105 |
\item[note] |
| 3106 |
Print notes in info file. |
| 3107 |
|
| 3108 |
Type \commandf{note(x)} to show any notes |
| 3109 |
in the diagnostics of the bifurcation diagram |
| 3110 |
object \parf{x}. |
| 3111 |
|
| 3112 |
Type \commandf{note()} to show any notes in the output-file \filef{fort.9}. |
| 3113 |
|
| 3114 |
Type \commandf{note('xxx')} to show any notes in the info file \filef{d.xxx}. |
| 3115 |
|
| 3116 |
\textbf{Aliases:} nt commandQueryNote |
| 3117 |
|
| 3118 |
\item[stepsize] |
| 3119 |
Print continuation step sizes. |
| 3120 |
|
| 3121 |
Type \commandf{stepsize(x)} to list the continuation step size for each |
| 3122 |
continuation step in the diagnostics of the bifurcation diagram |
| 3123 |
object \parf{x}. |
| 3124 |
|
| 3125 |
Type \commandf{stepsize()} to list the continuation step size for each |
| 3126 |
continuation step in \filef{fort.9}. |
| 3127 |
|
| 3128 |
Type \commandf{stepsize('xxx')} to list the continuation step size for each |
| 3129 |
continuation step in the info file \filef{d.xxx}. |
| 3130 |
|
| 3131 |
\textbf{Aliases:} ss st commandQueryStepsize |
| 3132 |
|
| 3133 |
\item[eigenvalue] |
| 3134 |
Print eigenvalues of Jacobian (algebraic case). |
| 3135 |
|
| 3136 |
Type \commandf{eigenvalue(x)} to list the eigenvalues of the Jacobian |
| 3137 |
in the diagnostics of the bifurcation diagram object \parf{x}. |
| 3138 |
(Algebraic problems.) |
| 3139 |
|
| 3140 |
Type \commandf{eigenvalue()} to list the eigenvalues of the Jacobian |
| 3141 |
in \filef{fort.9}. |
| 3142 |
|
| 3143 |
Type \commandf{eigenvalue('xxx')} to list the eigenvalues of the Jacobian |
| 3144 |
in the info file \filef{d.xxx}. |
| 3145 |
|
| 3146 |
\textbf{Aliases:} ev eg commandQueryEigenvalue |
| 3147 |
|
| 3148 |
\item[floquet] |
| 3149 |
Print the Floquet multipliers. |
| 3150 |
|
| 3151 |
Type \commandf{floquet(x)} to list the Floquet multipliers |
| 3152 |
in the diagnostics of the bifurcation diagram object \parf{x}. |
| 3153 |
(Differential equations.) |
| 3154 |
|
| 3155 |
Type \commandf{floquet()} to list the |
| 3156 |
in the output-file \filef{fort.9}. |
| 3157 |
|
| 3158 |
Type \commandf{floquet('xxx')} to list the Floquet multipliers |
| 3159 |
in the info file \filef{d.xxx}. |
| 3160 |
|
| 3161 |
\textbf{Aliases:} fl commandQueryFloquet |
| 3162 |
\end{description} |
| 3163 |
|
| 3164 |
\subsection{File-maintenance.} \label{sec:clui_ref_filemaint} |
| 3165 |
|
| 3166 |
\begin{description} |
| 3167 |
\item[relabel] |
| 3168 |
Relabel data files. |
| 3169 |
|
| 3170 |
Type \commandf{y=relabel(x)} to return the python object x, with the solution |
| 3171 |
labels sequentially relabelled starting at 1, as a new object y. |
| 3172 |
|
| 3173 |
Type \commandf{relabel('xxx')} to relabel \filef{s.xxx} and |
| 3174 |
\filef{b.xxx}. Backups of the |
| 3175 |
original files are saved. |
| 3176 |
|
| 3177 |
Type \commandf{relabel('xxx','yyy')} to relabel the existing data-files |
| 3178 |
\filef{s.xxx} and \filef{b.xxx} and save then to \filef{s.yyy} and |
| 3179 |
\filef{b.yyy}; \filef{d.xxx} is copied to \filef{d.yyy}. |
| 3180 |
|
| 3181 |
\textbf{Aliases:} rl commandRelabel |
| 3182 |
|
| 3183 |
\item[double] |
| 3184 |
Double a solution. |
| 3185 |
|
| 3186 |
Type \commandf{double()} to double the solution in \filef{fort.8}. |
| 3187 |
|
| 3188 |
Type \commandf{double('xxx')} to double the solution in |
| 3189 |
\filef{s.xxx}. |
| 3190 |
|
| 3191 |
\textbf{Aliases:} db commandDouble |
| 3192 |
|
| 3193 |
\item[triple] |
| 3194 |
Triple a solution. |
| 3195 |
|
| 3196 |
Type \commandf{triple()} to triple the solution in \filef{fort.8}. |
| 3197 |
|
| 3198 |
Type \commandf{triple('xxx')} to triple the solution in |
| 3199 |
\filef{s.xxx}. |
| 3200 |
|
| 3201 |
\textbf{Aliases:} tr commandTriple |
| 3202 |
|
| 3203 |
\item[us] |
| 3204 |
Convert user-supplied data files. |
| 3205 |
|
| 3206 |
Type \commandf{us('xxx')} to convert a user-supplied data file 'xxx.dat' to |
| 3207 |
\AUTO format. The converted file is called 's.dat'. The original |
| 3208 |
file is left unchanged. \AUTO automatically sets the period in |
| 3209 |
{\tt PAR(11)}. Other parameter values must be set in 'STPNT'. (When |
| 3210 |
necessary, {\tt PAR(11)} may also be redefined there.) The |
| 3211 |
constants-file file 'c.xxx' must be present, as the \AUTO-constants |
| 3212 |
'NTST' and 'NCOL' are used to define the new mesh. |
| 3213 |
|
| 3214 |
Note: this technique has been obsoleted by the 'dat' \AUTO constant |
| 3215 |
in Section~\ref{sec:dat}. |
| 3216 |
|
| 3217 |
\textbf{Aliases:} userdata commandUserData |
| 3218 |
|
| 3219 |
\item[dlb] |
| 3220 |
Delete special labels. |
| 3221 |
|
| 3222 |
Type \commandf{dlb(x,list)} to delete the special points in list from |
| 3223 |
the Python object x, which must be a solution list or a bifurcation diagram. |
| 3224 |
|
| 3225 |
Type \commandf{dlb(list,'xxx')} to delete from the data-files |
| 3226 |
\filef{b.xxx} and \filef{s.xxx}.\\ |
| 3227 |
Type \commandf{dlb(list,'xxx','yyy')} to save to \filef{b.yyy} and |
| 3228 |
\filef{s.yyy} instead of \filef{?.xxx}.\\ |
| 3229 |
Type \commandf{dlb(list)} to delete from \filef{fort.7} and \filef{fort.8}. |
| 3230 |
|
| 3231 |
\commandf{list} is a label number or type name code, or a list of those, |
| 3232 |
such as 1, or [2, 3], or 'UZ' or ['BP', 'LP'], or it can be None or |
| 3233 |
omitted to mean the special points ['BP', 'LP', 'HB', 'PD', 'TR', |
| 3234 |
'EP', 'MX'] |
| 3235 |
|
| 3236 |
Alternatively a boolean user-defined function \commandf{f} that |
| 3237 |
takes a solution can be specified for \commandf{list}, such as |
| 3238 |
\begin{verbatim} |
| 3239 |
def f(s): |
| 3240 |
return s["PAR(9)"]<0 |
| 3241 |
\end{verbatim} |
| 3242 |
where all solutions are deleted that satisfy the given condition, or |
| 3243 |
\begin{verbatim} |
| 3244 |
def f(s1,s2): |
| 3245 |
return abs(s1["L2-NORM"] - s2["L2-NORM"]) < 1e-4 |
| 3246 |
\end{verbatim} |
| 3247 |
where all solutions are compared with each other and \commandf{s2} |
| 3248 |
is deleted if the given condition is satisfied, which causes |
| 3249 |
pruning of solutions that are close to each other. |
| 3250 |
|
| 3251 |
Type information is kept in the bifurcation diagram for plotting. |
| 3252 |
|
| 3253 |
\textbf{Alias:} commandDeleteLabels |
| 3254 |
|
| 3255 |
\item[klb] |
| 3256 |
Keep special labels. |
| 3257 |
|
| 3258 |
Type \commandf{klb(x,list)} to only keep the special points in list in |
| 3259 |
the Python object x, which must be a solution list or a bifurcation diagram. |
| 3260 |
|
| 3261 |
Type \commandf{klb(list,'xxx')} to keep them in the data-files |
| 3262 |
\filef{b.xxx} and \filef{s.xxx}.\\ |
| 3263 |
Type \commandf{klb(list,'xxx','yyy')} to save to \filef{b.yyy} and |
| 3264 |
\filef{s.yyy} instead of \filef{?.xxx}.\\ |
| 3265 |
Type \commandf{klb(list)} to keep them in \filef{fort.7} and \filef{fort.8}. |
| 3266 |
|
| 3267 |
\commandf{list} is a label number or type name code, or a list of those, |
| 3268 |
such as 1, or [2, 3], or 'UZ' or ['BP', 'LP'], or it can be None or |
| 3269 |
omitted to mean ['BP', 'LP', 'HB', 'PD', 'TR', 'EP', 'MX'], deleting 'UZ' and |
| 3270 |
regular points. |
| 3271 |
|
| 3272 |
Alternatively a boolean user-defined function \commandf{f} that |
| 3273 |
takes a solution can be specified for \commandf{list}, such as |
| 3274 |
\begin{verbatim} |
| 3275 |
def f(s): |
| 3276 |
return s["PAR(9)"]<0 |
| 3277 |
\end{verbatim} |
| 3278 |
where only solutions are kept that satisfy the given condition. |
| 3279 |
|
| 3280 |
Type information is kept in the bifurcation diagram for plotting. |
| 3281 |
|
| 3282 |
\textbf{Alias:} commandKeepLabels |
| 3283 |
|
| 3284 |
\item[dsp] |
| 3285 |
Delete special points. |
| 3286 |
|
| 3287 |
Type \commandf{dsp(x,list)} to delete the special points in list from |
| 3288 |
the Python object x, which must be a solution list or a bifurcation diagram. |
| 3289 |
|
| 3290 |
Type \commandf{dsp(list,'xxx')} to delete from the data-files |
| 3291 |
\filef{b.xxx}, and \filef{s.xxx}.\\ |
| 3292 |
Type \commandf{dsp(list,'xxx','yyy')} to save to \filef{b.yyy} and |
| 3293 |
\filef{s.yyy} instead of \filef{?.xxx}.\\ |
| 3294 |
Type \commandf{dsp(list)} to delete from \filef{fort.7} and \filef{fort.8}. |
| 3295 |
|
| 3296 |
\commandf{list} is a label number or type name code, or a list of those, |
| 3297 |
such as 1, or [2, 3], or 'UZ' or ['BP', 'LP'], or it can be None or |
| 3298 |
omitted to mean the special points ['BP', 'LP', 'HB', 'PD', 'TR', 'EP', |
| 3299 |
'MX']\\ |
| 3300 |
Alternatively a boolean user-defined function \commandf{f} that |
| 3301 |
takes a solution can be specified for \commandf{list}, such as |
| 3302 |
\begin{verbatim} |
| 3303 |
def f(s): |
| 3304 |
return s["PAR(9)"]<0 |
| 3305 |
\end{verbatim} |
| 3306 |
where all solutions are deleted that satisfy the given condition, or |
| 3307 |
\begin{verbatim} |
| 3308 |
def f(s1,s2): |
| 3309 |
return abs(s1["L2-NORM"] - s2["L2-NORM"]) < 1e-4 |
| 3310 |
\end{verbatim} |
| 3311 |
where all solutions are compared with each other and \commandf{s2} |
| 3312 |
is deleted if the given condition is satisfied, which causes |
| 3313 |
pruning of solutions that are close to each other. |
| 3314 |
|
| 3315 |
Type information is \emph{not} kept in the bifurcation diagram. |
| 3316 |
|
| 3317 |
\textbf{Alias:} commandDeleteSpecialPoints |
| 3318 |
|
| 3319 |
\item[ksp] |
| 3320 |
Keep special points. |
| 3321 |
|
| 3322 |
Type \commandf{ksp(x,list)} to only keep the special points in list in |
| 3323 |
the Python object x, which must be a solution list or a bifurcation diagram. |
| 3324 |
|
| 3325 |
Type \commandf{ksp(list,'xxx')} to keep them in the data-files |
| 3326 |
\filef{b.xxx}, and \filef{s.xxx}.\\ |
| 3327 |
Type \commandf{ksp(list,'xxx','yyy')} to save to \filef{b.yyy} and |
| 3328 |
\filef{s.yyy} instead of \filef{?.xxx}.\\ |
| 3329 |
Type \commandf{ksp(list)} to keep them in \filef{fort.7} and \filef{fort.8}. |
| 3330 |
|
| 3331 |
\commandf{list} is a label number or type name code, or a list of those, |
| 3332 |
such as 1, or [2, 3], or 'UZ' or ['BP', 'LP'], or it can be None or |
| 3333 |
omitted to mean ['BP', 'LP', 'HB', 'PD', 'TR', 'EP', 'MX'], deleting 'UZ' and |
| 3334 |
regular points.\\ |
| 3335 |
Alternatively a boolean user-defined function \commandf{f} that |
| 3336 |
takes a solution can be specified for \commandf{list}, such as |
| 3337 |
\begin{verbatim} |
| 3338 |
def f(s): |
| 3339 |
return s["PAR(9)"]<0 |
| 3340 |
\end{verbatim} |
| 3341 |
where only solutions are kept that satisfy the given condition. |
| 3342 |
|
| 3343 |
Type information is \emph{not} kept in the bifurcation diagram. |
| 3344 |
|
| 3345 |
\textbf{Alias:} commandKeepSpecialPoints |
| 3346 |
|
| 3347 |
\item[merge] |
| 3348 |
Merge branches in data files. |
| 3349 |
|
| 3350 |
Type \commandf{y=merge(x)} to return the python object x, with its branches |
| 3351 |
merged into continuous curves, as a new object y. |
| 3352 |
|
| 3353 |
Type \commandf{merge('xxx')} to merge branches in \filef{s.xxx}, |
| 3354 |
\filef{b.xxx}, and \filef{d.xxx}. Backups of the |
| 3355 |
original files are saved. |
| 3356 |
|
| 3357 |
Type \commandf{merge('xxx','yyy')} to merge branches in the existing data-files |
| 3358 |
\filef{s.xxx}, \filef{b.xxx}, and \filef{d.xxx} and save them to |
| 3359 |
\filef{s.yyy}, \filef{b.yyy}, and \filef{d.yyy}. |
| 3360 |
|
| 3361 |
\textbf{Aliases:} mb commandMergeBranches |
| 3362 |
|
| 3363 |
\item[subtract] |
| 3364 |
Subtract branches in data files. |
| 3365 |
|
| 3366 |
Type \commandf{z=subtract(x,y,ref)} to return the python object x, where, |
| 3367 |
using interpolation, the first branch in y is subtracted from all |
| 3368 |
branches in x, as a new object z. |
| 3369 |
Use 'ref' (e.g., 'PAR(1)') as the reference column in y |
| 3370 |
(only the first monotonically increasing or decreasing part is used). |
| 3371 |
|
| 3372 |
Type \commandf{subtract('xxx','yyy','ref')} to subtract, using interpolation, the first |
| 3373 |
branch in \filef{b.yyy} from all branches in \filef{b.xxx}, |
| 3374 |
and save the result in \filef{b.xxx}. |
| 3375 |
A Backup of the original file is saved. |
| 3376 |
|
| 3377 |
Use optional arguments branch=m, and point=n, to denote the branch and |
| 3378 |
first point on that branch within y or \filef{b.yyy}, where m,n are in |
| 3379 |
{1,2,3,...}. |
| 3380 |
|
| 3381 |
\textbf{Aliases:} sb commandSubtractBranches |
| 3382 |
|
| 3383 |
\end{description} |
| 3384 |
|
| 3385 |
\subsection{Copying a demo.} |
| 3386 |
\label{sec:clui_ref_demo} |
| 3387 |
\begin{description} |
| 3388 |
\item[demo] |
| 3389 |
Copy a demo into the current directory and load it. |
| 3390 |
|
| 3391 |
Type \commandf{demo('xxx')} to copy all files from auto/07p/demos/xxx to the |
| 3392 |
current user directory. Here 'xxx' denotes a demo name; e.g., |
| 3393 |
'abc'. To avoid the overwriting of existing files, always run |
| 3394 |
demos in a clean work directory. NOTE: This command automatically |
| 3395 |
performs the \commandf{load} command as well. |
| 3396 |
|
| 3397 |
\textbf{Aliases:} dm commandCopyAndLoadDemo |
| 3398 |
|
| 3399 |
\item[copydemo] |
| 3400 |
Copy a demo into the current directory. |
| 3401 |
|
| 3402 |
Type \commandf{copydemo('xxx')} to copy all files from auto/07p/demos/xxx to the |
| 3403 |
current user directory. Here 'xxx' denotes a demo name; e.g., |
| 3404 |
'abc'. To avoid the overwriting of existing |
| 3405 |
files, always run demos in a clean work directory. |
| 3406 |
|
| 3407 |
\textbf{Aliases:} copydemo commandCopyDemo |
| 3408 |
\end{description} |
| 3409 |
|
| 3410 |
\subsection{Python data structure manipulation functions.} |
| 3411 |
\label{sec:clui_ref_python} |
| 3412 |
All commands here, except for 'man', 'gui', and 'wait' are only |
| 3413 |
provided for backwards compatibility. Alternatives are given. |
| 3414 |
\begin{description} |
| 3415 |
\item[man] |
| 3416 |
Get help on the \AUTO commands. |
| 3417 |
|
| 3418 |
Type \commandf{man} to list all commands with a online help. |
| 3419 |
Type \commandf{man xxx} or \commandf{help xxx} to get help for command \commandf{xxx}. |
| 3420 |
|
| 3421 |
\textbf{Aliases:} commandInteractiveHelp |
| 3422 |
|
| 3423 |
\item[cn] |
| 3424 |
Get the current continuation constants. |
| 3425 |
|
| 3426 |
Type \commandf{cn('xxx')} to get a parsed version of the constants file |
| 3427 |
\filef{c.xxx}. This is equivalent to the command\\ |
| 3428 |
\commandf{loadbd('xxx').c} |
| 3429 |
|
| 3430 |
\textbf{Aliases:} constantsget commandParseConstantsFile |
| 3431 |
|
| 3432 |
\item[dg] |
| 3433 |
Parse a bifurcation diagram. |
| 3434 |
|
| 3435 |
Type \commandf{dg('xxx')} to get a parsed version of the diagram file \filef{b.xxx}. |
| 3436 |
This is equivalent to the command \commandf{loadbd('xxx')} but without the |
| 3437 |
solutions in \filef{s.xxx} and without the diagnostics in \filef{d.xxx}. |
| 3438 |
|
| 3439 |
\textbf{Aliases:} diagramget commandParseDiagramFile |
| 3440 |
|
| 3441 |
\item[sl] |
| 3442 |
Parse solution file: |
| 3443 |
|
| 3444 |
Type \commandf{sl('xxx')} to get a parsed version of the solution file |
| 3445 |
\filef{s.xxx}. This is equivalent to the command\\ |
| 3446 |
\commandf{loadbd('xxx')()} |
| 3447 |
|
| 3448 |
\textbf{Aliases:} solutionget commandParseSolutionFile |
| 3449 |
|
| 3450 |
\item[bt] |
| 3451 |
Parse both bifurcation diagram and solution. |
| 3452 |
|
| 3453 |
Type \commandf{bt('xxx')} to get a parsed version of the diagram file \filef{b.xxx} |
| 3454 |
and solution file \filef{s.xxx}. |
| 3455 |
This is equivalent to the command \commandf{loadbd('xxx')} but without the |
| 3456 |
diagnostics in \filef{d.xxx}. |
| 3457 |
|
| 3458 |
\textbf{Aliases:} diagramandsolutionget commandParseDiagramAndSolutionFile |
| 3459 |
|
| 3460 |
\item[ch] |
| 3461 |
Modify continuation constants. |
| 3462 |
|
| 3463 |
Type \commandf{ch('xxx',yyy)} to change the constant \parf{'xxx'} to have |
| 3464 |
value \parf{yyy}. |
| 3465 |
This is equivalent to the command\\ |
| 3466 |
\commandf{s=load(s,xxx=yyy)}\\ |
| 3467 |
where \parf{s} is a solution. |
| 3468 |
|
| 3469 |
\textbf{Aliases:} changeconstant cc commandRunnerConfigFort2 |
| 3470 |
|
| 3471 |
\item[hch] |
| 3472 |
Modify HomCont continuation constants. |
| 3473 |
|
| 3474 |
Type \commandf{hch('xxx',yyy)} to change the HomCont constant \parf{'xxx'} to have |
| 3475 |
value \parf{yyy}. |
| 3476 |
This is equivalent to the command\\ |
| 3477 |
\commandf{s=load(s,xxx=yyy)}\\ |
| 3478 |
where \parf{s} is a solution. |
| 3479 |
|
| 3480 |
\textbf{Aliases:} commandRunnerConfigFort12 |
| 3481 |
|
| 3482 |
\item[pr] |
| 3483 |
Print continuation parameters. |
| 3484 |
|
| 3485 |
Type \commandf{pr()} to print all the parameters. |
| 3486 |
Type \commandf{pr('xxx')} to return the parameter 'xxx'. |
| 3487 |
These commands are equivalent to the commands\\ |
| 3488 |
\commandf{print s.c}\\ |
| 3489 |
\commandf{print s.c['xxx']}\\ |
| 3490 |
where \parf{s} is a solution. |
| 3491 |
|
| 3492 |
\textbf{Aliases:} pc pr printconstant commandRunnerPrintFort2 |
| 3493 |
|
| 3494 |
\item[hpr] |
| 3495 |
Print HomCont continuation parameters. |
| 3496 |
|
| 3497 |
Type \commandf{hpr()} to print all the HomCont parameters. |
| 3498 |
Type \commandf{hpr('xxx')} to return the HomCont parameter 'xxx'. |
| 3499 |
These commands are equivalent to the commands\\ |
| 3500 |
\commandf{print s.c}\\ |
| 3501 |
\commandf{print s.c['xxx']}\\ |
| 3502 |
where \parf{s} is a solution. |
| 3503 |
|
| 3504 |
\textbf{Aliases:} commandRunnerPrintFort12 |
| 3505 |
|
| 3506 |
\item[splabs] |
| 3507 |
Return special labels. |
| 3508 |
|
| 3509 |
Type \commandf{splabs('xxx',typename)} to get a list of labels with the specified |
| 3510 |
typename, where typename can be one of |
| 3511 |
'EP', 'MX', 'BP', 'LP', 'UZ', 'HB', 'PD', 'TR', or 'RG'. |
| 3512 |
This is equivalent to the command\\ |
| 3513 |
\commandf{load('xxx')(typename)}\\ |
| 3514 |
which gives a list of the solutions themselves; |
| 3515 |
\commandf{load('xxx')(typename).getLabels()}\\ |
| 3516 |
returns the list of labels. |
| 3517 |
|
| 3518 |
Or use \commandf{splabs(s,typename)} where \parf{s} is a parsed |
| 3519 |
solution from \commandf{sl()}. |
| 3520 |
This is equivalent to the command\\ |
| 3521 |
\commandf{s(typename).getLabels()} |
| 3522 |
|
| 3523 |
\textbf{Aliases:} commandSpecialPointLabels |
| 3524 |
|
| 3525 |
\item[wait] |
| 3526 |
Wait for the user to enter a key. |
| 3527 |
|
| 3528 |
Type \commandf{wait()} to have the \AUTO interface wait |
| 3529 |
until the user hits any key (mainly used in scripts). |
| 3530 |
|
| 3531 |
\textbf{Aliases:} commandWait |
| 3532 |
|
| 3533 |
\item[quit] |
| 3534 |
Quits the \AUTO CLUI |
| 3535 |
|
| 3536 |
\textbf{Aliases:} q commandQuit |
| 3537 |
|
| 3538 |
\item[gui] |
| 3539 |
Show \AUTO's graphical user interface. |
| 3540 |
|
| 3541 |
Type \commandf{gui()} to start \AUTO's graphical user interface. |
| 3542 |
|
| 3543 |
NOTE: This command is not implemented yet. |
| 3544 |
|
| 3545 |
\textbf{Aliases:} commandCreateGUI |
| 3546 |
|
| 3547 |
\end{description} |
| 3548 |
|
| 3549 |
\subsection{Shell Commands.} \label{sec:clui_ref_shell} |
| 3550 |
|
| 3551 |
\begin{description} |
| 3552 |
\item[cat] |
| 3553 |
Print the contents of a file |
| 3554 |
|
| 3555 |
Type \commandf{cat xxx} to list the contents of the file \filef{xxx}. |
| 3556 |
|
| 3557 |
\textbf{Aliases:} commandCat |
| 3558 |
|
| 3559 |
\item[cd] |
| 3560 |
Change directories. |
| 3561 |
|
| 3562 |
Type \commandf{cd xxx} to change to the directory \filef{xxx}. This command |
| 3563 |
understands both shell variables and home directory expansion. |
| 3564 |
|
| 3565 |
\textbf{Aliases:} commandCd |
| 3566 |
|
| 3567 |
\item[ls] |
| 3568 |
List the current directory. |
| 3569 |
|
| 3570 |
Type \commandf{ls} to run the system \commandf{ls} command in the |
| 3571 |
current directory. |
| 3572 |
This command will accept whatever arguments are accepted by the Unix command |
| 3573 |
\commandf{ls}. |
| 3574 |
|
| 3575 |
\textbf{Aliases:} commandLs |
| 3576 |
|
| 3577 |
\item[shell] |
| 3578 |
Run a shell command. |
| 3579 |
|
| 3580 |
Type \commandf{shell('xxx')} to run the command \commandf{xxx} |
| 3581 |
in the Unix shell and display |
| 3582 |
the results in the \AUTO command line user interface. |
| 3583 |
|
| 3584 |
\textbf{Aliases:} commandShell |
| 3585 |
\end{description} |
| 3586 |
|
| 3587 |
|
| 3588 |
%============================================================================== |
| 3589 |
%============================================================================== |
| 3590 |
\chapter{ Running {\cal AUTO} using Unix Commands.} \label{sec:command_mode} |
| 3591 |
%============================================================================== |
| 3592 |
%============================================================================== |
| 3593 |
Apart from the Python commands described in the previous chapter, |
| 3594 |
{\cal AUTO} can also be run with the GUI described in Chapter~\ref{ch:GUI}, |
| 3595 |
or using the Unix commands described below. These Unix commands run both |
| 3596 |
directly in the shell and at the {\tt AUTO} Python prompt. |
| 3597 |
The {\cal AUTO} aliases must have been activated; see Section~\ref{sec:Installation}; |
| 3598 |
and an equations-file {\tt xxx.f90} |
| 3599 |
and a corresponding constants-file {\tt c.xxx} |
| 3600 |
(see Section~\ref{ch:User_supplied_files}) |
| 3601 |
must be in the current user directory. |
| 3602 |
\\ |
| 3603 |
{\it Do not run {\cal AUTO} in the directory {\tt auto/07p} |
| 3604 |
or in any of its subdirectories.} |
| 3605 |
|
| 3606 |
Most commands only need a plain Unix shell but some use \python: the |
| 3607 |
commands that depend on \python are \commandf{@cnvc}, |
| 3608 |
\commandf{@dlb}, \commandf{@dsp}, \commandf{@klb}, \commandf{@ksp}, |
| 3609 |
\commandf{@lbf}, \commandf{@ll}, \commandf{@ls}, \commandf{@mb}, |
| 3610 |
\commandf{@pp}, and \commandf{@sb}. |
| 3611 |
|
| 3612 |
\section{ Basic commands.} |
| 3613 |
|
| 3614 |
\begin{itemize} |
| 3615 |
\item[\tt @r]: |
| 3616 |
Type \commandf{@r xxx} to run {\cal AUTO}. |
| 3617 |
Restart data, if needed, are expected in {\tt s.xxx}, |
| 3618 |
and {\cal AUTO}-constants in {\tt c.xxx}. |
| 3619 |
This is the simplest way to run {\cal AUTO}. |
| 3620 |
\item[-] |
| 3621 |
Type \commandf{@r xxx yyy} to run {\cal AUTO} |
| 3622 |
with equations-file {\tt xxx.f90} and restart data-file {\tt s.yyy}. |
| 3623 |
{\cal AUTO}-constants must be in {\tt c.xxx}. |
| 3624 |
\item[-] |
| 3625 |
Type \commandf{@r xxx yyy zzz} to run {\cal AUTO} |
| 3626 |
with equations-file {\tt xxx.f90}, restart data-file {\tt s.yyy} |
| 3627 |
and constants-file {\tt c.zzz}. |
| 3628 |
|
| 3629 |
\item[\tt @R]~: |
| 3630 |
The command \commandf{@R xxx} is equivalent to the command \commandf{@r xxx} above. |
| 3631 |
\item[-] |
| 3632 |
Type \commandf{@R xxx i} to run {\cal AUTO} with equations-file {\tt xxx.f90}, |
| 3633 |
constants-file {\tt c.xxx.i} |
| 3634 |
and, if needed, restart data-file {\tt s.xxx}. |
| 3635 |
\item[-] |
| 3636 |
Type \commandf{@R xxx i yyy} to run {\cal AUTO} |
| 3637 |
with equations-file {\tt xxx.f90}, |
| 3638 |
constants-file {\tt c.xxx.i} |
| 3639 |
and restart data-file {\tt s.yyy}. |
| 3640 |
\item[-] |
| 3641 |
Use \commandf{@@R} on case-insensitive file systems. |
| 3642 |
|
| 3643 |
\item[\tt @sv]~: |
| 3644 |
Type \commandf{@sv xxx} to save the output-files |
| 3645 |
{\tt fort.7}, {\tt fort.8}, {\tt fort.9}, |
| 3646 |
as {\tt b.xxx}, {\tt s.xxx}, {\tt d.xxx}, respectively. |
| 3647 |
Existing files by these names will be deleted. |
| 3648 |
|
| 3649 |
\item[\tt @ap]~: |
| 3650 |
Type \commandf{@ap xxx} to append the output-files |
| 3651 |
{\tt fort.7}, {\tt fort.8}, {\tt fort.9}, |
| 3652 |
to existing data-files |
| 3653 |
{\tt b.xxx}, {\tt s.xxx}, {\tt d.xxx}, resp. |
| 3654 |
\item[-] |
| 3655 |
Type \commandf{@ap xxx yyy} |
| 3656 |
to append |
| 3657 |
{\tt b.xxx}, {\tt s.xxx}, {\tt d.xxx}, to |
| 3658 |
{\tt b.yyy}, {\tt s.yyy}, {\tt d.yyy}, resp. |
| 3659 |
|
| 3660 |
\item[\tt @ll]~: |
| 3661 |
Type \commandf{@ll} to list all solutions in \filef{fort.8}.\\ |
| 3662 |
Type \commandf{@ll xxx} to list all solutions in \filef{s.xxx}. |
| 3663 |
|
| 3664 |
\item[\tt @ls]~: |
| 3665 |
Type \commandf{@ls} to list the abbreviated contents of \filef{fort.7}.\\ |
| 3666 |
Type \commandf{@ls xxx} to list the abbreviated contents of \filef{b.xxx}.\\ |
| 3667 |
The contents are shown in a similar format as the screen output of |
| 3668 |
AUTO runs. |
| 3669 |
|
| 3670 |
\item[\tt @lbf]~: |
| 3671 |
Type \commandf{@lbf} to list the contents of \filef{fort.7}.\\ |
| 3672 |
Type \commandf{@lbf xxx} to list the contents of \filef{b.xxx}.\\ |
| 3673 |
The contents are shown with less accuracy (6 instead of 11 |
| 3674 |
significant figures) than in the actual file for easier viewing. |
| 3675 |
|
| 3676 |
|
| 3677 |
\end{itemize} |
| 3678 |
|
| 3679 |
\section{ Plotting commands.} |
| 3680 |
|
| 3681 |
\begin{itemize} |
| 3682 |
|
| 3683 |
\item[\tt @pp]~: |
| 3684 |
Type \commandf{@pp xxx} to run the graphics program {\cal PyPLAUT} |
| 3685 |
(See Chapter~\ref{ch:PLAUT}) |
| 3686 |
for the graphical inspection of the data-files |
| 3687 |
{\tt b.xxx} and {\tt s.xxx}. |
| 3688 |
\item[-] |
| 3689 |
Type \commandf{@pp} to run the graphics program {\cal PyPLAUT} |
| 3690 |
for the graphical inspection of the output-files |
| 3691 |
{\tt fort.7} and {\tt fort.8}. |
| 3692 |
|
| 3693 |
\item[\tt @pl]~: |
| 3694 |
The command \commandf{@pl} is equivalent to {\tt @pp} but runs |
| 3695 |
the graphics program {\cal PLAUT04} instead. |
| 3696 |
(See Chapter~\ref{ch:PLAUT04}) |
| 3697 |
|
| 3698 |
\item[\tt @r3b]~: |
| 3699 |
The command \commandf{@r3b} is equivalent to {\tt @pp} but runs |
| 3700 |
the graphics program {\cal PLAUT04} instead in R3B mode. |
| 3701 |
(See Chapter~\ref{ch:PLAUT04}) |
| 3702 |
|
| 3703 |
\item[\tt @p]~: |
| 3704 |
The command \commandf{@p} is equivalent to {\tt @pp} but runs |
| 3705 |
the graphics program {\cal PLAUT} instead. |
| 3706 |
(See Chapter~\ref{ch:PLAUT}) |
| 3707 |
|
| 3708 |
\item[\tt @ps]~: |
| 3709 |
Type \commandf{@ps fig.x} to convert a saved {\cal PLAUT} figure {\tt fig.x} |
| 3710 |
from compact {\cal PLOT10} format to {\cal PostScript} format. |
| 3711 |
The converted file is called {\tt fig.x.ps}. |
| 3712 |
The original file is left unchanged. |
| 3713 |
|
| 3714 |
\end{itemize} |
| 3715 |
|
| 3716 |
\section{ File-manipulation.} |
| 3717 |
|
| 3718 |
\begin{itemize} |
| 3719 |
|
| 3720 |
\item[\tt @cp]~: |
| 3721 |
Type \commandf{@cp name1 name2}, or \commandf{@cp name1 |
| 3722 |
name2 name3}, or \commandf{@cp name1 name2 name3 name4} to |
| 3723 |
copy the data-files \filef{dir1/c.xxx}, \filef{dir1/b.xxx}, |
| 3724 |
\filef{dir1/s.xxx}, and \filef{dir1/d.xxx}, to \filef{dir2/c.yyy}, |
| 3725 |
\filef{dir2/b.yyy}, \filef{dir2/s.yyy}, and \filef{dir2/d.yyy}. |
| 3726 |
|
| 3727 |
The values of \filef{dir1/?.xxx} and \filef{dir2/?.yyy} are as |
| 3728 |
follows, depending on whether \filef{name1} is a directory or |
| 3729 |
\filef{name2} is a directory: |
| 3730 |
|
| 3731 |
\commandf{@cp name1 name2}\\ |
| 3732 |
no directory names: \filef{./?.name1} and \filef{./?.name2}\\ |
| 3733 |
\filef{name1} is a directory: \filef{name1/?.name2} and \filef{./?.name2}\\ |
| 3734 |
\filef{name2} is a directory: \filef{./?.name1} and \filef{name2/?.name1} |
| 3735 |
|
| 3736 |
\commandf{@cp name1 name2 name3}\\ |
| 3737 |
\filef{name1} is a directory: \filef{name1/?.name2} and \filef{./?.name3}\\ |
| 3738 |
\filef{name2} is a directory: \filef{./?.name1} and \filef{name2/?.name3} |
| 3739 |
|
| 3740 |
\commandf{@cp name1 name2 name3 name4}\\ |
| 3741 |
\filef{name1/?.name2} and \filef{name3/?.name4} |
| 3742 |
|
| 3743 |
\item[\tt @mv]~: |
| 3744 |
Type \commandf{@mv name1 name2}, or \commandf{@mv name1 name2 |
| 3745 |
name3)}, or \commandf{@mv name1 name2 name3 name4} to |
| 3746 |
move the data-files \filef{dir1/b.xxx}, \filef{dir1/s.xxx}, and |
| 3747 |
\filef{dir1/d.xxx}, to \filef{dir2/b.yyy}, \filef{dir2/s.yyy}, and |
| 3748 |
\filef{dir2/d.yyy}, and copy the constants |
| 3749 |
file \filef{dir1/c.xxx} to \filef{dir2/c.yyy}. |
| 3750 |
|
| 3751 |
The values of \filef{dir1/?.xxx} and \filef{dir2/?.yyy} are determined |
| 3752 |
in the same way as for \commandf{@cp} above. |
| 3753 |
|
| 3754 |
\item[\tt @df]~: |
| 3755 |
Type \commandf{@df} |
| 3756 |
to delete the output-files |
| 3757 |
{\tt fort.7}, {\tt fort.8}, {\tt fort.9}. |
| 3758 |
|
| 3759 |
\item[\tt @cl]~: |
| 3760 |
Type \commandf{@cl} |
| 3761 |
to clean the current directory. |
| 3762 |
This command will delete all files of the form |
| 3763 |
{\tt fort.*}, {\tt *.o}, {\tt *.*\~{}}, and {\tt *.exe}. |
| 3764 |
|
| 3765 |
\item[\tt @dl]~: |
| 3766 |
Type \commandf{@dl xxx} |
| 3767 |
to delete the data-files |
| 3768 |
{\tt b.xxx}, {\tt s.xxx}, {\tt d.xxx}. |
| 3769 |
|
| 3770 |
\item[\tt @cnvc]~: |
| 3771 |
Type \commandf{@cnvc xxx yyy} to convert old-format constants files |
| 3772 |
\filef{c.xxx} and \filef{h.xxx} to a new-format constant file |
| 3773 |
\filef{c.yyy}.\\ |
| 3774 |
The command \commandf{@cnvc xxx} overwrites the file \filef{c.xxx} |
| 3775 |
with the new style file and deletes \filef{h.xxx} if it exists. |
| 3776 |
|
| 3777 |
\item[\tt @rn]~: |
| 3778 |
Type \commandf{@rn} to rename, within the current directory, all |
| 3779 |
old-named constants, HomCont, bifurcation |
| 3780 |
diagram, and solution files starting with \filef{r.}, \filef{s.}, |
| 3781 |
\filef{p.}, and \filef{q.} to files with the new prefixes |
| 3782 |
\filef{c.}, \filef{h.}, \filef{b.}, and \filef{s.}. |
| 3783 |
|
| 3784 |
\item[\tt @rc]~: |
| 3785 |
Type \commandf{@rc} to do a recovery by swapping the backup files |
| 3786 |
\filef{fort.7\~{}} and \filef{fort.8\~{}} with the files |
| 3787 |
\filef{fort.7} and \filef{fort.8}.\\ |
| 3788 |
Type \commandf{@rc xxx} to do a recovery by swapping the backup files |
| 3789 |
\filef{b.xxx} and \filef{s.xxx} with the files |
| 3790 |
\filef{b.xxx\~{}} and \filef{s.xxx\~{}}. |
| 3791 |
|
| 3792 |
\item[\tt @gz]~: |
| 3793 |
Type \commandf{@gz} to compress, using \commandf{gzip} all output |
| 3794 |
files in the current directory. |
| 3795 |
|
| 3796 |
\item[\tt @uz]~: |
| 3797 |
Type \commandf{@uz} to decompress, using \commandf{unzip} all output |
| 3798 |
files in the current directory. |
| 3799 |
|
| 3800 |
\item[\tt @sr]~: |
| 3801 |
Type \commandf{@sr xxx y} to copy \filef{c.xxx} to \filef{c.xxx.y}. |
| 3802 |
|
| 3803 |
\end{itemize} |
| 3804 |
|
| 3805 |
\section{ Diagnostics.} |
| 3806 |
|
| 3807 |
\begin{itemize} |
| 3808 |
\item[\tt @lp]~: |
| 3809 |
Type \commandf{@lp} to list the value of the ``limit point function'' |
| 3810 |
in the output-file {\tt fort.9}. This function |
| 3811 |
vanishes at a limit point (fold). |
| 3812 |
\item[-] |
| 3813 |
Type \commandf{@lp xxx} to list the value of the ``limit point function'' |
| 3814 |
in the data-file {\tt d.xxx}. This function |
| 3815 |
vanishes at a limit point (fold). |
| 3816 |
\item[\tt @bp]~: |
| 3817 |
Type \commandf{@bp} to list the value of the ``branch-point function'' |
| 3818 |
in the output-file {\tt fort.9}. This function |
| 3819 |
vanishes at a branch point. |
| 3820 |
\item[-] |
| 3821 |
Type \commandf{@bp xxx} to list the value of the ``branch-point function'' |
| 3822 |
in the data-file {\tt d.xxx}. This function |
| 3823 |
vanishes at a branch point. |
| 3824 |
\item[\tt @hb]~: |
| 3825 |
Type \commandf{@hb} to list the value of the ``Hopf function'' |
| 3826 |
in the output-file {\tt fort.9}. This function |
| 3827 |
vanishes at a Hopf bifurcation point. |
| 3828 |
\item[-] |
| 3829 |
Type \commandf{@hb xxx} to list the value of the ``Hopf function'' |
| 3830 |
in the data-file {\tt d.xxx}. This function |
| 3831 |
vanishes at a Hopf bifurcation point. |
| 3832 |
\item[\tt @ho]~: |
| 3833 |
The command \commandf{@ho} is an alias to \commandf{@hb} above. |
| 3834 |
\item[\tt @sp]~: |
| 3835 |
Type \commandf{@sp} to list the value of the |
| 3836 |
``secondary-periodic bifurcation function'' |
| 3837 |
in the output-file {\tt fort.9}. This function |
| 3838 |
vanishes at period-doubling and torus bifurcations. |
| 3839 |
\item[-] |
| 3840 |
Type \commandf{@sp xxx} to list the value of the |
| 3841 |
``secondary-periodic bifurcation function'' |
| 3842 |
in the data-file {\tt d.xxx}. This function |
| 3843 |
vanishes at period-doubling and torus bifurcations. |
| 3844 |
\item[\tt @it]~: |
| 3845 |
Type \commandf{@it} to list the number of Newton iterations per |
| 3846 |
continuation step in {\tt fort.9}. |
| 3847 |
\item[-] |
| 3848 |
Type \commandf{@it xxx} to list the number of Newton iterations per |
| 3849 |
continuation step in {\tt d.xxx}. |
| 3850 |
\item[\tt @st]~: |
| 3851 |
Type \commandf{@st} to list the number of stable eigenvalues or stable |
| 3852 |
Floquet multipliers per continuation step in {\tt fort.9}. |
| 3853 |
\item[\tt @ss]~: |
| 3854 |
Type \commandf{@st} to list the continuation step size for each |
| 3855 |
continuation step in {\tt fort.9}. |
| 3856 |
\item[-] |
| 3857 |
Type \commandf{@st xxx} to list the continuation step size for each |
| 3858 |
continuation step in {\tt d.xxx}. |
| 3859 |
\item[\tt @ev]~: |
| 3860 |
Type \commandf{@ev} to list the eigenvalues of the Jacobian |
| 3861 |
in {\tt fort.9}. |
| 3862 |
(Algebraic problems.) |
| 3863 |
\item[-] |
| 3864 |
Type \commandf{@ev xxx} to list the eigenvalues of the Jacobian |
| 3865 |
in {\tt d.xxx}. |
| 3866 |
(Algebraic problems.) |
| 3867 |
\item[\tt @fl]~: |
| 3868 |
Type \commandf{@fl} to list the Floquet multipliers |
| 3869 |
in the output-file {\tt fort.9}. |
| 3870 |
(Differential equations.) |
| 3871 |
\item[-] |
| 3872 |
Type \commandf{@fl xxx} to list the Floquet multipliers |
| 3873 |
in the data-file {\tt d.xxx}. |
| 3874 |
(Differential equations.) |
| 3875 |
\item[\tt @no]~: |
| 3876 |
Type \commandf{@no} to show any notes in {\tt fort.9}. |
| 3877 |
\item[-] |
| 3878 |
Type \commandf{@no xxx} to show any notes in {\tt d.xxx}. |
| 3879 |
\end{itemize} |
| 3880 |
|
| 3881 |
\section{ File-editing.} |
| 3882 |
|
| 3883 |
\begin{itemize} |
| 3884 |
|
| 3885 |
\item[\tt @e7]~: |
| 3886 |
To use the vi editor to edit the output-file {\tt fort.7}. |
| 3887 |
\item[\tt @e8]~: |
| 3888 |
To use the vi editor to edit the output-file {\tt fort.8}. |
| 3889 |
\item[\tt @e9]~: |
| 3890 |
To use the vi editor to edit the output-file {\tt fort.9}. |
| 3891 |
\item[\tt @j7]~: |
| 3892 |
To use the SGI jot editor to edit the output-file {\tt fort.7}. |
| 3893 |
\item[\tt @j8]~: |
| 3894 |
To use the SGI jot editor to edit the output-file {\tt fort.8}. |
| 3895 |
\item[\tt @j9]~: |
| 3896 |
To use the SGI jot editor to edit the output-file {\tt fort.9}. |
| 3897 |
|
| 3898 |
\end{itemize} |
| 3899 |
|
| 3900 |
\section{ File-maintenance.} |
| 3901 |
|
| 3902 |
\begin{itemize} |
| 3903 |
\item[\tt @rl]~: |
| 3904 |
Type \commandf{@rl} to sequentially relabel solutions with the numbers $1,2,3,\ldots$ |
| 3905 |
in the output-files {\tt fort.7} and {\tt fort.8}. |
| 3906 |
The original files are backed up as |
| 3907 |
{\tt fort.7$\sim$} and {\tt fort.8$\sim$}. |
| 3908 |
\item[-] |
| 3909 |
Type \commandf{@rl xxx} to relabel solutions |
| 3910 |
in the data-files {\tt b.xxx} and {\tt s.xxx}. |
| 3911 |
The original files are backed up as {\tt b.xxx$\sim$} and {\tt s.xxx$\sim$}. |
| 3912 |
\item[-] |
| 3913 |
Type \commandf{@rl xxx yyy} to relabel solutions |
| 3914 |
in the data-files {\tt b.xxx} and {\tt s.xxx}. |
| 3915 |
The modified files are written as {\tt b.yyy} and {\tt s.yyy}. |
| 3916 |
|
| 3917 |
\item[\tt @lb]~: |
| 3918 |
Type \commandf{@lb} to run an interactive utility program |
| 3919 |
for listing, deleting and relabeling solutions and branches |
| 3920 |
in the output-files {\tt fort.7} and {\tt fort.8}. |
| 3921 |
The original files are backed up as |
| 3922 |
{\tt fort.7$\sim$} and {\tt fort.8$\sim$}. |
| 3923 |
\item[-] |
| 3924 |
Type \commandf{@lb xxx} to list, delete and relabel solutions and branches |
| 3925 |
in the data-files {\tt b.xxx} and {\tt s.xxx}. |
| 3926 |
The original files are backed up as {\tt b.xxx$\sim$} and {\tt s.xxx$\sim$}. |
| 3927 |
\item[-] |
| 3928 |
Type \commandf{@lb xxx yyy} to list, delete and relabel solutions |
| 3929 |
in the data-files {\tt b.xxx} and {\tt s.xxx}. |
| 3930 |
The modified files are written as {\tt b.yyy} and {\tt s.yyy}. |
| 3931 |
|
| 3932 |
\item[\tt @LB]~: |
| 3933 |
Type \commandf{@LB} or \commandf{@@LB} on case-insensitive file |
| 3934 |
systems is equivalent to \commandf{@lb} above but moves instead of |
| 3935 |
copies files so that it is much quicker but interrupts may be harmful. |
| 3936 |
|
| 3937 |
\item[\tt @fc]~: |
| 3938 |
Type \commandf{@fc xxx} to convert a user-supplied data file {\tt xxx.dat} |
| 3939 |
to {\cal AUTO} format. The converted file is called {\tt s.dat}. |
| 3940 |
The original file is left unchanged. |
| 3941 |
{\cal AUTO} automatically sets the period in {\tt PAR(11)}. |
| 3942 |
Other parameter values must be set in {\tt STPNT}. (When necessary, |
| 3943 |
{\tt PAR(11)} may also be redefined there.) |
| 3944 |
The constants-file file {\tt c.xxx} must be present, as the |
| 3945 |
{\cal AUTO}-constants {\tt NTST} and {\tt NCOL} |
| 3946 |
(Sections~\ref{sec:NTST} and \ref{sec:NCOL}) are used to define the new mesh. |
| 3947 |
|
| 3948 |
Note: this technique has been obsoleted by the 'dat' AUTO constant |
| 3949 |
in Section~\ref{sec:dat}. |
| 3950 |
|
| 3951 |
\item[\tt @db]~: |
| 3952 |
Type \commandf{@db} to double the solution in \filef{fort.8}. |
| 3953 |
Type \commandf{@db xxx} to double the solution in \filef{s.xxx}. |
| 3954 |
|
| 3955 |
\item[\tt @tr]~: |
| 3956 |
Type \commandf{@tr} to triple the solution in \filef{fort.8}. |
| 3957 |
Type \commandf{@tr xxx} to triple the solution in \filef{s.xxx}. |
| 3958 |
|
| 3959 |
\item[\tt @dlb]~: |
| 3960 |
Type \commandf{@dlb} to delete all special labels in \filef{fort.7} and |
| 3961 |
\filef{fort.8}. Backups are made.\\ |
| 3962 |
Type \commandf{@dlb xxx} to delete all special labels in \filef{b.xxx} and |
| 3963 |
\filef{s.xxx}. Backups are made.\\ |
| 3964 |
Type \commandf{@dlb xxx yyy} to delete all special labels in \filef{b.xxx} and |
| 3965 |
\filef{s.xxx}. The output is written to \filef{b.yyy} and |
| 3966 |
\filef{s.yyy}.\\ |
| 3967 |
Optionally, give an argument of the form |
| 3968 |
\commandf{-UZ}, \commandf{-HB}, \commandf{-LP}, \commandf{-EP}, \commandf{-PD}, |
| 3969 |
\commandf{-TR}, \commandf{-BP}, \commandf{-MX}, or \commandf{-RG} to |
| 3970 |
remove all labels with the given type, as in |
| 3971 |
\commandf{@dlb -UZ xxx}; otherwise only labels with type UZ and |
| 3972 |
regular labels are kept.\\ |
| 3973 |
Type information is kept in the bifurcation diagram for plotting. |
| 3974 |
|
| 3975 |
\item[\tt @klb]~: |
| 3976 |
Type \commandf{@klb} to keep all special labels in \filef{fort.7} and |
| 3977 |
\filef{fort.8}. Backups are made.\\ |
| 3978 |
Type \commandf{@klb xxx} to keep all special labels in \filef{b.xxx} and |
| 3979 |
\filef{s.xxx}. Backups are made.\\ |
| 3980 |
Type \commandf{@klb xxx yyy} to keep all special labels in \filef{b.xxx} and |
| 3981 |
\filef{s.xxx}. The output is written to \filef{b.yyy} and |
| 3982 |
\filef{s.yyy}.\\ |
| 3983 |
Optionally, give an argument of the form |
| 3984 |
\commandf{-UZ}, \commandf{-HB}, \commandf{-LP}, \commandf{-EP}, \commandf{-PD}, |
| 3985 |
\commandf{-TR}, \commandf{-BP}, \commandf{-MX}, or \commandf{-RG} to |
| 3986 |
keep all labels with the given type, as in |
| 3987 |
\commandf{@klb -UZ xxx} and remove all others; |
| 3988 |
otherwise all labels are kept except for labels with type UZ and regular labels.\\ |
| 3989 |
Type information is kept in the bifurcation diagram for plotting. |
| 3990 |
|
| 3991 |
\item[\tt @dsp]~: |
| 3992 |
The command \commandf{@dsp} is equivalent to the command \commandf{@dlb} |
| 3993 |
above, except that |
| 3994 |
type information is \emph{not} kept in the bifurcation diagram for plotting. |
| 3995 |
|
| 3996 |
\item[\tt @ksp]~: |
| 3997 |
The command \commandf{@ksp} is equivalent to the command \commandf{@klb} |
| 3998 |
above, except that |
| 3999 |
type information is \emph{not} kept in the bifurcation diagram for plotting. |
| 4000 |
|
| 4001 |
\item[\tt @dlp]~: |
| 4002 |
The command \commandf{@dlp} is equivalent to the command \commandf{@dsp -LP} |
| 4003 |
above. |
| 4004 |
|
| 4005 |
\item[\tt @kbp]~: |
| 4006 |
The command \commandf{@kbp} is equivalent to the command \commandf{@ksp -BP} |
| 4007 |
above. |
| 4008 |
|
| 4009 |
\item[\tt @klp]~: |
| 4010 |
The command \commandf{@klp} is equivalent to the command \commandf{@ksp -LP} |
| 4011 |
above. |
| 4012 |
|
| 4013 |
\item[\tt @kuz]~: |
| 4014 |
The command \commandf{@kuz} is equivalent to the command \commandf{@ksp -UZ} |
| 4015 |
above. |
| 4016 |
|
| 4017 |
\item[\tt @rd]~: |
| 4018 |
Type \commandf{@rd} to reduce the solution in \filef{fort.7} |
| 4019 |
and \filef{fort.8}.\\ |
| 4020 |
Type \commandf{@rd xxx} to reduce the solution in \filef{b.xxx} and |
| 4021 |
\filef{s.xxx}.\\ |
| 4022 |
Reducing means that all even regular point solutions |
| 4023 |
(from \parf{NPR}: the 2nd, 4th, 6th, etc.) are deleted from the files. |
| 4024 |
|
| 4025 |
\item[\tt @RD]~: |
| 4026 |
The commands \commandf{@RD} and \commandf{@@RD} (for |
| 4027 |
case-insensitive file systems) are equivalent to \commandf{@rd} |
| 4028 |
above but are faster, though not reliable when interrupting, |
| 4029 |
by using moves instead of copies. |
| 4030 |
|
| 4031 |
\item[\tt @mb]~: |
| 4032 |
Type \commandf{@mb} to merge branches into continuous curves |
| 4033 |
in \filef{fort.7}, \filef{fort.8}, and \filef{fort.9}. Backups of the |
| 4034 |
original files are saved.\\ |
| 4035 |
Type \commandf{@mb xxx} to merge branches in \filef{s.xxx}, |
| 4036 |
\filef{b.xxx}, and \filef{d.xxx}. Backups of the |
| 4037 |
original files are saved.\\ |
| 4038 |
Type \commandf{@mb xxx yyy} to merge branches in \filef{s.xxx}, |
| 4039 |
\filef{b.xxx}, and \filef{d.xxx}, |
| 4040 |
and save them to \filef{s.yyy}, \filef{b.yyy}, and \filef{d.yyy}. |
| 4041 |
|
| 4042 |
\item[\tt @sb]~: |
| 4043 |
Type \commandf{@sb xxx yyy ref} to subtract, using interpolation, the first |
| 4044 |
branch in \filef{b.yyy} from all branches in \filef{b.xxx}, |
| 4045 |
and save the result in \filef{b.xxx}. |
| 4046 |
Use \commandf{ref} (e.g., \commandf{PAR(1)}) as the reference |
| 4047 |
column in \filef{b.yyy}. |
| 4048 |
(only the first monotonically increasing or decreasing part is used). |
| 4049 |
A Backup of the original file is saved. |
| 4050 |
|
| 4051 |
Use optional fourth and fifth arguments \commandf{m}, and |
| 4052 |
\commandf{n}, to denote the |
| 4053 |
branch $m$ and first point $n$ on that branch within \filef{b.yyy}, |
| 4054 |
where $m,n$ are in $\{1,2,3,\ldots\}$. |
| 4055 |
|
| 4056 |
\item[\tt @zr]~: |
| 4057 |
Type \commandf{@zr xxx} to zero all small numbers, with absolute |
| 4058 |
value less than $10^{-16}$ in \filef{s.xxx}. A backup file is made. |
| 4059 |
|
| 4060 |
\end{itemize} |
| 4061 |
|
| 4062 |
\section{ HomCont commands.} |
| 4063 |
|
| 4064 |
Note that the \commandf{@h} and \commandf{@H} are obsolete with |
| 4065 |
new-style constants files, where HomCont constants can be included in |
| 4066 |
the main constant file with a {\tt c.} prefix. |
| 4067 |
\begin{itemize} |
| 4068 |
\item[\tt @h]~: |
| 4069 |
Use {\tt @h} instead of {\tt @r} when using {\cal HomCont}, i.e., when {\tt IPS}=9 |
| 4070 |
(see Chapter~\ref{ch:HomCont}). |
| 4071 |
Type \commandf{@h xxx} to run {\cal AUTO}/{\cal HomCont}. |
| 4072 |
Restart data, if needed, are expected in {\tt s.xxx}, |
| 4073 |
{\cal AUTO}-constants in {\tt c.xxx} and {\cal HomCont}-constants in {\tt h.xxx}. |
| 4074 |
\item[-] |
| 4075 |
Type \commandf{@h xxx yyy} to run {\cal AUTO}/{\cal HomCont} |
| 4076 |
with equations-file {\tt xxx.f90} and restart data-file {\tt s.yyy}. |
| 4077 |
{\cal AUTO}-constants must be in {\tt c.xxx} and {\cal HomCont}-constants in {\tt h.xxx}. |
| 4078 |
\item[-] |
| 4079 |
Type \commandf{@h xxx yyy zzz} to run {\cal AUTO}/{\cal HomCont} |
| 4080 |
with equations-file {\tt xxx.f90}, restart data-file {\tt s.yyy} |
| 4081 |
and constants-files {\tt c.zzz} and {\tt h.zzz}. |
| 4082 |
|
| 4083 |
\item[\tt @H]~: |
| 4084 |
The command \commandf{@H xxx} is equivalent to the command \commandf{@h xxx} above. |
| 4085 |
\item[-] |
| 4086 |
Type \commandf{@H xxx i} to run {\cal AUTO}/{\cal HomCont} with equations-file {\tt xxx.f90} |
| 4087 |
and constants-files {\tt c.xxx.i} and {\tt h.xxx.i} |
| 4088 |
and, if needed, restart data-file {\tt s.xxx}. |
| 4089 |
\item[-] |
| 4090 |
Type \commandf{@H xxx i yyy} to run {\cal AUTO}/{\cal HomCont} |
| 4091 |
with equations-file {\tt xxx.f90}, |
| 4092 |
constants-files {\tt c.xxx.i} and {\tt h.xxx.i}, |
| 4093 |
and restart data-file {\tt s.yyy}. |
| 4094 |
\item[-] |
| 4095 |
Use \commandf{@@H} on case-insensitive file systems. |
| 4096 |
\end{itemize} |
| 4097 |
|
| 4098 |
\section{ Copying a demo.} |
| 4099 |
|
| 4100 |
\begin{itemize} |
| 4101 |
|
| 4102 |
\item[\tt @dm]~: |
| 4103 |
Type \commandf{@dm xxx} |
| 4104 |
to copy all files |
| 4105 |
from {\tt auto/07p/demos/xxx} |
| 4106 |
to the current user directory. |
| 4107 |
Here {\tt xxx} denotes a demo name; e.g., {\tt abc}. |
| 4108 |
Note that the \commandf{@dm} command also copies \filef{.auto} files |
| 4109 |
to the current user directory. To avoid the overwriting of |
| 4110 |
existing files, always run demos in a clean work directory. |
| 4111 |
\end{itemize} |
| 4112 |
|
| 4113 |
\section{ Viewing the manual.} |
| 4114 |
|
| 4115 |
\begin{itemize} |
| 4116 |
|
| 4117 |
\item[\tt @mn]~: Use {\cal gv} or {\cal evince} to view the PDF version of this manual. |
| 4118 |
\end{itemize} |
| 4119 |
|
| 4120 |
\newpage |
| 4121 |
|
| 4122 |
%============================================================================== |
| 4123 |
%============================================================================== |
| 4124 |
\chapter{ Output Files.} \label{ch:Output_files} |
| 4125 |
%============================================================================== |
| 4126 |
%============================================================================== |
| 4127 |
{\cal AUTO} writes to standard output and three output-files~: |
| 4128 |
\begin{itemize} |
| 4129 |
\item[-] standard output:~ |
| 4130 |
A summary of the computation is written to standard output, which usually |
| 4131 |
corresponds to the window in which {\cal AUTO} is run. |
| 4132 |
Only special, labeled solution points are noted, namely those listed |
| 4133 |
in Tables~\ref{tbl:Solution_Types} and \ref{tbl:Codim2_Solution_Types} |
| 4134 |
The letter codes in the Table are used in the screen output. |
| 4135 |
The numerical codes are used internally and in |
| 4136 |
the {\tt fort.7} and {\tt fort.8} output-files described below. |
| 4137 |
|
| 4138 |
\begin{table}[htbp] |
| 4139 |
\begin{center} |
| 4140 |
\begin{tabular}{| l | r | l |} |
| 4141 |
\hline |
| 4142 |
BP & (1) & Branch point (algebraic systems) \\ |
| 4143 |
\hline |
| 4144 |
LP & (2) & Fold (algebraic systems) \\ |
| 4145 |
\hline |
| 4146 |
HB & (3) & Hopf bifurcation \\ |
| 4147 |
\hline |
| 4148 |
& (4) & User-specified regular output point \\ |
| 4149 |
\hline |
| 4150 |
UZ & (-4) & Output at user-specified parameter value \\ |
| 4151 |
\hline |
| 4152 |
LP & (5) & Fold (differential equations) \\ |
| 4153 |
\hline |
| 4154 |
BP & (6) & Branch point (differential equations) \\ |
| 4155 |
\hline |
| 4156 |
PD & (7) & Period doubling bifurcation \\ |
| 4157 |
\hline |
| 4158 |
TR & (8) & Torus bifurcation \\ |
| 4159 |
\hline |
| 4160 |
EP & (9) & End point of family; normal termination \\ |
| 4161 |
\hline |
| 4162 |
MX & (-9) & Abnormal termination; no convergence \\ |
| 4163 |
\hline |
| 4164 |
\end{tabular} |
| 4165 |
\caption{Solution Types.} |
| 4166 |
\label{tbl:Solution_Types} |
| 4167 |
\end{center} |
| 4168 |
\end{table} |
| 4169 |
|
| 4170 |
\begin{table}[htbp] |
| 4171 |
\begin{center} |
| 4172 |
\begin{tabular}{| l | r | l |} |
| 4173 |
\hline |
| 4174 |
BT & (-21) & Bogdanov-Takens bifurcation on fold curve (algebraic systems)\\ |
| 4175 |
\hline |
| 4176 |
BT & (-31) & Bogdanov-Takens bifurcation on Hopf curve \\ |
| 4177 |
\hline |
| 4178 |
CP & (-22) & Cusp bifurcation on fold curve (algebraic systems)\\ |
| 4179 |
\hline |
| 4180 |
GH & (-32) & Generalized Hopf bifurcation on Hopf curve \\ |
| 4181 |
\hline |
| 4182 |
ZH & (-13) & Zero-Hopf on BP curve (algebraic systems)\\ |
| 4183 |
\hline |
| 4184 |
ZH & (-23) & Zero-Hopf on Fold curve (algebraic systems)\\ |
| 4185 |
\hline |
| 4186 |
ZH & (-33) & Zero-Hopf on Hopf curve \\ |
| 4187 |
\hline |
| 4188 |
R1 & (-25) & 1:1 resonance on Fold (maps) \\ |
| 4189 |
\hline |
| 4190 |
R1 & (-55) & 1:1 resonance on Fold (periodic solutions) \\ |
| 4191 |
\hline |
| 4192 |
R1 & (-85) & 1:1 resonance on Torus (periodic solutions, maps) \\ |
| 4193 |
\hline |
| 4194 |
R2 & (-76) & 1:2 resonance on PD (periodic solutions, maps) \\ |
| 4195 |
\hline |
| 4196 |
R2 & (-86) & 1:2 resonance on Torus (periodic solutions, maps) \\ |
| 4197 |
\hline |
| 4198 |
R3 & (-87) & 1:3 resonance on Torus (periodic solutions, maps) \\ |
| 4199 |
\hline |
| 4200 |
R4 & (-88) & 1:4 resonance on Torus (periodic solutions, maps) \\ |
| 4201 |
\hline |
| 4202 |
LPD & (28) & Fold-flip bifurcation on Fold (maps) \\ |
| 4203 |
\hline |
| 4204 |
LPD & (78) & Fold-flip bifurcation on PD (maps) \\ |
| 4205 |
\hline |
| 4206 |
LTR & (23) & Fold-torus bifurcation on Fold (maps) \\ |
| 4207 |
\hline |
| 4208 |
LTR & (83) & Fold-torus bifurcation on Torus (maps) \\ |
| 4209 |
\hline |
| 4210 |
PTR & (77) & Flip-torus bifurcation on PD (maps) \\ |
| 4211 |
\hline |
| 4212 |
PTR & (87) & Flip-torus bifurcation on Torus (maps) \\ |
| 4213 |
\hline |
| 4214 |
TTR & (88) & Torus-torus bifurcation on Torus (maps) \\ |
| 4215 |
\hline |
| 4216 |
\end{tabular} |
| 4217 |
\caption{Codimension-two solution types. |
| 4218 |
Note that the absolute value of the numerical code divided by 10 |
| 4219 |
gives the type of the curve on which the special point occurs.} |
| 4220 |
\label{tbl:Codim2_Solution_Types} |
| 4221 |
\end{center} |
| 4222 |
\end{table} |
| 4223 |
|
| 4224 |
\item[-] {\tt fort.7}~:~ |
| 4225 |
The {\tt fort.7} output-file contains the bifurcation diagram. |
| 4226 |
Its format is the same as the {\tt fort.6} (screen) output, |
| 4227 |
but the {\tt fort.7} output is more extensive, as every solution point has |
| 4228 |
an output line printed. |
| 4229 |
\item[-] {\tt fort.8}~:~ |
| 4230 |
The {\tt fort.8} output-file contains complete graphics and restart data |
| 4231 |
for selected, labeled solutions. |
| 4232 |
The information per solution is generally much more extensive than |
| 4233 |
that in {\tt fort.7}. |
| 4234 |
The {\tt fort.8} output should normally be kept to a minimum. |
| 4235 |
\item[-] {\tt fort.9}~:~ |
| 4236 |
Diagnostic messages, convergence history, eigenvalues, and |
| 4237 |
Floquet multipliers are written in {\tt fort.9}. |
| 4238 |
It is strongly recommended that this output be habitually inspected. |
| 4239 |
The amount of diagnostic data can be controlled via the {\cal AUTO}-constant {\tt IID}; |
| 4240 |
see Section~\ref{sec:IID}. |
| 4241 |
\end{itemize} |
| 4242 |
|
| 4243 |
The user has some control over the {\tt fort.6} (screen) and {\tt fort.7} output |
| 4244 |
via the {\cal AUTO}-constant {\tt IPLT} (Section~\ref{sec:IPLT}). |
| 4245 |
Furthermore, the routine {\tt PVLS} can be used to define ``solution measures'' |
| 4246 |
which can then be printed by ``parameter overspecification''; |
| 4247 |
see Section~\ref{sec:Parameter_over_specification}. |
| 4248 |
For an example see demo {\tt pvl}. |
| 4249 |
|
| 4250 |
The {\cal AUTO}-commands \commandf{@sv}(\commandf{sv}), \commandf{@ap}(\commandf{ap}), |
| 4251 |
and \commandf{@df}(\commandf{df}) can be used |
| 4252 |
to manipulate the output-files {\tt fort.7}, {\tt fort.8}, |
| 4253 |
and {\tt fort.9}. |
| 4254 |
Furthermore, the {\cal AUTO}-command \commandf{@lb}(\commandf{rl}) can be |
| 4255 |
used to delete and |
| 4256 |
relabel solutions and branches simultaneously in {\tt fort.7} and {\tt fort.8}. |
| 4257 |
For details see Section~\ref{sec:command_mode}. |
| 4258 |
|
| 4259 |
The graphics programs {\cal PLAUT}, {\cal PLAUT04}, and the Python |
| 4260 |
CLUI command \commandf{plot} can be used to graphically inspect |
| 4261 |
the data in {\tt fort.7} and {\tt fort.8}; see Chapters~\ref{ch:PLAUT}, |
| 4262 |
~\ref{ch:PLAUT04}, and ~\ref{ch:python_mode}. |
| 4263 |
|
| 4264 |
%============================================================================== |
| 4265 |
%============================================================================== |
| 4266 |
\chapter{ The Graphics Programs PLAUT and PyPLAUT.} \label{ch:PLAUT} |
| 4267 |
%============================================================================== |
| 4268 |
%============================================================================== |
| 4269 |
{\cal PLAUT} and {\cal PyPLAUT} can be used to extract graphical |
| 4270 |
information from the {\cal AUTO} output-files {\tt fort.7} and {\tt fort.8}, |
| 4271 |
or from the corresponding data-files {\tt b.xxx} and {\tt s.xxx}. |
| 4272 |
To invoke {\cal PLAUT}, use the \commandf{@p} command defined in |
| 4273 |
Section~\ref{sec:command_mode}. |
| 4274 |
The {\cal PLAUT} window (a Tektronix window) will appear, in which {\cal PLAUT} |
| 4275 |
commands can be entered. |
| 4276 |
To invoke {\cal PyPLAUT}, use the \commandf{@pp} command. The same |
| 4277 |
plotting window as you get by using \commandf{plot} in the \python interface |
| 4278 |
appears (see Section~\ref{clui:plotting}), |
| 4279 |
but you can also manipulate it by typing {\cal PLAUT} |
| 4280 |
commands in the terminal in which you typed \commandf{@pp}. |
| 4281 |
For examples of using {\cal PLAUT} and {\cal PyPLAUT} see the tutorial demos {\tt pp2} |
| 4282 |
and {\tt pp3} in sections~\ref{sec:Demos_pp2} and \ref{sec:Demos_pp3}, |
| 4283 |
respectively. |
| 4284 |
|
| 4285 |
The files \filef{.autorc} and \filef{autorc}, as explained in |
| 4286 |
Section~\ref{clui:plotting}, can be used to customize |
| 4287 |
{\cal PyPLAUT}'s behaviour and appearance. |
| 4288 |
|
| 4289 |
\section{ Basic {\cal PLAUT}-Commands.} \label{sec:main_PLAUT_commands} |
| 4290 |
The principal {\cal PLAUT}-commands are |
| 4291 |
\begin{itemize} |
| 4292 |
\item[\tt bd0]~: |
| 4293 |
This command is useful for an initial overview of the bifurcation |
| 4294 |
diagram as stored in {\tt fort.7}. |
| 4295 |
If you have not previously selected one of the default options |
| 4296 |
{\it d0, d1, d2, d3}, or {\it d4} described below then you will be asked |
| 4297 |
whether you want solution labels, grid lines, titles, or labeled axes. |
| 4298 |
|
| 4299 |
\item[\tt bd]~: |
| 4300 |
This command is the same as the {\it bd0} command, except that you will be |
| 4301 |
asked to enter the minimum and the maximum of the horizontal and |
| 4302 |
vertical axes. |
| 4303 |
This is useful for blowing up portions of a previously displayed |
| 4304 |
bifurcation diagram. |
| 4305 |
|
| 4306 |
\item[\tt ax]~: |
| 4307 |
With the {\it ax} command you can select any pair of columns of real |
| 4308 |
numbers from {\tt fort.7} as horizontal and vertical axis in the |
| 4309 |
bifurcation diagram. (The default is columns 1 and 2). |
| 4310 |
To determine what these columns represent, one can look at the |
| 4311 |
screen ouput of the corresponding {\cal AUTO} run, or one can inspect the |
| 4312 |
column headings in {\tt fort.7}. |
| 4313 |
|
| 4314 |
\item[\tt 2d]~: |
| 4315 |
Upon entering the {\it 2d} command, the labels of all solutions stored |
| 4316 |
in {\tt fort.8} will be listed and you can select one or more of these |
| 4317 |
for display. The number of solution components is also listed |
| 4318 |
and you will be prompted to select two of these as horizontal and |
| 4319 |
vertical axis in the display. |
| 4320 |
Note that the first component is typically the independent |
| 4321 |
time or space variable scaled to the interval [0,1]. |
| 4322 |
|
| 4323 |
\item[\tt sav]~: |
| 4324 |
To save the displayed plot in a file. You will be asked to enter |
| 4325 |
a file name. Each plot must be stored in a separate new file. |
| 4326 |
The plot is stored in compact {\cal PLOT10} format, which can be converted to |
| 4327 |
{\cal PostScript} format with the {\cal AUTO}-commands {\tt @ps}; |
| 4328 |
see Section~\ref{sec:Printing_PLAUT_files}. |
| 4329 |
|
| 4330 |
\item[\tt cl]~: To clear the graphics window. |
| 4331 |
|
| 4332 |
\item[\tt lab]~: |
| 4333 |
To list the labels of all solutions stored in {\tt fort.8}. |
| 4334 |
Note that {\cal PLAUT} requires all labels to be distinct. |
| 4335 |
In case of multiple labels you can use the {\cal AUTO} |
| 4336 |
command \commandf{@lb} to relabel solutions in |
| 4337 |
{\tt fort.7} and {\tt fort.8}. |
| 4338 |
|
| 4339 |
\item[\tt end]~: To end execution of {\cal PLAUT}. |
| 4340 |
\end{itemize} |
| 4341 |
|
| 4342 |
|
| 4343 |
\section{ Default Options.} \label{sec:PLAUT_default} |
| 4344 |
After entering the commands {\it bd0, bd}, or {\it 2d}, you will be asked whether you |
| 4345 |
want solution labels, grid lines, titles, or axes labels. |
| 4346 |
For quick plotting it is convenient to bypass these selections. |
| 4347 |
This can be done by the default commands {\it d0, d1, d2, d3}, or {\it d4} below. |
| 4348 |
These can be entered as a single command |
| 4349 |
or they can be entered as prefixes in the {\it bd0} and {\it bd} commands. |
| 4350 |
Thus, for example, one can enter the command {\it d1bd0}. |
| 4351 |
|
| 4352 |
\begin{itemize} |
| 4353 |
\item[\tt d0]~: Use solid curves, showing symbols, but no solution labels. |
| 4354 |
\item[\tt d1]~: Use solid curves, except use dashed curves for unstable |
| 4355 |
solutions and for solutions of unknown stability. |
| 4356 |
Show solution labels and symbols. |
| 4357 |
\item[\tt d2]~: As {\it d1}, but without solution labels. |
| 4358 |
\item[\tt d3]~: As {\it d1}, but with grid lines. |
| 4359 |
\item[\tt d4]~: As {\it d2}, but with grid lines. |
| 4360 |
\end{itemize} |
| 4361 |
|
| 4362 |
If no default option {\it d0, d1, d2, d3}, or {\it d4} has been selected |
| 4363 |
or if you want to override a default feature, |
| 4364 |
then the following commands can be used. |
| 4365 |
These can be entered as individual commands or as prefixes. |
| 4366 |
For example, one can enter the command {\it sydpbd0}. |
| 4367 |
|
| 4368 |
\begin{itemize} |
| 4369 |
\item[\tt sy]~: Use symbols for special solution points, for example, |
| 4370 |
open square = branch point, |
| 4371 |
solid square = Hopf bifurcation. |
| 4372 |
\item[\tt dp]~: ``Differential Plot'', i.e., show stability of the |
| 4373 |
solutions. Solid curves represent stable solutions. |
| 4374 |
Dashed curves are used for unstable |
| 4375 |
solutions and for solutions of unknown stability. |
| 4376 |
For periodic solutions use solid/open circles |
| 4377 |
to indicate stability/instability (or unknown |
| 4378 |
stability). |
| 4379 |
\item[\tt st]~: Set up titles and axes labels. |
| 4380 |
\item[\tt nu]~: Normal usage (reset special options). |
| 4381 |
\end{itemize} |
| 4382 |
|
| 4383 |
|
| 4384 |
\section{ Other {\cal PLAUT}-Commands.} \label{sec:Other_PLAUT_commands} |
| 4385 |
The full {\cal PLAUT} program has several other capabilities, for example, |
| 4386 |
|
| 4387 |
\begin{itemize} |
| 4388 |
\item[\tt scr]~: To change the diagram size. |
| 4389 |
\item[\tt rss]~: To change the size of special solution point symbols. |
| 4390 |
\end{itemize} |
| 4391 |
|
| 4392 |
These commands are not available in {\cal PyPLAUT}. |
| 4393 |
|
| 4394 |
\section{ Printing {\cal PLAUT} Files.} \label{sec:Printing_PLAUT_files} |
| 4395 |
\begin{itemize} |
| 4396 |
\item[\tt @ps]~: |
| 4397 |
Type \commandf{@ps fig.1} to convert a saved {\cal PLAUT} file {\tt fig.1} |
| 4398 |
to {\cal PostScript} format |
| 4399 |
in {\tt fig.1.ps}. |
| 4400 |
|
| 4401 |
\item[\tt @eps]~: |
| 4402 |
Type \commandf{@eps fig.1} to convert a saved {\cal PLAUT} file {\tt fig.1} |
| 4403 |
to encapsulated {\cal PostScript} format |
| 4404 |
in {\tt fig.1.eps}. |
| 4405 |
\end{itemize} |
| 4406 |
In {\cal PyPLAUT} you can directly save to a variety of file |
| 4407 |
formats, including \filef{.eps} and \filef{.png}. |
| 4408 |
|
| 4409 |
|
| 4410 |
%============================================================================== |
| 4411 |
%============================================================================== |
| 4412 |
\chapter{ The Graphics Program PLAUT04.} \label{ch:PLAUT04} |
| 4413 |
%============================================================================== |
| 4414 |
%============================================================================== |
| 4415 |
|
| 4416 |
% This tex file is also used by the stand-alone user guide you get |
| 4417 |
% when you ask for help in PLAUT04 |
| 4418 |
\newcommand{\PLAUT} {\textsc{Plaut04}} |
| 4419 |
\newcommand{\ETC} {\textit{etc.}} |
| 4420 |
\input{plaut04_user_guide.tex} |
| 4421 |
|
| 4422 |
%============================================================================== |
| 4423 |
%============================================================================== |
| 4424 |
\chapter{ The Graphical User Interface GUI94.} \label{ch:GUI} |
| 4425 |
%============================================================================== |
| 4426 |
%============================================================================== |
| 4427 |
\section{ General Overview.} \label{sec:GUI_Overview} |
| 4428 |
The {\cal AUTO} graphical user interface (GUI) is a tool |
| 4429 |
for creating and editing equations-files and constants-files; |
| 4430 |
see Section~\ref{ch:User_supplied_files} |
| 4431 |
for a description of these files. |
| 4432 |
The GUI can also be used to run {\cal AUTO} and to manipulate and plot |
| 4433 |
output-files and data-files; |
| 4434 |
see Section~\ref{sec:command_mode} for corresponding commands. |
| 4435 |
To use the GUI for a new equation, change to an empty work directory. |
| 4436 |
For an existing equations-file, change to its directory. |
| 4437 |
({\it Do not activate the GUI in the directory {\tt auto/07p} |
| 4438 |
or in any of its subdirectories.}) |
| 4439 |
Then type |
| 4440 |
|
| 4441 |
\centerline { @{\it auto}, } |
| 4442 |
|
| 4443 |
or its abbreviation @{\it a}. |
| 4444 |
Here we assume that the {\cal AUTO} aliases have been activated; |
| 4445 |
see Section~\ref{sec:Installation}. |
| 4446 |
The GUI includes a window for editing the equations-file, |
| 4447 |
and four groups of buttons, namely, |
| 4448 |
the {\it Menu Bar} at the top of the GUI, |
| 4449 |
the {\it Define Constants}-buttons at the center-left, |
| 4450 |
the {\it Load Constants}-buttons at the lower left, |
| 4451 |
and the {\it Stop- and Exit}-buttons. |
| 4452 |
|
| 4453 |
{\bf Note :}~ |
| 4454 |
Most GUI buttons are activated by point-and-click action with |
| 4455 |
the {\it left} mouse button. |
| 4456 |
If a beep sound results then the {\it right} mouse button must be used. |
| 4457 |
|
| 4458 |
\subsection{ The Menu bar.} |
| 4459 |
It contains the main buttons for running {\cal AUTO} |
| 4460 |
and for manipulating the equations-file, the constants-file, |
| 4461 |
the output-files, and the data-files. |
| 4462 |
In a typical application, these buttons are used from left to right. |
| 4463 |
First the {\it Equations} are defined and, if necessary, {\it Edited}, |
| 4464 |
before being {\it Written}. |
| 4465 |
Then the {\cal AUTO}-constants are {\it Defined}. |
| 4466 |
This is followed by the actual {\it Run} of {\cal AUTO}. |
| 4467 |
The resulting output-files can be {\it Saved} as data-files, |
| 4468 |
or they can be {\it Appended} to existing data-files. |
| 4469 |
Data-files can be {\it Plotted} with the graphics program {\cal PLAUT}, |
| 4470 |
and various file operations can be done with the {\it Files}-button. |
| 4471 |
Auxiliary functions are provided by the {\it Demos-}, {\it Misc-}, |
| 4472 |
and {\it Help}-buttons. |
| 4473 |
The Menu Bar buttons are described in more detail |
| 4474 |
in Section~\ref{sec:GUI_Menu_bar}. |
| 4475 |
|
| 4476 |
|
| 4477 |
\subsection{ The Define-Constants-buttons.} |
| 4478 |
These have the same function as |
| 4479 |
the {\it Define}-button on the Menu Bar, namely to set and change |
| 4480 |
{\cal AUTO}-constants. |
| 4481 |
However, |
| 4482 |
for the {\it Define}-button all constants appear in one panel, |
| 4483 |
while |
| 4484 |
for the Define Constants-buttons they |
| 4485 |
are grouped by function, |
| 4486 |
as in Chapter~\ref{ch:AUTO_constants}, namely |
| 4487 |
{\it Problem} definition constants, |
| 4488 |
{\it Discretization} constants, |
| 4489 |
convergence {\it Tolerances}, |
| 4490 |
continuation {\it Step Size}, |
| 4491 |
diagram {\it Limits}, |
| 4492 |
designation of free {\it Parameters}, |
| 4493 |
constants defining the {\it Computation}, |
| 4494 |
and |
| 4495 |
constants that specify {\it Output} options. |
| 4496 |
|
| 4497 |
|
| 4498 |
\subsection{ The Load-Constants-buttons.} |
| 4499 |
The {\it Previous}-button can be used to load an existing {\cal AUTO}-constants file. |
| 4500 |
Such a file is also loaded, if it exists, |
| 4501 |
by the {\it Equations}-button on the {\it Menu Bar}. |
| 4502 |
The {\it Default}-button can be used |
| 4503 |
to load default values of all {\cal AUTO}-constants. |
| 4504 |
Custom editing is normally necessary. |
| 4505 |
|
| 4506 |
|
| 4507 |
\subsection{ The Stop- and Exit-buttons.} |
| 4508 |
The {\it Stop}-button can be used to abort execution of an {\cal AUTO}-run. |
| 4509 |
This should be done only in exceptional circumstances. |
| 4510 |
Output-files, if any, will normally be incomplete and should be deleted. |
| 4511 |
Use the {\it Exit}-button to end a session. |
| 4512 |
|
| 4513 |
|
| 4514 |
\section{ The Menu Bar.} \label{sec:GUI_Menu_bar} |
| 4515 |
\subsection{ Equations-button.} |
| 4516 |
This pull-down menu contains the items |
| 4517 |
{\it Old}, to load an existing equations-file, |
| 4518 |
{\it New}, to load a model equations-file, |
| 4519 |
and |
| 4520 |
{\it Demo}, to load a selected demo equations-file. |
| 4521 |
Equations-file names are of the form {\tt xxx.f90}. |
| 4522 |
The corresponding constants-file {\tt c.xxx} is also loaded if it exists. |
| 4523 |
The equation name {\tt xxx} remains active until redefined. |
| 4524 |
|
| 4525 |
\subsection{ Edit-button.} |
| 4526 |
This pull-down menu contains the items |
| 4527 |
{\it Cut} and {\it Copy}, |
| 4528 |
to be performed on text in the GUI window |
| 4529 |
highlighted by click-and-drag action of the mouse, |
| 4530 |
and the item {\it Paste}, which places editor buffer text at the |
| 4531 |
location of the cursor. |
| 4532 |
|
| 4533 |
|
| 4534 |
|
| 4535 |
\subsection{ Write-button.} |
| 4536 |
This pull-down menu contains the item |
| 4537 |
{\it Write}, |
| 4538 |
to write the loaded files {\tt xxx.f90} and {\tt c.xxx}, |
| 4539 |
by the active equation name, |
| 4540 |
and the item |
| 4541 |
{\it Write As} |
| 4542 |
to write these files by a selected new name, which then becomes the active name. |
| 4543 |
|
| 4544 |
|
| 4545 |
\subsection{ Define-button.} |
| 4546 |
Clicking this button will display the full {\cal AUTO}-constants panel. |
| 4547 |
Most of its text fields can be edited, |
| 4548 |
but some have restricted input values that can be selected with |
| 4549 |
the right mouse button. |
| 4550 |
Some text fields will display a subpanel for entering data. |
| 4551 |
To actually apply changes made in the panel, click the |
| 4552 |
{\it OK-} or {\it Apply}-button at the bottom of the panel. |
| 4553 |
|
| 4554 |
|
| 4555 |
|
| 4556 |
\subsection{ Run-button.} |
| 4557 |
Clicking this button will write the constants-file {\tt c.xxx} and run {\cal AUTO}. |
| 4558 |
If the equations-file has been edited then it should first be rewritten |
| 4559 |
with the {\it Write}-button. |
| 4560 |
|
| 4561 |
|
| 4562 |
\subsection{ Save-button.} |
| 4563 |
This pull-down menu contains the item |
| 4564 |
{\it Save}, |
| 4565 |
to save the output-files {\tt fort.7}, {\tt fort.8}, {\tt fort.9}, |
| 4566 |
as {\tt b.xxx}, {\tt s.xxx}, {\tt d.xxx}, respectively. |
| 4567 |
Here {\tt xxx} is the active equation name. |
| 4568 |
It also contains the item |
| 4569 |
{\it Save As}, |
| 4570 |
to save the output-files under another name. |
| 4571 |
Existing data-files with the selected name, if any, will be overwritten. |
| 4572 |
|
| 4573 |
|
| 4574 |
\subsection{ Append-button.} |
| 4575 |
This pull-down menu contains the item |
| 4576 |
{\it Append}, |
| 4577 |
to append the output-files {\tt fort.7}, {\tt fort.8}, {\tt fort.9}, |
| 4578 |
to existing data-files {\tt b.xxx}, {\tt s.xxx}, {\tt d.xxx}, respectively. |
| 4579 |
Here {\tt xxx} is the active equation name. |
| 4580 |
It also contains the item |
| 4581 |
{\it Append To}, |
| 4582 |
to append the output-files to other existing data-files. |
| 4583 |
|
| 4584 |
\subsection{ Plot-button.} |
| 4585 |
This pull-down menu contains the items |
| 4586 |
{\it Plot}, |
| 4587 |
to run the plotting program {\cal PLAUT} for the data-files |
| 4588 |
{\tt b.xxx} and {\tt s.xxx}, |
| 4589 |
where {\tt xxx} is the active equation name, |
| 4590 |
and the item |
| 4591 |
{\it Name}, |
| 4592 |
to run {\cal PLAUT} with other data-files. |
| 4593 |
|
| 4594 |
|
| 4595 |
\subsection{ Files-button.} |
| 4596 |
This pull-down menu contains |
| 4597 |
the item |
| 4598 |
{\it Restart}, to redefine the restart file. |
| 4599 |
Normally, when restarting from a previously computed solution, |
| 4600 |
the restart data is expected in the file {\tt s.xxx}, |
| 4601 |
where {\tt xxx} is the active equation name. |
| 4602 |
Use the {\it Restart}-button to read the restart data from another data-file |
| 4603 |
in the immediately following run. |
| 4604 |
The pull-down menu also contains the following items~: |
| 4605 |
\begin{itemize} |
| 4606 |
\item[-]{\it Copy},~ to copy |
| 4607 |
{\tt b.xxx}, {\tt s.xxx}, {\tt d.xxx}, {\tt c.xxx}, |
| 4608 |
to |
| 4609 |
{\tt b.yyy}, {\tt s.yyy}, {\tt d.yyy}, {\tt c.yyy}, resp.; |
| 4610 |
|
| 4611 |
\item[-]{\it Append},~ to append data-files |
| 4612 |
{\tt b.xxx}, {\tt s.xxx}, {\tt d.xxx}, |
| 4613 |
to |
| 4614 |
{\tt b.yyy}, {\tt s.yyy}, {\tt d.yyy}, resp.; |
| 4615 |
|
| 4616 |
\item[-]{\it Move},~ to move |
| 4617 |
{\tt b.xxx}, {\tt s.xxx}, {\tt d.xxx}, {\tt c.xxx}, |
| 4618 |
to |
| 4619 |
{\tt b.yyy}, {\tt s.yyy}, {\tt d.yyy}, {\tt c.yyy}, resp.; |
| 4620 |
|
| 4621 |
\item[-]{\it Delete},~ to delete data-files |
| 4622 |
{\tt b.xxx}, {\tt s.xxx}, {\tt d.xxx}; |
| 4623 |
|
| 4624 |
\item[-]{\it Clean}, to delete all files of the form |
| 4625 |
{\tt fort.*}, {\tt *.o}, and {\tt *.exe}. |
| 4626 |
\end{itemize} |
| 4627 |
|
| 4628 |
|
| 4629 |
\subsection{ Demos-button.} |
| 4630 |
This pulldown menu contains the items |
| 4631 |
{\it Select}, |
| 4632 |
to view and run a selected {\cal AUTO} demo in the demo directory, |
| 4633 |
and |
| 4634 |
{\it Reset}, |
| 4635 |
to restore the demo directory to its original state. |
| 4636 |
Note that demo files can be copied to the user work directory |
| 4637 |
with the {\it Equations/Demo}-button. |
| 4638 |
|
| 4639 |
|
| 4640 |
\subsection{ Misc.-button.} |
| 4641 |
This pulldown menu contains the items |
| 4642 |
{\it Tek Window} |
| 4643 |
and |
| 4644 |
{\it VT102 Window}, |
| 4645 |
for opening windows; |
| 4646 |
{\it Emacs} |
| 4647 |
and |
| 4648 |
{\it Xedit}, |
| 4649 |
for editing files, |
| 4650 |
and |
| 4651 |
{\it Print}, for printing the active equations-file {\tt xxx.f90}. |
| 4652 |
|
| 4653 |
|
| 4654 |
\subsection{ Help-button.} |
| 4655 |
This pulldown menu contains the items |
| 4656 |
{\it {\cal AUTO}-constants}, for help on {\cal AUTO}-constants, |
| 4657 |
and |
| 4658 |
{\it User Manual}, for viewing the user manual; i.e., this document. |
| 4659 |
|
| 4660 |
|
| 4661 |
\section{ Using the GUI.} \label{sec:Using_the_GUI} |
| 4662 |
{\cal AUTO}-commands are described in Section~\ref{sec:command_mode} and |
| 4663 |
illustrated in the demos. |
| 4664 |
In Table~\ref{tbl:CM_GUI} we list the main {\cal AUTO}-commands |
| 4665 |
together with the corresponding GUI button. |
| 4666 |
|
| 4667 |
\begin{table}[htbp] |
| 4668 |
\begin{center} |
| 4669 |
\begin{tabular}{| l | l |} |
| 4670 |
\hline |
| 4671 |
\commandf{@r } & {\it Run} \\ |
| 4672 |
\hline |
| 4673 |
\commandf{@sv } & {\it Save} \\ |
| 4674 |
\hline |
| 4675 |
\commandf{@ap } & {\it Append} \\ |
| 4676 |
\hline |
| 4677 |
\commandf{@p } & {\it Plot} \\ |
| 4678 |
\hline |
| 4679 |
\commandf{@cp } & {\it Files/Copy} \\ |
| 4680 |
\hline |
| 4681 |
\commandf{@mv } & {\it Files/Move} \\ |
| 4682 |
\hline |
| 4683 |
\commandf{@cl } & {\it Files/Clean} \\ |
| 4684 |
\hline |
| 4685 |
\commandf{@dl } & {\it Files/Delete} \\ |
| 4686 |
\hline |
| 4687 |
\commandf{@dm } & {\it Equations/Demo} \\ |
| 4688 |
\hline |
| 4689 |
\end{tabular} |
| 4690 |
\caption{Command Mode - GUI correspondences.} |
| 4691 |
\label{tbl:CM_GUI} |
| 4692 |
\end{center} |
| 4693 |
\end{table} |
| 4694 |
|
| 4695 |
|
| 4696 |
The {\cal AUTO}-command \commandf{@r xxx yyy} is given in the GUI as follows~: |
| 4697 |
click {\it Files/Restart} and enter {\it yyy} as data. |
| 4698 |
Then click {\it Run}. |
| 4699 |
As noted in Section~\ref{sec:command_mode}, |
| 4700 |
this will run {\cal AUTO} with the current equations-file |
| 4701 |
{\tt xxx.f90} and the current constants-file {\tt c.xxx}, |
| 4702 |
while expecting restart data in {\tt s.yyy}. |
| 4703 |
The {\cal AUTO}-command \commandf{@ap xxx yyy} is given in the GUI by |
| 4704 |
clicking {\it Files/Append}. |
| 4705 |
|
| 4706 |
\section{ Customizing the GUI.} \label{sec:Customizing_the_GUI} |
| 4707 |
\subsection{ Print-button.} |
| 4708 |
The {\it Misc/Print}-button on the Menu Bar can be customized |
| 4709 |
by editing the file {\tt GuiConsts.h} in directory {\tt auto/07p/include}. |
| 4710 |
|
| 4711 |
\subsection{ GUI colors.} |
| 4712 |
GUI colors can be customized by creating an X resource file. |
| 4713 |
Two model files can be found in directory {\tt auto/07p/gui}, namely, |
| 4714 |
{\tt Xdefaults.1} and {\tt Xdefaults.2}. |
| 4715 |
To become effective, edit one of these, if desired, |
| 4716 |
and copy it to {\tt .Xdefaults} in your home directory. |
| 4717 |
Color names can often be found in the system file {\tt /usr/lib/X11/rgb.txt}. |
| 4718 |
|
| 4719 |
\subsection{ On-line help.} |
| 4720 |
The file {\tt auto/07p/include/GuiGlobal.h} |
| 4721 |
contains on-line help on {\cal AUTO}-constants and demos. |
| 4722 |
The text can be updated, subject to a modifiable maximum length. |
| 4723 |
On SGI machines this is 10240 bytes, |
| 4724 |
which can be increased, for example, to 20480 bytes, |
| 4725 |
by replacing the line |
| 4726 |
{\it CC = cc -Wf, -XNl10240 -O} |
| 4727 |
in {\tt auto/07p/gui/Makefile} by |
| 4728 |
{\it CC = cc -Wf, -XNl20480 -O} |
| 4729 |
On other machines, the maximum message length is the system defined maximum |
| 4730 |
string literal length. |
| 4731 |
|
| 4732 |
|
| 4733 |
%============================================================================== |
| 4734 |
%============================================================================== |
| 4735 |
\chapter{ Description of {\cal AUTO}-Constants.} \label{ch:AUTO_constants} |
| 4736 |
%============================================================================== |
| 4737 |
%============================================================================== |
| 4738 |
\section{ The {\cal AUTO}-Constants File.} \label{sec:The_AUTO_constants_file} |
| 4739 |
As described in Section~\ref{ch:User_supplied_files}, |
| 4740 |
if the equations-file is {\tt xxx.f90} |
| 4741 |
then the constants that define the computation |
| 4742 |
are normally expected in the file {\tt c.xxx}. |
| 4743 |
The format of this file is free, with constant=value pairs separated |
| 4744 |
by commas or spaces. Comments start with one of the characters ``\#'' |
| 4745 |
and ``!'', and run to the end of a line. |
| 4746 |
An example, with default values, is listed below. In real constant |
| 4747 |
files you only need to specify those values that are different from |
| 4748 |
these, but listing all of them allows for easier editing. |
| 4749 |
|
| 4750 |
Note that this file is not strictly necessary when using the \python |
| 4751 |
interface: you can define all constants inside the scripts if you so wish. |
| 4752 |
|
| 4753 |
\begin{verbatim} |
| 4754 |
# Default AUTO Constants file |
| 4755 |
e = '', s='', dat='', sv='' |
| 4756 |
unames = {}, parnames = {} |
| 4757 |
U = {}, PAR = {} |
| 4758 |
NDIM= 2, IPS = 1, IRS = 0, ILP = 1 |
| 4759 |
ICP = [1] |
| 4760 |
NTST= 20, NCOL= 4, IAD = 3, ISP = 2, ISW = 1, IPLT= 0, NBC= 0, NINT= 0 |
| 4761 |
NMX= 0, NPR= 0, MXBF= 10, IID = 2, ITMX= 9, ITNW= 5, NWTN= 3, JAC= 0 |
| 4762 |
EPSL= 1e-07, EPSU = 1e-07, EPSS = 1e-05 |
| 4763 |
DS = 0.01, DSMIN= 0.005, DSMAX= 0.1, IADS= 1 |
| 4764 |
NPAR= 36, THL = {}, THU = {} |
| 4765 |
RL0=-1.7976e+308, RL1=1.7976e+308, A0=-1.7976e+308, A1=1.7976e+308, |
| 4766 |
UZR = {}, UZSTOP = {}, SP = [], STOP = [] |
| 4767 |
IIS = 3, IBR=0, LAB=0, TY='' |
| 4768 |
NUNSTAB = -1, NSTAB = -1, IEQUIB = 1, ITWIST = 0, ISTART = 5 |
| 4769 |
IREV = [], IFIXED = [], IPSI = [] |
| 4770 |
\end{verbatim} |
| 4771 |
|
| 4772 |
The significance of the {\cal AUTO}-constants, grouped by function, is |
| 4773 |
described in the sections below. The HomCont constants \texttt{NUNSTAB}, |
| 4774 |
\texttt{NSTAB}, \texttt{IEQUIB}, \texttt{ITWIST}, \texttt{ISTART}, |
| 4775 |
\texttt{IREV}, \texttt{IFIXED}, and \texttt{IPSI} are explained in |
| 4776 |
Chapter~\ref{ch:HomCont}. |
| 4777 |
Representative demos that illustrate use of the {\cal AUTO}-constants |
| 4778 |
are also mentioned. |
| 4779 |
|
| 4780 |
%===================================================================== |
| 4781 |
\section{ Problem Constants.} \label{sec:Problem_constants} |
| 4782 |
\subsection{\texttt{NDIM}} \label{sec:NDIM} |
| 4783 |
Dimension of the system of equations as specified in the user-supplied |
| 4784 |
routine {\tt FUNC}. |
| 4785 |
|
| 4786 |
\subsection{\texttt{NBC}} \label{sec:NBC} |
| 4787 |
The number of boundary conditions as specified in the user-supplied |
| 4788 |
routine {\tt BCND}. \\ |
| 4789 |
(Demos {\tt exp}, {\tt kar}.) |
| 4790 |
|
| 4791 |
\subsection{\texttt{NINT}} \label{sec:NINT} |
| 4792 |
The number of integral conditions as specified in the user-supplied |
| 4793 |
routine {\tt ICND}. \\ |
| 4794 |
(Demos {\tt int}, {\tt lin}, {\tt obv}.) |
| 4795 |
|
| 4796 |
\subsection{\texttt{NPAR}} \label{sec:NPAR} |
| 4797 |
Maximum parameter number that can be used in all user-supplied |
| 4798 |
routines. |
| 4799 |
|
| 4800 |
\subsection{\texttt{JAC}} \label{sec:JAC} |
| 4801 |
Used to indicate whether derivatives are supplied by the user |
| 4802 |
or to be obtained by differencing~: |
| 4803 |
\begin{itemize} |
| 4804 |
\item[-] {\tt JAC=0}~: |
| 4805 |
No derivatives are given by the user. (Most demos use {\tt JAC}=0.) |
| 4806 |
\item[-] {\tt JAC=1}~: |
| 4807 |
Derivatives with respect to state- and problem-parameters are given |
| 4808 |
in the user-supplied routines |
| 4809 |
{\tt FUNC}, {\tt BCND}, {\tt ICND} and {\tt FOPT}, where |
| 4810 |
applicable. This may be necessary for sensitive problems. |
| 4811 |
It is also recommended for computations in which {\cal AUTO} generates |
| 4812 |
an extended system, for example, when {\tt ISW}=2. |
| 4813 |
(For {\tt ISW} see Section~\ref{sec:ISW}.) \\ |
| 4814 |
(Demos {\tt int}, {\tt dd2}, {\tt obt}, {\tt plp}, {\tt ops}.) |
| 4815 |
\item[-] {\tt JAC=-1}~: |
| 4816 |
As for {\tt JAC=1}, but derivatives with respect to |
| 4817 |
problem-parameters may be omitted in {\tt FUNC}. \\ |
| 4818 |
(Demo {\tt san}.) |
| 4819 |
\end{itemize} |
| 4820 |
%===================================================================== |
| 4821 |
\section{ Discretization Constants.} \label{sec:Discretization_constants} |
| 4822 |
\subsection{\texttt{NTST}} \label{sec:NTST} |
| 4823 |
The number of mesh intervals used for discretization. |
| 4824 |
{\tt NTST} remains fixed during any particular run, but can be changed |
| 4825 |
when restarting. |
| 4826 |
(For mesh adaption see {\tt IAD} in Section~\ref{sec:IAD}.) |
| 4827 |
Recommended value of {\tt NTST} : As small as possible to maintain convergence. \\ |
| 4828 |
(Demos {\tt exp}, {\tt ab}, {\tt spb}.) |
| 4829 |
|
| 4830 |
|
| 4831 |
\subsection{\texttt{NCOL}} \label{sec:NCOL} |
| 4832 |
The number of Gauss collocation points per mesh interval, |
| 4833 |
(2 $\le$ {\tt NCOL} $\le$ 7). |
| 4834 |
{\tt NCOL} remains fixed during any given run, but can be changed |
| 4835 |
when restarting at a previously computed solution. |
| 4836 |
The choice {\tt NCOL}=4, used in most demos, is recommended. |
| 4837 |
If {\tt NDIM} is ``large'' and the solutions ``very smooth'' then |
| 4838 |
{\tt NCOL}=2 may be appropriate. |
| 4839 |
|
| 4840 |
\subsection{\texttt{IAD}} \label{sec:IAD} |
| 4841 |
This constant controls the mesh adaption~: |
| 4842 |
\begin{itemize} |
| 4843 |
\item[-] {\tt IAD=0}~: |
| 4844 |
Fixed mesh. Normally, this choice should never be used, as it may result |
| 4845 |
in spurious solutions. (Demo {\tt ext}.) |
| 4846 |
\item[-] {\tt IAD$>$0}~: |
| 4847 |
Adapt the mesh every {\tt IAD} steps along the family. |
| 4848 |
Most demos use {\tt IAD=3}, which is the strongly recommended value. |
| 4849 |
\end{itemize} |
| 4850 |
|
| 4851 |
When computing ``trivial'' solutions to a boundary value problem, |
| 4852 |
for example, when all solution components are constant, then the |
| 4853 |
mesh adaption may fail under certain circumstances, and overflow may |
| 4854 |
occur. In such case, try recomputing the solution family with a fixed |
| 4855 |
mesh {\tt (IAD=0)}. Be sure to set {\tt IAD} back to {\tt IAD=3} |
| 4856 |
for computing eventual non-trivial bifurcating solution families. |
| 4857 |
%===================================================================== |
| 4858 |
\section{ Tolerances.} \label{sec:Tolerances} |
| 4859 |
\subsection{\texttt{EPSL}} \label{sec:EPSL} |
| 4860 |
Relative convergence criterion for equation parameters in the Newton/Chord |
| 4861 |
method. Most demos use {\tt EPSL}=$10^{-6}$ or {\tt EPSL}=$10^{-7}$, |
| 4862 |
which is the recommended value range. |
| 4863 |
|
| 4864 |
\subsection{\texttt{EPSU}} \label{sec:EPSU} |
| 4865 |
Relative convergence criterion for solution components in the Newton/Chord |
| 4866 |
method. Most demos use {\tt EPSU}=$10^{-6}$ or {\tt EPSU}=$10^{-7}$, |
| 4867 |
which is the recommended value range. |
| 4868 |
|
| 4869 |
\subsection{\texttt{EPSS}} \label{sec:EPSS} |
| 4870 |
Relative arclength convergence criterion for the detection of special solutions. |
| 4871 |
Most demos use {\tt EPSS}=$10^{-4}$ or {\tt EPSS}=$10^{-5}$, |
| 4872 |
which is the recommended value range. |
| 4873 |
Generally, {\tt EPSS} should be approximately 100 to 1000 times the value |
| 4874 |
of {\tt EPSL}, {\tt EPSU}. |
| 4875 |
|
| 4876 |
\subsection{\texttt{ITMX}} \label{sec:ITMX} |
| 4877 |
The maximum number of iterations allowed in the accurate |
| 4878 |
location of special solutions, such as bifurcations, folds, |
| 4879 |
and user output points, by M\"uller's method with bracketing. |
| 4880 |
The recommended value is {\tt ITMX}=8, used in most demos. |
| 4881 |
|
| 4882 |
\subsection{\texttt{NWTN}} \label{sec:NWTN} |
| 4883 |
After {\tt NWTN} Newton iterations the Jacobian is frozen, i.e., |
| 4884 |
{\cal AUTO} uses full Newton for the first {\tt NWTN} iterations |
| 4885 |
and the Chord method for iterations {\tt NWTN}+1 to {\tt ITNW}. |
| 4886 |
The choice {\tt NWTN}=3 is strongly recommended and used in most demos. |
| 4887 |
Note that this constant is only effective for ODEs, i.e., for solving |
| 4888 |
the piecewise polynomial collocation equations. |
| 4889 |
For algebraic systems {\cal AUTO} always uses full Newton. |
| 4890 |
|
| 4891 |
\subsection{\texttt{ITNW}} \label{sec:ITNW} |
| 4892 |
The maximum number of combined Newton-Chord iterations. |
| 4893 |
When this maximum is reached, the step will be retried with |
| 4894 |
half the stepsize. |
| 4895 |
This is repeated until convergence, or until the minimum |
| 4896 |
stepsize is reached. In the latter case the computation of |
| 4897 |
the family is discontinued and a message printed in {\tt fort.9}. |
| 4898 |
The recommended value is {\tt ITNW}=5, but {\tt ITNW}=7 may be used for |
| 4899 |
``difficult'' problems, for example, |
| 4900 |
demos {\tt spb}, {\tt chu}, {\tt plp}, etc. |
| 4901 |
|
| 4902 |
%===================================================================== |
| 4903 |
\section{ Continuation Step Size.} \label{sec:step_size} |
| 4904 |
\subsection{\texttt{DS}} \label{sec:DS} |
| 4905 |
{\cal AUTO} uses pseudo-arclength continuation for following solution families. |
| 4906 |
The pseudo-arclength stepsize is the distance between |
| 4907 |
the current solution and the next solution on a family. |
| 4908 |
By default, this distance includes all state variables |
| 4909 |
(or state functions) and all free parameters. |
| 4910 |
The constant {\tt DS} defines the pseudo-arclength stepsize to be used for the |
| 4911 |
first attempted step along any family. |
| 4912 |
(Note that if {\tt IADS}$>$0 then {\tt DS} will automatically be adapted |
| 4913 |
for subsequent steps and for failed steps.) |
| 4914 |
{\tt DS} may be chosen positive or negative; changing its sign |
| 4915 |
reverses the direction of computation. |
| 4916 |
The relation {\tt DSMIN} $\le$ $\abs {\tt DS}$ $\le$ {\tt DSMAX} must be satisfied. |
| 4917 |
The precise choice of {\tt DS} is problem-dependent; the demos use a value |
| 4918 |
that was found appropriate after some experimentation. |
| 4919 |
|
| 4920 |
|
| 4921 |
\subsection{\texttt{DSMIN}} \label{sec:DSMIN} |
| 4922 |
This is minimum allowable absolute value of the pseudo-arclength |
| 4923 |
stepsize. {\tt DSMIN} must be positive. |
| 4924 |
It is only effective if the pseudo-arclength step is adaptive, |
| 4925 |
i.e., if {\tt IADS}$>$0. |
| 4926 |
The choice of {\tt DSMIN} is highly problem-dependent; |
| 4927 |
most demos use a value that was found appropriate after some |
| 4928 |
experimentation. |
| 4929 |
See also the discussion in Section~\ref{sec:Efficiency}. |
| 4930 |
|
| 4931 |
\subsection{\texttt{DSMAX}} \label{sec:DSMAX} |
| 4932 |
The maximum allowable absolute value of the pseudo-arclength stepsize. |
| 4933 |
{\tt DSMAX} must be positive. |
| 4934 |
It is only effective if the pseudo-arclength step is adaptive, |
| 4935 |
i.e., if {\tt IADS}$>$0. |
| 4936 |
The choice of {\tt DSMAX} is highly problem-dependent; |
| 4937 |
most demos use a value that was found appropriate after some |
| 4938 |
experimentation. |
| 4939 |
See also the discussion in Section~\ref{sec:Efficiency}. |
| 4940 |
|
| 4941 |
\subsection{\texttt{IADS}} \label{sec:IADS} |
| 4942 |
This constant controls the frequency of adaption of the |
| 4943 |
pseudo-arclength stepsize. |
| 4944 |
\begin{itemize} |
| 4945 |
\item[-] {\tt IADS=0}~: |
| 4946 |
Use fixed pseudo-arclength stepsize, i.e., the stepsize will |
| 4947 |
be equal to the specified value of {\tt DS} for every step. |
| 4948 |
The computation of a family will be discontinued as soon as |
| 4949 |
the maximum number of iterations {\tt ITNW} is reached. |
| 4950 |
This choice is not recommended. \\(Demo {\tt tim}.) |
| 4951 |
\item[-] {\tt IADS$>$0}~: |
| 4952 |
Adapt the pseudo-arclength stepsize after every {\tt IADS} steps. |
| 4953 |
If the Newton/Chord iteration converges rapidly then |
| 4954 |
$\abs{\tt DS}$ will be increased, but never beyond {\tt DSMAX}. |
| 4955 |
If a step fails then it will be retried with half |
| 4956 |
the stepsize. This will be done repeatedly until the |
| 4957 |
step is successful or until $\abs{\tt DS}$ reaches {\tt DSMIN}. |
| 4958 |
In the latter case nonconvergence will be signalled. |
| 4959 |
The strongly recommended value is {\tt IADS}=1, which is used in |
| 4960 |
almost all demos. |
| 4961 |
\end{itemize} |
| 4962 |
|
| 4963 |
\subsection{\texttt{THL}} \label{sec:THL} |
| 4964 |
By default, the pseudo-arclength stepsize includes all state variables |
| 4965 |
(or state functions) and all free parameters. |
| 4966 |
Under certain circumstances one may want to modify the weight accorded |
| 4967 |
to individual parameters in the definition of stepsize. |
| 4968 |
For this purpose, {\tt THL} defines the parameters whose weight |
| 4969 |
is to be modified. |
| 4970 |
If {\tt THL=\{\}} then all weights will have default value 1.0, |
| 4971 |
else one must enter pairs, |
| 4972 |
~\{{\it Parameter Index} : {\it Weight}, ...\}~. |
| 4973 |
|
| 4974 |
For example, for the computation of periodic solutions it is |
| 4975 |
recommended that the period not be included in the pseudo-arclength |
| 4976 |
continuation stepsize, in order to avoid period-induced limitations |
| 4977 |
on the stepsize near orbits of infinite period. |
| 4978 |
This exclusion can be accomplished by setting {\tt THL=\{11:0.0\}}. |
| 4979 |
If {\tt THL} is not specified this is the default for computing |
| 4980 |
periodic solutions ({\tt IPS=2}). |
| 4981 |
Most demos that compute periodic solutions use this option; |
| 4982 |
see for example demo {\tt ab}. |
| 4983 |
|
| 4984 |
\subsection{\texttt{THU}} \label{sec:THU} |
| 4985 |
Under certain circumstances one may want to modify the weight accorded |
| 4986 |
to individual state variables (or state functions) in the definition |
| 4987 |
of stepsize. |
| 4988 |
For this purpose, {\tt THU} defines the number of states whose weight |
| 4989 |
is to be modified. |
| 4990 |
If {\tt THU}=\{\} then all weights will have default value 1.0, |
| 4991 |
else one must enter pairs, |
| 4992 |
~\{{\it State Index} : {\it Weight}, ...\}~. |
| 4993 |
At present none of the demos use this option. |
| 4994 |
%===================================================================== |
| 4995 |
\section{ Diagram Limits.} \label{sec:Diagram_limits} |
| 4996 |
|
| 4997 |
There are five ways to limit the computation of a family~: |
| 4998 |
|
| 4999 |
\begin{itemize} |
| 5000 |
\item[-] |
| 5001 |
By specifying a stopping condition in the list associated |
| 5002 |
with the constant {\tt STOP}; see Section~\ref{sec:STOP}. |
| 5003 |
|
| 5004 |
\item[-] |
| 5005 |
By specifying parameters and parameter values in the list associated |
| 5006 |
with the constant {\tt UZSTOP}; see Section~\ref{sec:UZSTOP}. |
| 5007 |
|
| 5008 |
\item[-] |
| 5009 |
By specifying the maximum number of steps, {\tt NMX}. |
| 5010 |
|
| 5011 |
\item[-] |
| 5012 |
By specifying a negative parameter index in the list associated |
| 5013 |
with the constant {\tt UZR}; see Section~\ref{sec:UZR}. |
| 5014 |
|
| 5015 |
\item[-] |
| 5016 |
By appropriate choice of the computational window |
| 5017 |
defined by the constants {\tt RL0}, {\tt RL1}, {\tt A0}, and {\tt A1}. |
| 5018 |
One should always check that the starting solution lies within |
| 5019 |
this computational window, otherwise the computation will stop immediately |
| 5020 |
at the starting point. Most demos do not specify these constants, and |
| 5021 |
use an unbounded window. |
| 5022 |
\end{itemize} |
| 5023 |
|
| 5024 |
\subsection{\texttt{STOP}} \label{sec:STOP} |
| 5025 |
This constant adds stopping conditions. It is specified as a list of |
| 5026 |
bifurcation type strings followed by a number $n$ greater than zero. |
| 5027 |
These strings specify that the contination should stop as soon as the $n$th |
| 5028 |
bifurcation of the associated type has been reached. |
| 5029 |
Example:\\ |
| 5030 |
\begin{description} |
| 5031 |
\item[\parf{STOP=['HB3','UZ3']}] |
| 5032 |
Stop at the third Hopf bifurcation or third user defined point (see |
| 5033 |
Section~\ref{sec:UZR}), whichever comes first. |
| 5034 |
\end{description} |
| 5035 |
|
| 5036 |
\subsection{\texttt{NMX}} \label{sec:NMX} |
| 5037 |
The maximum number of steps to be taken along any family. |
| 5038 |
|
| 5039 |
\subsection{\texttt{RL0}} \label{sec:RL0} |
| 5040 |
The lower bound on the principal continuation parameter. |
| 5041 |
(This is the parameter which appears first in the {\tt ICP} list; |
| 5042 |
see Section~\ref{sec:ICP}.). |
| 5043 |
|
| 5044 |
\subsection{\texttt{RL1}} \label{sec:RL1} |
| 5045 |
The upper bound on the principal continuation parameter. |
| 5046 |
|
| 5047 |
\subsection{\texttt{A0}} \label{sec:A0} |
| 5048 |
The lower bound on the principal solution measure. |
| 5049 |
(By default, if {\tt IPLT}=0, the principal solution measure |
| 5050 |
is the $L_2$-norm of the state vector or state vector function. |
| 5051 |
See the {\cal AUTO}-constant {\tt IPLT} in Section~\ref{sec:IPLT} |
| 5052 |
for choosing another principal solution measure.) |
| 5053 |
|
| 5054 |
\subsection{\texttt{A1}} \label{sec:A1} |
| 5055 |
The upper bound on the principal solution measure. |
| 5056 |
|
| 5057 |
%===================================================================== |
| 5058 |
%===================================================================== |
| 5059 |
\section{ Free Parameters.} \label{sec:Free_parameters} |
| 5060 |
|
| 5061 |
|
| 5062 |
\subsection{\texttt{ICP}} \label{sec:ICP} |
| 5063 |
For each equation type and for each continuation calculation there is |
| 5064 |
a typical (``generic'') number of problem parameters that must be |
| 5065 |
allowed to vary, in order for the calculations to be properly posed. |
| 5066 |
The array {\tt ICP} designates these free parameters. |
| 5067 |
The parameter that appears first in the {\tt ICP} list is called the |
| 5068 |
``principal continuation parameter''. |
| 5069 |
Specific examples and special cases are described below. |
| 5070 |
|
| 5071 |
%===================================================================== |
| 5072 |
\subsection{ Fixed points.} |
| 5073 |
The simplest case is the continuation of a solution family to the system |
| 5074 |
$ f( u , p ) = 0$, where $f(\cdot,\cdot), u \in \Rn$, cf. Equation~(\ref{1}). |
| 5075 |
Such a system arises in the continuation of ODE stationary solutions and |
| 5076 |
in the continuation of fixed points of discrete dynamical systems. |
| 5077 |
There is only one free parameter here. |
| 5078 |
|
| 5079 |
As a concrete example, consider Run~1 of demo {\tt ab}, |
| 5080 |
where {\tt ICP=[1]}. |
| 5081 |
Thus, in this run {\tt PAR(1)} is designated as the free parameter. |
| 5082 |
|
| 5083 |
%===================================================================== |
| 5084 |
\subsection{ Periodic solutions and rotations.} |
| 5085 |
The continuation of periodic solutions and rotations generically requires |
| 5086 |
two parameters, namely, one problem parameter and the period. |
| 5087 |
For example, in Run~2 of demo {\tt ab} we have {\tt ICP=[1,11]}. |
| 5088 |
Thus, in this run, the free parameters are {\tt PAR(1)} and {\tt PAR(11)}. |
| 5089 |
(Note that {\cal AUTO} reserves {\tt PAR(11)} for the period.) |
| 5090 |
|
| 5091 |
Actually, for periodic solutions, it is sufficient to only specify |
| 5092 |
the index of the free problem parameter, as {\cal AUTO} will automatically |
| 5093 |
add {\tt PAR(11)}. |
| 5094 |
However, in this case the period will not appear in the screen output |
| 5095 |
and in the {\tt fort.7} output-file. |
| 5096 |
|
| 5097 |
For fixed period orbits one must specify two free problem |
| 5098 |
parameters. |
| 5099 |
For example, in Run~7 of demo {\tt pp2}, we have {\tt ICP=[1,2]}, with |
| 5100 |
{\tt PAR(1)} and {\tt PAR(2)} |
| 5101 |
specified as free problem parameters. |
| 5102 |
The period {\tt PAR(11)} is fixed in this run. |
| 5103 |
If the period is large then such a continuation provides a simple and |
| 5104 |
effective method for computing a locus of homoclinic orbits. |
| 5105 |
%===================================================================== |
| 5106 |
\subsection{ Folds and Hopf bifurcations.} |
| 5107 |
The continuation of folds for algebraic problems and the continuation of |
| 5108 |
Hopf bifurcations requires two free problem parameters. |
| 5109 |
For example, to continue a fold in Run~3 of demo {\tt ab}, we have {\tt ICP=[1,3]}, |
| 5110 |
with {\tt PAR(1)} and {\tt PAR(3)} specified as free parameters. |
| 5111 |
Note that one must set {\tt ISW}=2 for computing such loci of special solutions. |
| 5112 |
Also note that in the continuation of folds the principal continuation parameter |
| 5113 |
must be the one with respect to which the fold was located. |
| 5114 |
|
| 5115 |
%===================================================================== |
| 5116 |
\subsection{ Folds and period-doublings.} |
| 5117 |
The continuation of folds, for periodic orbits and rotations, |
| 5118 |
and the continuation of period-doubling and torus bifurcations require two free |
| 5119 |
problem parameters plus the free period. Thus, one would normally |
| 5120 |
specify three parameters. |
| 5121 |
For example, in Run~6 of demo {\tt pen}, where a locus of period-doubling |
| 5122 |
bifurcations is computed for rotations, we have {\tt ICP=[2,3,11]}, |
| 5123 |
with {\tt PAR(2)}, {\tt PAR(3)}, and {\tt PAR(11)} specified as free parameters. |
| 5124 |
Note that one must set {\tt ISW}=2 for computing such loci of special solutions. |
| 5125 |
Also note that in the continuation of folds the principal continuation parameter |
| 5126 |
must be the one with respect to which the fold was located. |
| 5127 |
|
| 5128 |
Actually, one may only specify the problem parameters, |
| 5129 |
as {\cal AUTO} will automatically add the period. |
| 5130 |
For example, in Run~3 of demo {\tt plp}, where a locus of folds is computed |
| 5131 |
for periodic orbits, we have {\tt ICP=[4,1]}, with {\tt PAR(4)} and {\tt PAR(1)} specified |
| 5132 |
as free parameters. |
| 5133 |
However, in this case the period will not appear in the screen output |
| 5134 |
and in the {\tt fort.7} output-file. |
| 5135 |
|
| 5136 |
To continue a locus of folds, period-doubling or torus bifurcations |
| 5137 |
with fixed period, simply |
| 5138 |
specify three problem parameters, not including {\tt PAR(11)}. |
| 5139 |
For torus bifurcations it is also possible to specify |
| 5140 |
four problem parameters (possibly including {\tt PAR(11)}). In that |
| 5141 |
case the angle of the torus ({\tt PAR(12)}) stays fixed. |
| 5142 |
|
| 5143 |
%===================================================================== |
| 5144 |
\subsection{ Boundary value problems.} |
| 5145 |
The simplest case is that of boundary value problems where |
| 5146 |
{\tt NDIM}={\tt NBC} |
| 5147 |
and where {\tt NINT}=0. |
| 5148 |
Then, generically, one free problem parameter is required for computing |
| 5149 |
a solution family. |
| 5150 |
For example, in demo {\tt exp}, we have {\tt NDIM}={\tt NBC}=2, {\tt NINT}=0. |
| 5151 |
Thus, in this demo one free parameter is designated, |
| 5152 |
namely {\tt PAR(1)}. |
| 5153 |
|
| 5154 |
More generally, for boundary value problems with integral constraints, |
| 5155 |
the generic number of free parameters is {\tt NBC} + {\tt NINT}$-${\tt NDIM} +1. |
| 5156 |
For example, in demo {\tt lin}, we have {\tt NDIM}=2, {\tt NBC}=2, and {\tt NINT}=1. |
| 5157 |
Thus {\tt ICP=[1,3]}. |
| 5158 |
Indeed, in this demo two free parameters are designated, |
| 5159 |
namely {\tt PAR(1)} and {\tt PAR(3)}. |
| 5160 |
|
| 5161 |
%===================================================================== |
| 5162 |
\subsection{ Boundary value folds.} |
| 5163 |
To continue a locus of folds for a general boundary value problem |
| 5164 |
with integral constraints, set {\tt \#ICP}={\tt NBC}+{\tt NINT}$-${\tt NDIM}+2, |
| 5165 |
and specify this number of parameter indices to designate the free parameters. |
| 5166 |
|
| 5167 |
%===================================================================== |
| 5168 |
\subsection{ Optimization problems.} |
| 5169 |
In algebraic optimization problems one must set {\tt ICP}(1)=10, |
| 5170 |
as {\cal AUTO} uses {\tt PAR(10)} as principal continuation parameter |
| 5171 |
to monitor the value of the objective function. |
| 5172 |
Furthermore, one must designate one free equation parameter in {\tt ICP}(2). |
| 5173 |
Thus, {\tt ICP=[10,2]} in the first run. |
| 5174 |
|
| 5175 |
Folds with respect to {\tt PAR(10)} correspond to extrema of the objective function. |
| 5176 |
In a second run one can restart at such a fold, with an additional |
| 5177 |
free equation parameter specified in {\tt ICP}(3). |
| 5178 |
Thus, {\tt ICP=[10,2,3]} in the second run. |
| 5179 |
|
| 5180 |
The above procedure can be repeated. |
| 5181 |
For example, folds from the second run can be continued in a third run |
| 5182 |
with three equation parameters specified in addition to {\tt PAR(10)}. |
| 5183 |
Thus, {\tt \#ICP=4} in the third run. |
| 5184 |
|
| 5185 |
For a simple example see demo {\tt opt}, where a four-parameter extremum |
| 5186 |
is located. |
| 5187 |
Note that {\tt \#ICP=5} in each of the four constants-files of this demo, |
| 5188 |
with the indices of {\tt PAR(10)} and {\tt PAR(1)-PAR(4)} specified in {\tt ICP}. |
| 5189 |
Thus, in the first three runs, there are overspecified parameters. |
| 5190 |
However, {\cal AUTO} will always use the correct number of parameters. |
| 5191 |
Although the overspecified parameters will be printed, their values will |
| 5192 |
remain fixed. |
| 5193 |
|
| 5194 |
%===================================================================== |
| 5195 |
\subsection{ Internal free parameters.} |
| 5196 |
The actual continuation scheme in {\cal AUTO} may use additional free |
| 5197 |
parameters that are automatically added. |
| 5198 |
The simplest example is the computation of periodic solutions and rotations, |
| 5199 |
where {\cal AUTO} automatically puts the period, if not specified, in |
| 5200 |
\parf{PAR(11)}. |
| 5201 |
The computation of loci of folds, Hopf bifurcations, and period-doublings |
| 5202 |
also requires additional internal continuation parameters. |
| 5203 |
These will be automatically added, and their indices will be greater |
| 5204 |
than \parf{NPAR}. |
| 5205 |
Other use depends on \parf{IPS}: see Section~\ref{sec:Restrictions_on_PAR}. |
| 5206 |
|
| 5207 |
%===================================================================== |
| 5208 |
\subsection{ Parameter overspecification.} \label{sec:Parameter_over_specification} |
| 5209 |
The number of specified parameter indices is allowed to be be greater |
| 5210 |
than the generic number. |
| 5211 |
In such case there will be ``overspecified'' parameters, whose values |
| 5212 |
will appear in the screen and {\tt fort.7} output, but which are not |
| 5213 |
part of the continuation process. |
| 5214 |
A simple example is provided by demo {\tt opt}, where the first three runs |
| 5215 |
have overspecified parameters whose values, although constant, are printed. |
| 5216 |
|
| 5217 |
There is, however, a more useful application of parameter overspecification. |
| 5218 |
In the user-supplied routine {\tt PVLS} one can define solution measures |
| 5219 |
and assign these to otherwise unused parameters. |
| 5220 |
Such parameters can then be overspecified, in order to print them |
| 5221 |
on the screen and in the {\tt fort.7} output. |
| 5222 |
It is important to note that such overspecified parameters must appear |
| 5223 |
at the end of the {\tt ICP} list, as they cannot be used as true continuation |
| 5224 |
parameters. |
| 5225 |
|
| 5226 |
For an example of using parameter overspecification for printing user-defined |
| 5227 |
solution measures, see demo {\tt pvl}. |
| 5228 |
This is a boundary value problem (Bratu's equation) which has |
| 5229 |
only one true continuation parameter, namely {\tt PAR(1)}. |
| 5230 |
Three solution measures are defined in the routine {\tt PVLS}, namely, |
| 5231 |
the $L_2$-norm of the first solution component, |
| 5232 |
the minimum of the second component, and |
| 5233 |
the left boundary value of the second component. |
| 5234 |
These solution measures are assigned to {\tt PAR(2), PAR(3), PAR(4)}, |
| 5235 |
and {\tt PAR(5)}, respectively. |
| 5236 |
In the constants-file {\tt c.pvl} we have {\tt \#ICP=5}, |
| 5237 |
with {\tt PAR(1)-PAR(5)} specified as parameters. |
| 5238 |
Thus, in this example, {\tt PAR(2)-PAR(5)} are overspecified. |
| 5239 |
Note that {\tt PAR(1)} must appear first in the {\tt ICP} list; |
| 5240 |
the other parameters cannot be used as true continuation parameters. |
| 5241 |
%===================================================================== |
| 5242 |
%===================================================================== |
| 5243 |
\section{ Computation Constants.} \label{sec:Computation_constants} |
| 5244 |
\subsection{\texttt{ILP}} \label{sec:ILP} |
| 5245 |
\begin{itemize} |
| 5246 |
\item[-] {\tt ILP=0}~: |
| 5247 |
No detection of folds. This choice is recommended. |
| 5248 |
\item[-] {\tt ILP=1}~: |
| 5249 |
Detection of folds. To be used if subsequent fold continuation is intended. |
| 5250 |
\end{itemize} |
| 5251 |
|
| 5252 |
\subsection{\texttt{SP}} \label{sec:SP} |
| 5253 |
This constant controls the detection of bifurcations and adds stopping |
| 5254 |
conditions. It is specified as a list of bifurcation type strings |
| 5255 |
followed by an optional number. If this number is 0, then the detection |
| 5256 |
of this bifurcation is turned off, and if it is missing |
| 5257 |
then the detection is turned on. A number $n$ greater than zero |
| 5258 |
specifies that the contination should stop as soon as the $n$th |
| 5259 |
bifurcation of this type has been reached. |
| 5260 |
Examples:\\ |
| 5261 |
\begin{itemize} |
| 5262 |
\item[-] {\tt SP=['LP0']}\\ |
| 5263 |
turn off detection of folds. |
| 5264 |
\item[-] {\tt SP=['LP','HB3','BP0','UZ3']}\\ |
| 5265 |
turn on the detection of folds and Hopf bifurcations, |
| 5266 |
turn off detection of branch points and stop at the third Hopf |
| 5267 |
bifurcation or third user defined point, whichever comes first. |
| 5268 |
\end{itemize} |
| 5269 |
|
| 5270 |
\subsection{\texttt{ISP}} \label{sec:ISP} |
| 5271 |
This constant controls the detection of Hopf bifurcations, |
| 5272 |
branch points, period-doubling bifurcations, and torus bifurcations. |
| 5273 |
\begin{itemize} |
| 5274 |
\item[-] {\tt ISP=0}~: |
| 5275 |
This setting disables the detection of Hopf bifurcations, |
| 5276 |
branch points, period-doubling |
| 5277 |
bifurcations, and torus bifurcations and the computation of |
| 5278 |
Floquet multipliers. |
| 5279 |
\item[-] {\tt ISP=1}~: |
| 5280 |
Branch points and Hopf bifurcations are detected for algebraic |
| 5281 |
equations. Branch points, period-doubling bifurcations and torus |
| 5282 |
bifurcations are not detected for periodic solutions and boundary |
| 5283 |
value problems. However, Floquet multipliers are computed. |
| 5284 |
\item[-] {\tt ISP=2}~: This setting enables the detection of all special |
| 5285 |
solutions. |
| 5286 |
For periodic solutions and rotations, the choice {\tt ISP}=2 should be used with |
| 5287 |
care, due to potential inaccuracy in the computation of the |
| 5288 |
linearized Poincar\'e map and possible rapid variation of the |
| 5289 |
Floquet multipliers. |
| 5290 |
The linearized Poincar\'e map always has a multiplier $z=1$. |
| 5291 |
If this multiplier becomes inaccurate |
| 5292 |
then the automatic detection of secondary periodic |
| 5293 |
bifurcations will be discontinued and a |
| 5294 |
warning message will be printed in {\tt fort.9}. |
| 5295 |
See also Section~\ref{sec:Bifurcations}. |
| 5296 |
\item[-] {\tt ISP=3}~: |
| 5297 |
Hopf bifurcations will not be detected. |
| 5298 |
Branch points will be detected, and {\cal AUTO} will monitor the |
| 5299 |
Floquet multipliers. Period-doubling and torus bifurcations will go undetected. |
| 5300 |
This option is useful for certain problems with non-generic Floquet behavior. |
| 5301 |
\item[-] {\tt ISP=4}~: |
| 5302 |
Branch points and Hopf bifurcations are detected for algebraic |
| 5303 |
equations. Branch points are not detected for |
| 5304 |
periodic solutions and boundary value problems. |
| 5305 |
{\cal AUTO} will monitor the Floquet multipliers, and period-doubling |
| 5306 |
and torus bifurcations will be detected. |
| 5307 |
\end{itemize} |
| 5308 |
|
| 5309 |
\subsection{\texttt{ISW}} \label{sec:ISW} |
| 5310 |
This constant controls branch switching at branch points for the case |
| 5311 |
of differential equations. |
| 5312 |
Note that branch switching is automatic for algebraic equations. |
| 5313 |
\begin{itemize} |
| 5314 |
\item[-] {\tt ISW=1}~: This is the normal value of {\tt ISW}. |
| 5315 |
\item[-] {\tt ISW=$-$1}~: |
| 5316 |
If {\tt IRS} is the label of a branch point or a period-doubling |
| 5317 |
bifurcation then branch switching will be done. |
| 5318 |
For period doubling bifurcations it is recommended that {\tt NTST} be increased. |
| 5319 |
For examples see Run~2 and Run~3 of demo {\tt lor}, where branch switching |
| 5320 |
is done at period-doubling bifurcations, and Run~2 and Run~3 of demo {\tt bvp}, |
| 5321 |
where branch switching is done at a transcritical branch point. |
| 5322 |
\item[-] {\tt ISW=2}~: |
| 5323 |
If {\tt IRS} is the label of a fold, a Hopf bifurcation point, |
| 5324 |
a period-doubling, a torus bifurcation, or, in a non-generic |
| 5325 |
(symmetric) system, a branch point then a locus of such points will be |
| 5326 |
computed. An additional free parameter must be specified for such |
| 5327 |
continuations; see also Section~\ref{sec:Free_parameters}. |
| 5328 |
\item[-] {\tt ISW=3}~: |
| 5329 |
If {\tt IRS} is the label of a branch point in a generic |
| 5330 |
(non-symmetric) system then a locus of such points will be |
| 5331 |
computed. Two additional free parameters must be specified for such |
| 5332 |
continuations; see also Section~\ref{sec:Free_parameters}. |
| 5333 |
\end{itemize} |
| 5334 |
|
| 5335 |
\subsection{\texttt{MXBF}} \label{sec:MXBF} |
| 5336 |
This constant, which is effective for algebraic problems only, |
| 5337 |
sets the maximum number of bifurcations to be treated. |
| 5338 |
Additional branch points will be noted, but the corresponding bifurcating |
| 5339 |
families will not be computed. |
| 5340 |
If {\tt MXBF} is positive then the bifurcating families of the first {\tt MXBF} |
| 5341 |
branch points will be traced out in both directions. |
| 5342 |
If {\tt MXBF} is negative then the bifurcating families of the first |
| 5343 |
$\abs{{\tt MXBF}}$ branch points will be traced out in only one direction. |
| 5344 |
|
| 5345 |
\subsection{\texttt{s}} \label{sec:s} |
| 5346 |
This constant sets the name of the solution file from which the computation |
| 5347 |
is to be restarted, instead of \filef{fort.3}: if {\tt s='xxx'} then the |
| 5348 |
name of the restart file is \filef{s.xxx}. |
| 5349 |
|
| 5350 |
\subsection{\texttt{dat}} \label{sec:dat} |
| 5351 |
This constant, where {\tt dat='xxx'}, sets the name of a user-supplied ASCII |
| 5352 |
data file {\tt xxx.dat}, from which the contination is to be restarted. |
| 5353 |
{\cal AUTO} automatically sets the period in {\tt PAR(11)}. |
| 5354 |
Other parameter values must be set in {\tt STPNT}. (When necessary, |
| 5355 |
{\tt PAR(11)} may also be redefined there.) |
| 5356 |
|
| 5357 |
The first column in the data file denotes the time, which does |
| 5358 |
\emph{not} need to be rescaled to the interval $[0,1]$, and further |
| 5359 |
columns the coordinates of the solution. The constant {\tt IRS} must |
| 5360 |
be set to 0. |
| 5361 |
|
| 5362 |
(Demos {\tt lor}, {\tt pen}.) |
| 5363 |
|
| 5364 |
\subsection{\texttt{U}} \label{sec:U} |
| 5365 |
This constant, where {\tt U=\{i1:x1,i2:x2\}}, changes the value of |
| 5366 |
{\tt U(i1)} to {\tt x1}, {\tt U(i2)} to {\tt x2}, and so on, |
| 5367 |
with respect to the solution to start from. This is only |
| 5368 |
valid for restarting from algebraic problems or a constant-in-time |
| 5369 |
solution. |
| 5370 |
|
| 5371 |
\subsection{\texttt{PAR}} \label{sec:PAR} |
| 5372 |
This constant, where {\tt PAR=\{i1:x1,i2:x2\}}, changes the value of |
| 5373 |
{\tt PAR(i1)} to {\tt x1}, {\tt PAR(i2)} to |
| 5374 |
{\tt x2}, and so on, with respect to the solution to start from. |
| 5375 |
|
| 5376 |
\subsection{\texttt{IRS}} \label{sec:IRS} |
| 5377 |
This constant sets the label of the solution where the computation |
| 5378 |
is to be restarted. |
| 5379 |
\begin{itemize} |
| 5380 |
\item[-] {\tt IRS=0}~: |
| 5381 |
This setting is typically used in the first run of a new problem. |
| 5382 |
In this case a starting solution must be defined in the user-supplied |
| 5383 |
routine {\tt STPNT}. |
| 5384 |
For representative examples of analytical starting solutions |
| 5385 |
see demos {\tt ab} and {\tt frc}. |
| 5386 |
For starting from unlabeled numerical data see the {\tt dat} command |
| 5387 |
above, and demos {\tt lor} and {\tt pen}. |
| 5388 |
|
| 5389 |
\item[-] {\tt IRS$>$0}~: |
| 5390 |
Restart the computation at the previously computed solution with label {\tt IRS}. |
| 5391 |
This solution is normally expected to be in the current data-file |
| 5392 |
{\tt s.xxx}; see also the \commandf{@r} and \commandf{@R} commands in |
| 5393 |
Section~\ref{sec:command_mode}. |
| 5394 |
Various {\cal AUTO}-constants can be modified when restarting. |
| 5395 |
|
| 5396 |
\item[-] {\tt IRS$<$0}~: |
| 5397 |
Restart the computation at the -IRSth computed solution in the |
| 5398 |
restart file. This is especially useful if you do not want to look |
| 5399 |
up label numbers and know for sure that the solution to continue |
| 5400 |
from is at a fixed position. |
| 5401 |
\item[-] {\tt IRS='XYn'}~: |
| 5402 |
Restart the computation at the nth label of type XY in the |
| 5403 |
restart file, for instance 'HB12' to restart at the twelfth Hopf |
| 5404 |
bifurcation. |
| 5405 |
\end{itemize} |
| 5406 |
|
| 5407 |
\subsection{\texttt{TY}} \label{sec:TY} |
| 5408 |
This constant modifies the type from the restart solution. |
| 5409 |
This is sometimes useful in conservative or extended systems, |
| 5410 |
declaring a regular point to be a Hopf bifurcation point ({\tt TY='HB'}) or a |
| 5411 |
branch point ({\tt TY='BP'}). Use {\tt TY='HB4'} to copy the period |
| 5412 |
of the emanating periodic orbit from {\tt PAR(4)} (for example set in |
| 5413 |
the routine {\tt PVLS} in the equations file) to {\tt PAR(11)}. |
| 5414 |
(Demo {\tt r3b}.) |
| 5415 |
|
| 5416 |
\subsection{\texttt{IPS}} \label{sec:IPS} |
| 5417 |
This constant defines the problem type~: |
| 5418 |
\begin{itemize} |
| 5419 |
%===================================================================== |
| 5420 |
\item[-] {\tt IPS=0}~: |
| 5421 |
An algebraic bifurcation problem. |
| 5422 |
Hopf bifurcations will not be detected and stability |
| 5423 |
properties will not be indicated in the {\tt fort.7} output-file. |
| 5424 |
%===================================================================== |
| 5425 |
\item[-] {\tt IPS=1}~: |
| 5426 |
Stationary solutions of ODEs with detection of Hopf bifurcations. |
| 5427 |
The sign of PT, the point number, in {\tt fort.7} is used |
| 5428 |
to indicate stability~: $-$ is stable , + is unstable.\\ |
| 5429 |
(Demo {\tt ab}.) |
| 5430 |
%===================================================================== |
| 5431 |
\item[-] {\tt IPS=$-$1}~: |
| 5432 |
Fixed points of the discrete dynamical system |
| 5433 |
$u^{(k+1)}=f(u^{(k)},p ),$ with detection of Hopf bifurcations. |
| 5434 |
The sign of PT in {\tt fort.7} indicates stability~: |
| 5435 |
$-$ is stable , + is unstable. |
| 5436 |
(Demo {\tt dd2}.) |
| 5437 |
%===================================================================== |
| 5438 |
\item[-] {\tt IPS=$-$2}~: |
| 5439 |
Time integration using implicit Euler. |
| 5440 |
The {\cal AUTO}-constants {\tt DS}, {\tt DSMIN}, {\tt DSMAX}, and {\tt ITNW}, {\tt NWTN} control |
| 5441 |
the stepsize. |
| 5442 |
In fact, pseudo-arclength is used for ``continuation in time''. |
| 5443 |
Note that the time discretization is only first order accurate, |
| 5444 |
so that results should be carefully interpreted. |
| 5445 |
Indeed, this option has been included primarily for the detection |
| 5446 |
of stationary solutions, which can then be entered in the user-supplied |
| 5447 |
routine {\tt STPNT}. \\ |
| 5448 |
(Demo {\tt ivp}.) |
| 5449 |
%===================================================================== |
| 5450 |
\item[-] {\tt IPS=2}~: |
| 5451 |
Computation of periodic solutions. Starting data can be |
| 5452 |
a Hopf bifurcation point (Run~2 of demo {\tt ab}), |
| 5453 |
a periodic orbit from a previous run (Run~4 of demo {\tt pp2}), |
| 5454 |
an analytically known periodic orbit (Run~1 of demo {\tt frc}), |
| 5455 |
or a numerically known periodic orbit (Demo {\tt lor}). |
| 5456 |
The sign of PT in {\tt fort.7} is used to indicate |
| 5457 |
stability~: $-$ is stable , + is unstable or unknown. |
| 5458 |
%===================================================================== |
| 5459 |
\item[-] {\tt IPS=4}~: |
| 5460 |
A boundary value problem. Boundary conditions must be |
| 5461 |
specified in the user-supplied routine {\tt BCND} |
| 5462 |
and integral constraints in {\tt ICND}. The {\cal AUTO}-constants |
| 5463 |
{\tt NBC} and {\tt NINT} must be given correct values. |
| 5464 |
(Demos {\tt exp}, {\tt int}, {\tt kar}.) |
| 5465 |
%===================================================================== |
| 5466 |
\item[-] {\tt IPS=5}~: |
| 5467 |
Algebraic optimization problems. The objective function |
| 5468 |
must be specified in the user-supplied routine {\tt FOPT}. |
| 5469 |
(Demo {\tt opt}.) |
| 5470 |
%===================================================================== |
| 5471 |
\item[-] {\tt IPS=7}~: |
| 5472 |
A boundary value problem with computation of Floquet multipliers. |
| 5473 |
This is a very special option; for most boundary value problems |
| 5474 |
one should use {\tt IPS=4}. |
| 5475 |
Boundary conditions must be |
| 5476 |
specified in the user-supplied routine {\tt BCND} |
| 5477 |
and integral constraints in {\tt ICND}. The {\cal AUTO}-constants |
| 5478 |
{\tt NBC} and {\tt NINT} must be given correct values. |
| 5479 |
%===================================================================== |
| 5480 |
\item[-] {\tt IPS=9}~: |
| 5481 |
This option is used in connection with the {\cal HomCont} algorithms |
| 5482 |
described in |
| 5483 |
Chapters~\ref{ch:HomCont}-\ref{ch:HomCont_rev} |
| 5484 |
for the detection and continuation of homoclinic bifurcations.\\ |
| 5485 |
(Demos {\tt san}, {\tt mtn}, {\tt kpr}, {\tt cir}, {\tt she}, |
| 5486 |
{\tt rev}.) |
| 5487 |
%===================================================================== |
| 5488 |
\item[-] {\tt IPS=11}~: |
| 5489 |
Spatially uniform solutions of a system of parabolic PDEs, |
| 5490 |
with detection of traveling wave bifurcations. |
| 5491 |
The user need only define the nonlinearity (in routine {\tt FUNC}), |
| 5492 |
initialize the wave speed in {\tt PAR(10)}, initialize the diffusion |
| 5493 |
constants in {\tt PAR(15,16,$\cdots$)}, and set a free equation parameter |
| 5494 |
in {\tt ICP}(1). |
| 5495 |
(Run~2 of demo {\tt wav}.) |
| 5496 |
%===================================================================== |
| 5497 |
\item[-] {\tt IPS=12}~: |
| 5498 |
Continuation of traveling wave solutions to a system of parabolic PDEs. |
| 5499 |
Starting data can be a Hopf bifurcation point from a previous run |
| 5500 |
with {\tt IPS}=11, or a traveling wave from a previous run with {\tt IPS}=12. |
| 5501 |
(Run~3 and Run~4 of demo {\tt wav}.) |
| 5502 |
%===================================================================== |
| 5503 |
\item[-] {\tt IPS=14}~: |
| 5504 |
Time evolution for a system of parabolic PDEs subject to periodic |
| 5505 |
boundary conditions. |
| 5506 |
Starting data may be solutions from a previous run with {\tt IPS}=12 or 14. |
| 5507 |
Starting data can also be specified in {\tt STPNT}, in which case |
| 5508 |
the wave length must be specified in {\tt PAR(11)}, and the diffusion |
| 5509 |
constants in {\tt PAR(15,16,$\cdots$)}. |
| 5510 |
{\cal AUTO} uses {\tt PAR(14)} for the time variable. |
| 5511 |
{\tt DS}, {\tt DSMIN}, and {\tt DSMAX} govern the pseudo-arclength continuation |
| 5512 |
in the space-time variables. |
| 5513 |
Note that the time discretization is only first order accurate, |
| 5514 |
so that results should be carefully interpreted. |
| 5515 |
Indeed, this option is mainly intended for the detection of stationary |
| 5516 |
waves. |
| 5517 |
(Run~5 of demo {\tt wav}.) |
| 5518 |
%===================================================================== |
| 5519 |
\item[-] {\tt IPS=15}~: |
| 5520 |
Optimization of periodic solutions. The integrand of the |
| 5521 |
objective functional must be specified in the user supplied |
| 5522 |
routine {\tt FOPT}. Only {\tt PAR(1-9)} should be used for |
| 5523 |
problem parameters. {\tt PAR(10)} is the value of the objective |
| 5524 |
functional, {\tt PAR(11)} the period, {\tt PAR(12)} the norm of the |
| 5525 |
adjoint variables, {\tt PAR(14)} and {\tt PAR(15)} are internal optimality |
| 5526 |
variables. {\tt PAR(21-29)} and {\tt PAR(31)} are used to monitor the |
| 5527 |
optimality functionals associated with the problem parameters |
| 5528 |
and the period. |
| 5529 |
Computations can be started at a solution computed with {\tt IPS}=2 |
| 5530 |
or {\tt IPS}=15. |
| 5531 |
For a detailed example see demo {\tt ops}. |
| 5532 |
%===================================================================== |
| 5533 |
\item[-] {\tt IPS=16}~: |
| 5534 |
This option is similar to {\tt IPS}=14, except that the user supplies the |
| 5535 |
boundary conditions. Thus this option can be used for |
| 5536 |
time-integration of parabolic systems subject to |
| 5537 |
user-defined boundary conditions. For examples see the first runs |
| 5538 |
of demos {\tt pd1}, {\tt pd2}, and {\tt bru}. Note that |
| 5539 |
the space-derivatives of the initial conditions must |
| 5540 |
also be supplied in the user supplied routine {\tt STPNT}. |
| 5541 |
The initial conditions must satisfy the boundary conditions. |
| 5542 |
This option is mainly intended for the detecting stationary solutions. |
| 5543 |
%===================================================================== |
| 5544 |
\item[-] {\tt IPS=17}~: |
| 5545 |
This option can be used to continue stationary solutions |
| 5546 |
of parabolic systems obtained from an evolution run with {\tt IPS}=16. |
| 5547 |
For examples see the second runs of demos {\tt pd1} and {\tt pd2}. |
| 5548 |
\end{itemize} |
| 5549 |
%===================================================================== |
| 5550 |
|
| 5551 |
|
| 5552 |
\section{ Output Control.} \label{sec:Output_control} |
| 5553 |
\subsection{\texttt{unames}} \label{sec:unames} |
| 5554 |
This constant, where {\tt unames=\{i1:s1,i2:s2\}}, changes the names in all |
| 5555 |
output from {\tt U(i1)} to {\tt s1}, from {\tt U(i2)} to {\tt s2}, and so on. |
| 5556 |
You can also refer to these strings, instead of the corresponding indices, |
| 5557 |
in the constants \texttt{U} and \texttt{THU}. |
| 5558 |
|
| 5559 |
\subsection{\texttt{parnames}} \label{sec:parnames} |
| 5560 |
This constant, where {\tt parnames=\{i1:s1,i2:s2\}}, changes the names in all |
| 5561 |
output from {\tt PAR(i1)} to {\tt s1}, from {\tt PAR(i2)} to {\tt s2}, |
| 5562 |
and so on. |
| 5563 |
You can also refer to these strings, instead of the corresponding indices, |
| 5564 |
in the constants \texttt{ICP}, \texttt{THL}, and \texttt{UZR}. |
| 5565 |
|
| 5566 |
\subsection{\texttt{e}} \label{sec:e} |
| 5567 |
This constant, where {\tt e='xxx'}, is only for use by post-processors: |
| 5568 |
it denotes the name of the equations file and is stored |
| 5569 |
in the bifurcation diagram file (\filef{fort.7}), so restarts in the |
| 5570 |
Python interface are possible without needing to specify the equations |
| 5571 |
file. |
| 5572 |
|
| 5573 |
\subsection{\texttt{sv}} \label{sec:sv} |
| 5574 |
This constant specifies a string to write the output to instead of |
| 5575 |
{\tt fort.7}, {\tt fort.8}, and {\tt fort.9}: if {\tt sv='xxx'}, then |
| 5576 |
the output files are |
| 5577 |
{\tt b.xxx}, {\tt s.xxx}, and {\tt d.xxx}. |
| 5578 |
|
| 5579 |
\subsection{\texttt{NPR}} \label{sec:NPR} |
| 5580 |
This constant can be used to regularly write {\tt fort.8} plotting and restart |
| 5581 |
data. |
| 5582 |
IF {\tt NPR}$>$0 then such output is written every {\tt NPR} steps. |
| 5583 |
IF {\tt NPR}$=$0 or if {\tt NPR}$\ge${\tt NMX} then no such output is written. |
| 5584 |
Note that special solutions, such as branch points, folds, end points, etc., |
| 5585 |
are always written in {\tt fort.8}. |
| 5586 |
Furthermore, one can specify parameter values where plotting and restart |
| 5587 |
data is to be written; see Section~\ref{sec:UZR}. |
| 5588 |
For these reasons, and to limit the output volume, it is recommended that |
| 5589 |
{\tt NPR} output be kept to a minimum. |
| 5590 |
|
| 5591 |
\subsection{\texttt{IBR}} \label{sec:IBR} |
| 5592 |
This constant specifies the initial branch number {\tt BR} that is |
| 5593 |
used. The default {\tt IBR=0} means that that this number is |
| 5594 |
determined automatically. |
| 5595 |
|
| 5596 |
\subsection{\texttt{LAB}} \label{sec:LAB} |
| 5597 |
This constant specifies the initial label number {\tt LAB} that is |
| 5598 |
used. The default {\tt LAB=0} means that that this number is |
| 5599 |
determined automatically. Using {\tt LAB=1} means you do not need |
| 5600 |
to relabel after a non-appended continuation if this is desired. |
| 5601 |
|
| 5602 |
\subsection{\texttt{IIS}} \label{sec:IIS} |
| 5603 |
This constant controls the amount of information printed in {\tt fort.8}~: |
| 5604 |
the greater {\tt IIS} the more solutions contain the corresponding |
| 5605 |
vector giving the direction of the branch. The direction of the |
| 5606 |
branch is necessary for restart points when switching branches, but |
| 5607 |
make the solution file almost two times bigger than necessary when |
| 5608 |
switching branches is never performed from solutions in this file. |
| 5609 |
|
| 5610 |
\begin{itemize} |
| 5611 |
\item[-] {\tt IIS=0}~: |
| 5612 |
The direction of the branch is never provided. |
| 5613 |
\item[-] {\tt IIS=1}~: |
| 5614 |
The direction of the branch is only provided at special points from |
| 5615 |
which branch switching can be performed (types LP (boundary value |
| 5616 |
problems only), BP, PD, TR). |
| 5617 |
\item[-] {\tt IIS=2}~: |
| 5618 |
The direction of the branch is provided at all special points but |
| 5619 |
not at regular points without a type label. |
| 5620 |
\item[-] {\tt IIS=3}~: |
| 5621 |
The direction of the branch is always provided. This is the default |
| 5622 |
setting. |
| 5623 |
\end{itemize} |
| 5624 |
|
| 5625 |
\subsection{\texttt{IID}} \label{sec:IID} |
| 5626 |
This constant controls the amount of diagnostic output printed in {\tt fort.9}~: |
| 5627 |
the greater {\tt IID} the more detailed the diagnostic output. |
| 5628 |
\begin{itemize} |
| 5629 |
\item[-] {\tt IID=0}~: |
| 5630 |
No diagnostic output. |
| 5631 |
\item[-] {\tt IID=1}~: |
| 5632 |
Minimal diagnostic output. This setting is not recommended. |
| 5633 |
\item[-] {\tt IID=2}~: |
| 5634 |
Regular diagnostic output. This is the recommended value of {\tt IID}. |
| 5635 |
\item[-] {\tt IID=3}~: |
| 5636 |
This setting gives additional diagnostic output for algebraic equations, |
| 5637 |
namely the Jacobian and the residual vector at the starting point. |
| 5638 |
This information, which is printed at the beginning of {\tt fort.9}, |
| 5639 |
is useful for verifying whether the starting solution in {\tt STPNT} is indeed |
| 5640 |
a solution. |
| 5641 |
\item[-] {\tt IID=4}~: |
| 5642 |
This setting gives additional diagnostic output for differential equations, |
| 5643 |
namely the reduced system and the associated residual vector. |
| 5644 |
This information is printed for every step and for every Newton iteration, |
| 5645 |
and should normally be suppressed. |
| 5646 |
In particular it can be used to verify whether the starting solution |
| 5647 |
is indeed a solution. For this purpose, the stepsize {\tt DS} should |
| 5648 |
be small, and one should look at the residuals printed in the {\tt fort.9} |
| 5649 |
output-file. (Note that the first residual vector printed in {\tt fort.9} may |
| 5650 |
be identically zero, as it may correspond to the computation of the starting |
| 5651 |
direction. Look at the second residual vector in such case.) |
| 5652 |
This residual vector has dimension |
| 5653 |
{\tt NDIM}+{\tt NBC}+{\tt NINT}+1, which accounts for the {\tt NDIM} |
| 5654 |
differential equations, the {\tt NBC} boundary conditions, the {\tt NINT} user-defined |
| 5655 |
integral constraints, and the pseudo-arclength equation. |
| 5656 |
For proper interpretations of these data one may want to refer to the solution |
| 5657 |
algorithm for solving the collocation system, as described in |
| 5658 |
\citename{DoKeKe:91b} \citeyear{DoKeKe:91b}. |
| 5659 |
\item[-] {\tt IID=5}~: |
| 5660 |
This setting gives very extensive diagnostic output for differential equations, |
| 5661 |
namely, debug output from the linear equation solver. |
| 5662 |
This setting should not normally be used as it may result |
| 5663 |
in a huge {\tt fort.9} file. It gives incomplete results when |
| 5664 |
used in combination with MPI parallellization. |
| 5665 |
\end{itemize} |
| 5666 |
|
| 5667 |
\subsection{\texttt{IPLT}} \label{sec:IPLT} |
| 5668 |
This constant allows redefinition of the principal solution measure, which is |
| 5669 |
printed as the second (real) column in the screen output and in the {\tt fort.7} |
| 5670 |
output-file~: |
| 5671 |
|
| 5672 |
\begin{itemize} |
| 5673 |
\item[-] |
| 5674 |
If {\tt IPLT} = 0 then the $L_2$-norm is printed. Most demos use this setting. |
| 5675 |
For algebraic problems, the standard definition of $L_2$-norm is used. |
| 5676 |
For differential equations, the $L_2$-norm is defined as |
| 5677 |
$$ \sqrt{ \int_0^1 \sum_{k=1}^{NDIM} U_k(x)^2 ~ dx}~.$$ |
| 5678 |
Note that the interval of integration is $[0,1]$, the standard interval |
| 5679 |
used by AUTO. For periodic solutions the independent variable is transformed |
| 5680 |
to range from 0 to 1, before the norm is computed. The AUTO-constants THL(*) |
| 5681 |
and THU(*) (see Section~\ref{sec:THL} and Section~\ref{sec:THU}) |
| 5682 |
affect the definition of the $L_2$-norm. |
| 5683 |
\item[-] |
| 5684 |
If 0 $<$ {\tt IPLT} $\le$ {\tt NDIM} then the maximum of the {\tt IPLT}'th solution component |
| 5685 |
is printed. |
| 5686 |
\item[-] |
| 5687 |
If $-${\tt NDIM} $\le$ {\tt IPLT} $<$0 then the minimum of the {\tt IPLT}'th solution component |
| 5688 |
is printed. (Demo {\tt fsh}.) |
| 5689 |
\item[-] |
| 5690 |
If {\tt NDIM} $<$ {\tt IPLT} $\le$ 2*{\tt NDIM} then the integral |
| 5691 |
of the ({\tt IPLT}$-${\tt NDIM})'th |
| 5692 |
solution component is printed. (Demos {\tt exp}, {\tt lor}.) |
| 5693 |
\item[-] |
| 5694 |
If 2*{\tt NDIM} $<$ {\tt IPLT} $\le$ 3*{\tt NDIM} |
| 5695 |
then the $L_2$-norm of the ({\tt IPLT}$-${\tt NDIM})'th |
| 5696 |
solution component is printed. (Demo {\tt frc}.) |
| 5697 |
\end{itemize} |
| 5698 |
|
| 5699 |
Note that for algebraic problems the maximum and the minimum are identical. |
| 5700 |
Also, for ODEs the maximum and the minimum of a solution component are generally |
| 5701 |
much less accurate than the $L_2$-norm and component integrals. |
| 5702 |
Note also that the routine {\tt PVLS} provides a second, more general way |
| 5703 |
of defining solution measures; see Section~\ref{sec:Parameter_over_specification}. |
| 5704 |
|
| 5705 |
|
| 5706 |
\subsection{\texttt{UZR}} \label{sec:UZR} |
| 5707 |
This constant allows the setting of parameter values at which labeled plotting |
| 5708 |
and restart information is to be written in the {\tt fort.8} output-file. |
| 5709 |
Optionally, it also allows the computation to terminate at such a point. |
| 5710 |
|
| 5711 |
\begin{itemize} |
| 5712 |
\item[-] |
| 5713 |
Set {\tt UZR=\{\}} if no such output is needed. Many demos use this setting. |
| 5714 |
\item[-] |
| 5715 |
Else one must enter pairs, |
| 5716 |
~\{{\it Parameter-Index} : {\it Parameter-Value}, ...\}~,\\ |
| 5717 |
or indices with lists of values, |
| 5718 |
~\{{\it Parameter-Index} : \[{\it Parameter-Value}, ...\], ...\}~, |
| 5719 |
to designate the parameters and the parameter |
| 5720 |
values at which output is to be written. |
| 5721 |
For examples see demos {\tt exp}, {\tt int}, and {\tt fsh}. |
| 5722 |
\item[-] |
| 5723 |
If such a parameter index is preceded by a minus sign then the computation will |
| 5724 |
terminate at such a solution point. See also \texttt{STOP} in |
| 5725 |
Section~\ref{sec:STOP} above and \texttt{UZSTOP} in |
| 5726 |
Section~\ref{sec:UZSTOP} below for alternative termination methods. |
| 5727 |
(Demos {\tt pen} and {\tt bru}.) |
| 5728 |
\end{itemize} |
| 5729 |
|
| 5730 |
Note that {\tt fort.8} output can also be written at selected values of |
| 5731 |
overspecified parameters. For an example see demo {\tt pvl}. |
| 5732 |
For details on overspecified parameters see |
| 5733 |
Section~\ref{sec:Parameter_over_specification}. |
| 5734 |
|
| 5735 |
\subsection{\texttt{UZSTOP}} \label{sec:UZSTOP} |
| 5736 |
This constant specifies parameter values in the same way as |
| 5737 |
\texttt{UZR} in Section~\ref{sec:UZR} above, but the computation |
| 5738 |
will always terminate if any solution point that is specified is |
| 5739 |
encountered. |
| 5740 |
|
| 5741 |
%===================================================================== |
| 5742 |
|
| 5743 |
\section{ Quick reference} |
| 5744 |
\vspace{-2.5mm} |
| 5745 |
\begin{tabular}{|l|l|} |
| 5746 |
\hline |
| 5747 |
{\tt e}, {\tt s}, {\tt dat}, {\tt sv} & Define file names: equation |
| 5748 |
prefix (.f,.f90,.c), restart solution suffix (s.), \\ |
| 5749 |
& user data prefix (.dat), output suffix (b.,s.,d.)\\ |
| 5750 |
\hline |
| 5751 |
{\tt unames}, {\tt parnames} & Dictionary (mapping) of U(*) and PAR(*) |
| 5752 |
to user-defined names\\ |
| 5753 |
\hline |
| 5754 |
{\tt NDIM} & Problem dimension \\ |
| 5755 |
{\tt IPS} & Problem type; 0=AE, 1=FP(ODEs), -1=FP(maps), 2=PO, |
| 5756 |
-2=IVP,\\ |
| 5757 |
& 4=BVP, 7=BVP with Floquet multipliers, 5=algebraic |
| 5758 |
optimization \\ |
| 5759 |
& problem, 15=optimization of periodic solutions \\ |
| 5760 |
{\tt IRS}, {\tt TY} & Start solution label, start solution type\\ |
| 5761 |
{\tt ILP} & Fold detection; 1=on, 0=off \\ |
| 5762 |
\hline |
| 5763 |
{\tt ICP} & Continuation parameters \\ |
| 5764 |
\hline |
| 5765 |
{\tt NTST} & \# mesh intervals \\ |
| 5766 |
{\tt NCOL} & \# collocation points \\ |
| 5767 |
{\tt IAD} & Mesh adaption every IAD steps; 0=off \\ |
| 5768 |
{\tt ISP} & Bifurcation detection; 0=off, 1=BP(FP), 3=BP(PO,BVP), 2=all \\ |
| 5769 |
{\tt ISW} & Branch switching; 1=normal, -1=switch branch (BP, HB, PD),\\ |
| 5770 |
& 2=switch to two-parameter continuation (LP, BP, HB, TR) \\ |
| 5771 |
& 3=switch to three-parameter continuation (BP) \\ |
| 5772 |
{\tt IPLT} & Select principal solution measure \\ |
| 5773 |
{\tt NBC} & \# boundary conditions \\ |
| 5774 |
{\tt NINT} & \# integral conditions \\ |
| 5775 |
\hline |
| 5776 |
{\tt NMX} & Maximum number of steps \\ |
| 5777 |
{\tt RL0, RL1} & Parameter interval $ RL0 \leq \lambda \leq RL1$ \\ |
| 5778 |
{\tt A0, A1} & Interval of principal solution measure $ A0 \leq |
| 5779 |
\Vert\cdot\Vert \leq A1$ \\ |
| 5780 |
\hline |
| 5781 |
{\tt NPR} & Print and save restart data every NPR steps \\ |
| 5782 |
{\tt MXBF} & Automatic branch switching for the first MXBF bifurcation \\ |
| 5783 |
& points if IPS=0, 1 \\ |
| 5784 |
{\tt IBR}, {\tt LAB} & Set initial branch and label number; 0=automatic \\ |
| 5785 |
{\tt IIS} & Control solution output of branch direction vector; 0=never, 3=always \\ |
| 5786 |
{\tt IID} & Control diagnostic output; 0=none, 1=little, 2=normal, 4=extensive \\ |
| 5787 |
{\tt ITMX} & Maximum \# of iterations for locating special solutions/points \\ |
| 5788 |
{\tt ITNW} & Maximum \# of correction steps \\ |
| 5789 |
{\tt NWTN} & Corrector uses full newton for NWTN steps \\ |
| 5790 |
{\tt JAC} & User defines derivatives; 0=no, 1=yes \\ |
| 5791 |
\hline |
| 5792 |
{\tt EPSL}, {\tt EPSU}, {\tt EPSS} & Convergence criterion: |
| 5793 |
parameters, solution components, special points\\ |
| 5794 |
\hline |
| 5795 |
{\tt DS} & Start step size \\ |
| 5796 |
{\tt DSMIN, DSMAX} & Step size interval $\mathtt{DSMIN} \leq h \leq \mathtt{DSMAX}$ \\ |
| 5797 |
{\tt IADS} & Step size adaption every IADS steps; 0=off \\ |
| 5798 |
\hline |
| 5799 |
{\tt NPAR} & Maximum number of parameters \\ |
| 5800 |
{\tt THL, THU} & list of parameter and solution weights \\ |
| 5801 |
\hline |
| 5802 |
{\tt UZR}, {\tt UZSTOP} & list of values for user defined output\\ |
| 5803 |
{\tt SP}, {\tt STOP} & list of bifurcations to check and bifurcation stop |
| 5804 |
conditions\\ |
| 5805 |
\hline |
| 5806 |
{\tt NUNSTAB}, {\tt NSTAB} & HomCont: unstable and stable manifold dimensions\\ |
| 5807 |
{\tt IEQUIB}, {\tt ITWIST}, {\tt ISTART} & HomCont: control solution types |
| 5808 |
adjoint, starting\\ |
| 5809 |
{\tt IREV}, {\tt IFIXED}, {\tt IPSI} & HomCont: control reversibility, fixed |
| 5810 |
parameters, test functions\\ |
| 5811 |
\hline |
| 5812 |
\end{tabular} |
| 5813 |
|
| 5814 |
|
| 5815 |
|
| 5816 |
%============================================================================== |
| 5817 |
%============================================================================== |
| 5818 |
\chapter{ Notes on Using {\cal AUTO}.} \label{ch:Notes_on_Using_AUTO} |
| 5819 |
%============================================================================== |
| 5820 |
%============================================================================== |
| 5821 |
\section{ Restrictions on the Use of \texttt{PAR}.} \label{sec:Restrictions_on_PAR} |
| 5822 |
The array {\tt PAR} in the user-supplied routines is available |
| 5823 |
for equation parameters that the user wants to vary at some point |
| 5824 |
in the computations. |
| 5825 |
In any particular computation the free parameter(s) must be designated |
| 5826 |
in {\tt ICP}; see Section~\ref{sec:Free_parameters}. |
| 5827 |
The following restrictions apply~: |
| 5828 |
|
| 5829 |
\begin{itemize} |
| 5830 |
\item[-] |
| 5831 |
The default maximum number of parameters, \parf{NPAR} has a |
| 5832 |
pre-defined value in \filef{auto/07p/ include/auto.h}, |
| 5833 |
of \parf{NPARX}=36. |
| 5834 |
Any change \parf{NPARX} must be followed by recompilation of {\cal AUTO}. |
| 5835 |
\item[-] |
| 5836 |
Generally one should avoid certain parameters for equation parameters, |
| 5837 |
as {\cal AUTO} may need those internally, as follows: |
| 5838 |
\begin{description} |
| 5839 |
\item[\parf{IPS}=0,4:] |
| 5840 |
No additional parameters with indices less than or equal |
| 5841 |
to \parf{NPAR} are reserved. |
| 5842 |
\item[\parf{IPS}=$-$1,1,2,7:] |
| 5843 |
\AUTO reserves \parf{PAR(11)} to store the period for stationary |
| 5844 |
solutions at Hopf bifurcations only and continuously for periodic |
| 5845 |
orbits. For \parf{IPS}=2 and \parf{IPS}=7, \AUTO also |
| 5846 |
reserves \parf{PAR(12)} to store the angle of the torus |
| 5847 |
at torus bifurcations. |
| 5848 |
\item[\parf{IPS}=$-$2:] |
| 5849 |
The integration time is stored in \parf{PAR(14)}. |
| 5850 |
\item[\parf{IPS}=5:] |
| 5851 |
The value of the objective functional is stored in \parf{PAR(10)}. |
| 5852 |
\item[\parf{IPS}=9:] |
| 5853 |
The length in time of the truncated homoclinic or heteroclinic orbit |
| 5854 |
is stored in \parf{PAR(11)}. For the adjoint variational equations, |
| 5855 |
\parf{PAR(10)} is used. The equilibria are stored |
| 5856 |
in \parf{PAR(11)} to \parf{PAR(11+NDIM-1)}/\parf{PAR(11+2*NDIM-1)} |
| 5857 |
(homoclinic/heteroclinic). Test function values may be stored in |
| 5858 |
\parf{PAR(21)} to \parf{PAR(36)}. Homoclinic branch switching uses |
| 5859 |
\parf{PAR(20)} and higher to store time intervals and gap sizes. |
| 5860 |
\item[\parf{IPS}=11,12:] |
| 5861 |
The wave speed is in \parf{PAR(10)}, and the diffusion |
| 5862 |
constants in \parf{PAR(15,16,$\cdots$)}. The period (for periodic |
| 5863 |
solutions and at Hopf bifurcations) is stored in \parf{PAR(11)}. |
| 5864 |
\item[\parf{IPS}=14,16:] |
| 5865 |
\AUTO uses \parf{PAR(14)} for the time variable, and the diffusion |
| 5866 |
constants are in \parf{PAR(15,16,$\cdots$)}. The period is stored in |
| 5867 |
\parf{PAR(11)}. The previous time for each step is stored in \parf{PAR(12)}. |
| 5868 |
\item[\parf{IPS}=17:] |
| 5869 |
The diffusion constants are in \parf{PAR(15,16,$\cdots$)}. |
| 5870 |
The period is stored in \parf{PAR(11)}. |
| 5871 |
\item[\parf{IPS}=15:] |
| 5872 |
Only \parf{PAR(1-9)} should be used for problem parameters. |
| 5873 |
\parf{PAR(10)} is the value of the objective |
| 5874 |
functional, \parf{PAR(11)} the period, \parf{PAR(12)} the norm of the |
| 5875 |
adjoint variables, \parf{PAR(14)} and \parf{PAR(15)} are internal optimality |
| 5876 |
variables. \parf{PAR(21-29)} and \parf{PAR(31)} are used to monitor the |
| 5877 |
optimality functionals associated with the problem parameters and |
| 5878 |
the period. |
| 5879 |
\end{description} |
| 5880 |
\end{itemize} |
| 5881 |
|
| 5882 |
\section{ Efficiency.} \label{sec:Efficiency} |
| 5883 |
In {\cal AUTO}, efficiency has at times been sacrificed for generality of programming. |
| 5884 |
This applies in particular to computations in which {\cal AUTO} generates |
| 5885 |
an extended system, for example, computations with {\tt ISW}=2. |
| 5886 |
However, the user has significant control over computational efficiency, |
| 5887 |
in particular through judicious choice of the {\cal AUTO}-constants |
| 5888 |
{\tt DS}, {\tt DSMIN}, and {\tt DSMAX}, and, for ODEs, {\tt NTST} and {\tt NCOL}. |
| 5889 |
Initial experimentation normally suggests appropriate values. |
| 5890 |
|
| 5891 |
Slowly varying solutions to ODEs can often |
| 5892 |
be computed with remarkably small values of {\tt NTST} and {\tt NCOL}, |
| 5893 |
for example, {\tt NTST}=5, {\tt NCOL}=2. |
| 5894 |
Generally, however, it is recommended to set {\tt NCOL}=4, |
| 5895 |
and then to use the ``smallest'' value of {\tt NTST} that maintains convergence. |
| 5896 |
|
| 5897 |
The choice of the pseudo-arclength stepsize parameters |
| 5898 |
{\tt DS}, {\tt DSMIN}, and {\tt DSMAX} |
| 5899 |
is highly problem dependent. |
| 5900 |
Generally, {\tt DSMIN} should not be taken too small, |
| 5901 |
in order to prevent excessive step refinement in case of non-convergence. |
| 5902 |
It should also not be too large, in order to avoid instant non-convergence. |
| 5903 |
{\tt DSMAX} should be sufficiently large, in order to reduce computation time |
| 5904 |
and amount of output data. |
| 5905 |
On the other hand, it should be sufficiently small, in order to prevent |
| 5906 |
stepping over bifurcations without detecting them. |
| 5907 |
For a given equation, appropriate values of these constants |
| 5908 |
can normally be found after some initial experimentation. |
| 5909 |
|
| 5910 |
The constants {\tt ITNW}, {\tt NWTN}, {\tt THL}, {\tt EPSU}, {\tt EPSL}, {\tt EPSS} |
| 5911 |
also affect efficiency. |
| 5912 |
Understanding their significance is therefore useful; |
| 5913 |
see Section~\ref{sec:Tolerances} and Section~\ref{sec:step_size}. |
| 5914 |
Finally, it is recommended that initial computations be done with |
| 5915 |
{\tt ILP=0}; no fold detection; |
| 5916 |
and {\tt ISP}=1; no bifurcation detection for ODEs. |
| 5917 |
|
| 5918 |
\section{ Correctness of Results.} \label{sec:Correctness} |
| 5919 |
{\cal AUTO}-computed solutions to ODEs are almost always structurally correct, |
| 5920 |
because the mesh adaption strategy, if {\tt IAD}$>$0, safeguards to some extent |
| 5921 |
against spurious solutions. |
| 5922 |
If these do occur, possibly near infinite-period orbits, |
| 5923 |
the unusual appearance of the solution family typically serves as a warning. |
| 5924 |
Repeating the computation with increased {\tt NTST} is then recommended. |
| 5925 |
|
| 5926 |
\section{ Bifurcation Points and Folds.} \label{sec:Bifurcations} |
| 5927 |
It is recommended that the detection of folds |
| 5928 |
and bifurcation points be initially disabled. |
| 5929 |
For example, if an equation has a ``vertical'' solution family |
| 5930 |
then {\cal AUTO} may try to locate one fold after another. |
| 5931 |
|
| 5932 |
Generally, degenerate bifurcations cannot be detected. |
| 5933 |
Furthermore, bifurcations that are close to each other may not |
| 5934 |
be noticed when the pseudo-arclength step size is not sufficiently small. |
| 5935 |
Hopf bifurcation points may go unnoticed if no clear crossing of |
| 5936 |
the imaginary axis takes place. This may happen when there are other |
| 5937 |
real or complex eigenvalues near the imaginary axis and when |
| 5938 |
the pseudo-arclength step is large compared to the rate |
| 5939 |
of change of the critical eigenvalue pair. |
| 5940 |
A typical case is a Hopf bifurcation close to a fold. |
| 5941 |
Similarly, Hopf bifurcations may go undetected if switching from |
| 5942 |
real to complex conjugate, followed by crossing of the imaginary |
| 5943 |
axis, occurs rapidly with respect to the pseudo-arclength step size. |
| 5944 |
Secondary periodic bifurcations may not be detected for similar reasons. |
| 5945 |
In case of doubt, carefully inspect the contents of the diagnostics file |
| 5946 |
{\tt fort.9}. |
| 5947 |
|
| 5948 |
\section{ Floquet Multipliers.} \label{sec:Floquet_multipliers} |
| 5949 |
|
| 5950 |
{\cal AUTO} extracts an approximation to the linearized Poincar\'e map from |
| 5951 |
the Jacobian of the linearized collocation system that arises in Newton's method. |
| 5952 |
This procedure is very efficient; the map is computed at negligible extra cost. |
| 5953 |
The linear equations solver of {\cal AUTO} is described in |
| 5954 |
\citename{DoKeKe:91b} \citeyear{DoKeKe:91b}. |
| 5955 |
The actual Floquet multiplier solver was written by |
| 5956 |
\citename{Fa:94} \citeyear{Fa:94}. |
| 5957 |
For a detailed description of the algorithm see |
| 5958 |
\citename{FaJe:91} \citeyear{FaJe:91}. |
| 5959 |
|
| 5960 |
For periodic solutions, the exact linearized Poincar\'e map always has |
| 5961 |
a multiplier $z=1$. |
| 5962 |
A good accuracy check is to inspect this |
| 5963 |
multiplier in the diagnostics output-file {\tt fort.9}. |
| 5964 |
If this multiplier becomes inaccurate then the automatic detection |
| 5965 |
of potential secondary periodic bifurcations (if {\tt ISP}=2) is discontinued |
| 5966 |
and a warning is printed in {\tt fort.9}. |
| 5967 |
It is strongly recommended that the contents of this file be |
| 5968 |
habitually inspected, |
| 5969 |
in particular to verify whether solutions labeled as BP or TR |
| 5970 |
(cf.~Table~\ref{tbl:Solution_Types}) have indeed been correctly classified. |
| 5971 |
|
| 5972 |
\section{ Memory Requirements.} \label{sec:Memory_requirements} |
| 5973 |
The run-time memory requirements depend on the values the user set in |
| 5974 |
the constants file and are roughly proportional to the value |
| 5975 |
${\tt NTST}\times({\tt NDIM}\times({\tt NCOL}+1)+{\tt NBC})\times |
| 5976 |
({\tt NDIM}\times{\tt NCOL}+{\tt NINT}+1)$. |
| 5977 |
|
| 5978 |
%============================================================================== |
| 5979 |
%============================================================================== |
| 5980 |
\chapter{ \AUTO Demos : Tutorial.} \label{ch:Demos:_Tutorial} |
| 5981 |
%============================================================================== |
| 5982 |
%============================================================================== |
| 5983 |
\newpage |
| 5984 |
\section{ Introduction.} \label{sec:Tutorial_Introduction} |
| 5985 |
The directory {\tt auto/07p/demos} has a large number of subdirectories, |
| 5986 |
for example {\tt ab}, {\tt pp2}, {\tt exp}, etc., |
| 5987 |
each containing all necessary files for certain illustrative calculations. |
| 5988 |
Each subdirectory, say {\tt xxx}, corresponds to a particular equation |
| 5989 |
and contains one equations-file \filef{xxx.\{f90,f,c\}} |
| 5990 |
and one or more constants-files \filef{c.xxx.i}, |
| 5991 |
one for each successive run of the demo. |
| 5992 |
You also find \python script files \filef{xxx.auto} and |
| 5993 |
\filef{clean.auto}: the command \filef{auto xxx.auto} runs the demo, |
| 5994 |
and the command \filef{auto clean.auto} deletes all generated files. |
| 5995 |
To see how the equations have been programmed, inspect the equations-file. |
| 5996 |
To understand in detail how {\cal AUTO} is instructed to carry out a |
| 5997 |
particular task, inspect the appropriate constants-file and \python |
| 5998 |
script. |
| 5999 |
In this chapter we describe the tutorial demo {\tt cusp} in detail. |
| 6000 |
A brief description of other demos is given in later chapters. |
| 6001 |
|
| 6002 |
|
| 6003 |
\section{ cusp : A Tutorial Demo.} \label{sec:Demos_cusp} |
| 6004 |
This demo illustrates the computation of |
| 6005 |
stationary solutions, locating saddle-node bifurcations of these |
| 6006 |
solutions, and the continuation of a saddle-node bifurcation in two |
| 6007 |
parameters.\\ |
| 6008 |
The cusp normal form equation is given by |
| 6009 |
\begin{equation} |
| 6010 |
\dot x = \mu + \lambda x - x^3. |
| 6011 |
\end{equation} |
| 6012 |
|
| 6013 |
\section{ Copying the Demo Files.} \label{sec:Tutorial_copying} |
| 6014 |
The commands listed in Table~\ref{tbl:demo_cusp_1} |
| 6015 |
will copy the demo files to your work directory. |
| 6016 |
|
| 6017 |
\begin{table}[htbp] |
| 6018 |
\begin{center} |
| 6019 |
\begin{tabular}{| l | l |} |
| 6020 |
\hline |
| 6021 |
{\cal Unix}-COMMAND & ACTION \\ |
| 6022 |
\hline |
| 6023 |
%============================================================================== |
| 6024 |
\commandf{auto} & start the AUTO-07p Command Line User Interface\\ |
| 6025 |
\hline |
| 6026 |
\AUTO-COMMAND & ACTION \\ |
| 6027 |
\hline |
| 6028 |
\commandf{cd } & go to main directory (or other directory).\\ |
| 6029 |
\commandf{mkdir cusp} & \parbox[t]{3in}{create an empty work directory. |
| 6030 |
Note: the '!' is used to signify a command |
| 6031 |
which is sent to the shell.\vspace{0.2cm}}\\ |
| 6032 |
\commandf{cd cusp} & change to the work directory.\\ |
| 6033 |
|
| 6034 |
\commandf{demo('cusp')} & copy the demo files to the work directory.\\ |
| 6035 |
\hline |
| 6036 |
%============================================================================== |
| 6037 |
\end{tabular} |
| 6038 |
\caption{Copying the demo \filef{cusp} files.} |
| 6039 |
\label{tbl:demo_cusp_1} |
| 6040 |
\end{center} |
| 6041 |
\end{table} |
| 6042 |
|
| 6043 |
Typing \commandf{ls} reveals the existence of 5 files: |
| 6044 |
\begin{enumerate} |
| 6045 |
\item |
| 6046 |
\commandf{cusp.f90}: This file contains the differential equations |
| 6047 |
and the initial values. If you inspect it, you will see that only two |
| 6048 |
routines are used. The subroutine {\tt FUNC} specifies the actual |
| 6049 |
differential equation. The routine {\tt STPNT} gives {\cal AUTO} |
| 6050 |
the initial values of {\tt PAR(1)}$=\lambda$ and |
| 6051 |
{\tt PAR(2)}$=\mu$, which |
| 6052 |
are $1.0$ and $0.0$, and the initial value of $x$, which is $0$. |
| 6053 |
For your own models you would generally copy another equation file |
| 6054 |
and then only change the pieces that actually define the equation. |
| 6055 |
|
| 6056 |
\item |
| 6057 |
\commandf{c.cusp}: The initial computational constants are stored |
| 6058 |
in this file. Most importantly, you see that the dimension of the |
| 6059 |
problem (\parf{NDIM}) is set to 1, and the problem type \parf{IPS} |
| 6060 |
is set to 1 to specify continuation of a stationary solution. |
| 6061 |
The constants given by \parf{ICP} specify the parameters that are |
| 6062 |
used for the continuation. In this case these are 'mu' for $\mu$ and |
| 6063 |
'lambda' for $\lambda$, which correspond to the indices 2 and 1, |
| 6064 |
respectively, using the constant \parf{parnames}. |
| 6065 |
Since initially we only really continue in one parameter ($\mu$), |
| 6066 |
the second parameter $\lambda$ is \emph{overspecified}. |
| 6067 |
Another important constant is the initial step size {\tt DS}: as it is |
| 6068 |
positive, we initally continue in the positive $\mu$ direction. |
| 6069 |
|
| 6070 |
\item |
| 6071 |
\commandf{cusp.auto}: A script with Python CLUI commands that steer |
| 6072 |
the calculation. |
| 6073 |
|
| 6074 |
\item |
| 6075 |
\commandf{clean.auto}: A script that cleans the directory of all |
| 6076 |
generated files. |
| 6077 |
|
| 6078 |
\item |
| 6079 |
\commandf{autorc}: A file that contains default settings for |
| 6080 |
the 2-dimensional plotting tool {\cal PyPLAUT}. |
| 6081 |
|
| 6082 |
\item |
| 6083 |
\commandf{plaut04.rc}: A file that contains default settings for |
| 6084 |
the 3-dimensional plotting tool {\cal PLAUT04}. |
| 6085 |
|
| 6086 |
\end{enumerate} |
| 6087 |
|
| 6088 |
\section{ Executing all Runs Automatically.} \label{sec:Tutorial_all_runs} |
| 6089 |
To execute all prepared runs of demo \filef{cusp}, |
| 6090 |
simply type the command given in Table~\ref{tbl:demo_cusp_2}. |
| 6091 |
|
| 6092 |
\begin{table}[htbp] |
| 6093 |
\begin{center} |
| 6094 |
\begin{tabular}{| l | l |} |
| 6095 |
\hline |
| 6096 |
\AUTO-COMMAND & ACTION \\ |
| 6097 |
\hline |
| 6098 |
%============================================================================== |
| 6099 |
\commandf{demofile('cusp.auto')} & \parbox[t]{3in}{execute all runs of demo \filef{cusp} interactively\vspace{0.2cm}}\\ |
| 6100 |
\hline |
| 6101 |
%============================================================================== |
| 6102 |
\end{tabular} |
| 6103 |
\caption{Executing all runs of demo \filef{cusp}.} |
| 6104 |
\label{tbl:demo_cusp_2} |
| 6105 |
\end{center} |
| 6106 |
\end{table} |
| 6107 |
|
| 6108 |
The command in Table~\ref{tbl:demo_cusp_2} begins |
| 6109 |
a tutorial which will proceed one step each time |
| 6110 |
the user presses a key. Each step consists of a |
| 6111 |
single \AUTO command preceded by instructions as |
| 6112 |
to what action the command performs. |
| 6113 |
The tutorial script \filef{cusp.auto} performs the |
| 6114 |
demo by reading in a single \AUTO constants file |
| 6115 |
and then interactively modifying it to perform |
| 6116 |
each of the demo. The essential commands in \filef{cusp.auto} |
| 6117 |
are given in Table~\ref{tbl:demo_cusp_4a}. |
| 6118 |
|
| 6119 |
Note that there are four separate runs, where each \commandf{run} |
| 6120 |
command performs a run. |
| 6121 |
In the first run, a branch of stationary solutions is traced out. |
| 6122 |
Along it, one fold (LP) (limit point, or in this case, a saddle-node |
| 6123 |
bifurcation) is located. The free parameter is $\mu$. |
| 6124 |
The other parameter $\lambda$ remains fixed in this run. |
| 6125 |
Note also that only special, labeled solution points are printed on the screen. |
| 6126 |
Detailed results are saved in the \python variable \parf{mu}. |
| 6127 |
|
| 6128 |
The second run does the same thing but now in the negative direction |
| 6129 |
of $\mu$, i.e., backwards instead of forwards. The backwards |
| 6130 |
continuation is appended to the forwards continuation in the |
| 6131 |
data-files. Afterwards we perform a relabelling to make sure that we have |
| 6132 |
unique labels for each special solution. Next the relabelled result is saved |
| 6133 |
to the data-files \filef{b.mu}, \filef{s.mu}, and \filef{d.mu}. |
| 6134 |
|
| 6135 |
The results are then plotted on the screen. Pressing the enter key |
| 6136 |
at the command line causes an automatic $\mu$ vs. $x$ display that |
| 6137 |
shows the two fold points at labels 2 and 7. |
| 6138 |
|
| 6139 |
In the third run, the fold detected in the first run is followed in |
| 6140 |
the two parameters $\mu$ and $\lambda$. |
| 6141 |
We know that label 2, with solution \parf{mu(2)} is the right |
| 6142 |
solution to start from. However, we did not know this number in |
| 6143 |
advance, and moreover, in sensitive cases, it can be different on |
| 6144 |
different computer types. Another way to specify the starting label |
| 6145 |
is to use the notation \parf{mu('LP1')}: this specifies the first |
| 6146 |
LP-labelled solution of all solutions in \parf{mu}. |
| 6147 |
|
| 6148 |
Furthermore the command that accomplishes |
| 6149 |
this must change the constant {\tt ISW} of the constants file: |
| 6150 |
it must be set to 2 to cause a two-parameter continuation. |
| 6151 |
|
| 6152 |
The fourth run continues this branch in opposite direction. |
| 6153 |
The detailed results of these continuations are saved |
| 6154 |
in the data-files \filef{b.cusp}, \filef{s.cusp}, and \filef{ |
| 6155 |
d.cusp}. Finally, a plot of the cusp is produced. |
| 6156 |
|
| 6157 |
The numerical results are given below |
| 6158 |
in somewhat abbreviated form. |
| 6159 |
Some differences in output are to be expected on different machines. |
| 6160 |
This does not mean that the results have different accuracy, but simply |
| 6161 |
that arithmetic differences have accumulated from step to step, possibly |
| 6162 |
leading to different step size decisions. |
| 6163 |
|
| 6164 |
Next, reset the work directory, by typing the command given |
| 6165 |
in Table~\ref{tbl:demo_cusp_3}. |
| 6166 |
|
| 6167 |
\begin{table}[htbp] |
| 6168 |
\begin{center} |
| 6169 |
\begin{tabular}{| l | l |} |
| 6170 |
\hline |
| 6171 |
\AUTO-COMMAND & ACTION \\ |
| 6172 |
\hline |
| 6173 |
%============================================================================== |
| 6174 |
\commandf{clean()} & remove temporary files of demo \filef{cusp} \\ |
| 6175 |
\commandf{delete('mu')} & remove 'mu' data-files of demo \filef{cusp} \\ |
| 6176 |
\commandf{delete('cusp')} & remove 'cusp' data-files of demo \filef{cusp} \\ |
| 6177 |
\hline |
| 6178 |
%============================================================================== |
| 6179 |
\end{tabular} |
| 6180 |
\caption{Cleaning the demo \filef{cusp} work directory.} |
| 6181 |
\label{tbl:demo_cusp_3} |
| 6182 |
\end{center} |
| 6183 |
\end{table} |
| 6184 |
|
| 6185 |
\begin{center} |
| 6186 |
\vspace{-0.2in} |
| 6187 |
\begin{verbatim} |
| 6188 |
# Run forwards |
| 6189 |
|
| 6190 |
BR PT TY LAB mu L2-NORM x lambda |
| 6191 |
1 1 EP 1 0.00000E+00 0.00000E+00 0.00000E+00 1.00000E+00 |
| 6192 |
1 14 LP 2 3.84900E-01 5.77360E-01 -5.77360E-01 1.00000E+00 |
| 6193 |
1 20 3 1.26582E-01 9.29410E-01 -9.29410E-01 1.00000E+00 |
| 6194 |
1 40 4 -1.38347E+00 1.40803E+00 -1.40803E+00 1.00000E+00 |
| 6195 |
1 47 UZ 5 -1.99999E+00 1.52138E+00 -1.52138E+00 1.00000E+00 |
| 6196 |
|
| 6197 |
# Run backwards |
| 6198 |
|
| 6199 |
BR PT TY LAB mu L2-NORM x lambda |
| 6200 |
1 1 EP 1 0.00000E+00 0.00000E+00 0.00000E+00 1.00000E+00 |
| 6201 |
1 14 LP 2 -3.84900E-01 5.77360E-01 5.77360E-01 1.00000E+00 |
| 6202 |
1 20 3 -1.26582E-01 9.29410E-01 9.29410E-01 1.00000E+00 |
| 6203 |
1 40 4 1.38347E+00 1.40803E+00 1.40803E+00 1.00000E+00 |
| 6204 |
1 47 UZ 5 1.99999E+00 1.52138E+00 1.52138E+00 1.00000E+00 |
| 6205 |
|
| 6206 |
# Forward continuation of the first fold in two parameters |
| 6207 |
|
| 6208 |
BR PT TY LAB mu L2-NORM x lambda |
| 6209 |
2 20 11 1.09209E+00 8.17354E-01 -8.17354E-01 2.00420E+00 |
| 6210 |
2 34 UZ 12 1.99995E+00 9.99991E-01 -9.99991E-01 2.99995E+00 |
| 6211 |
|
| 6212 |
# Backward continuation of the fold in two parameters |
| 6213 |
|
| 6214 |
BR PT TY LAB mu L2-NORM x lambda |
| 6215 |
2 20 11 5.42543E-02 3.00470E-01 -3.00470E-01 2.70847E-01 |
| 6216 |
2 29 CP 12 -2.02768E-12 1.00472E-04 1.00472E-04 3.02837E-08 |
| 6217 |
2 40 13 -9.09414E-02 3.56925E-01 3.56925E-01 3.82187E-01 |
| 6218 |
2 60 14 -5.73716E-01 6.59512E-01 6.59512E-01 1.30487E+00 |
| 6219 |
2 80 15 -1.68023E+00 9.43582E-01 9.43582E-01 2.67104E+00 |
| 6220 |
2 85 UZ 16 -1.99995E+00 9.99992E-01 9.99992E-01 2.99995E+00 |
| 6221 |
|
| 6222 |
\end{verbatim} |
| 6223 |
\end{center} |
| 6224 |
|
| 6225 |
The CLUI was used to generate the constants |
| 6226 |
file at runtime. In the example below, the constant file \filef{c.cusp} |
| 6227 |
will be read in, and the CLUI will be used to make the appropriate |
| 6228 |
changes to perform the calculation. |
| 6229 |
|
| 6230 |
\begin{table}[htbp] |
| 6231 |
\begin{center} |
| 6232 |
\begin{tabular}{| l | l |} |
| 6233 |
\hline |
| 6234 |
\AUTO-COMMAND & ACTION \\ |
| 6235 |
\hline |
| 6236 |
%============================================================================== |
| 6237 |
\commandf{cusp = load('cusp')} & load the problem definition \filef{cusp} \\ |
| 6238 |
\commandf{mu = run(cusp)} & execute the run \\ |
| 6239 |
\commandf{mu = mu + run(cusp,DS='-')} & execute the run backwards and \\ |
| 6240 |
& append the results to \parf{mu}\\ |
| 6241 |
\commandf{mu = rl(mu) } & relabel solutions in mu \\ |
| 6242 |
\commandf{save(mu, 'mu')} & save the results |
| 6243 |
in the files \filef{b.mu}, \filef{s.mu}, and \filef{d.mu}\\ |
| 6244 |
\commandf{lp1 = load(mu('LP1'), ISW=2)} & use the first fold (LP) in |
| 6245 |
\parf{mu} as the restart solution,\\ |
| 6246 |
& and change ISW to 2.\\ |
| 6247 |
\commandf{cusp = run(lp1) } & execute the third run of demo \filef{cusp} \\ |
| 6248 |
\commandf{cusp = cusp + run(lp1,DS='-') } & execute the fourth run |
| 6249 |
of demo \filef{cusp} \\ |
| 6250 |
\commandf{save(cusp,'cusp')} & save the results |
| 6251 |
in the files \filef{b.cusp}, \filef{s.cusp}, and \filef{d.cusp}\\ |
| 6252 |
\hline |
| 6253 |
%============================================================================== |
| 6254 |
\end{tabular} |
| 6255 |
\caption{Selected runs of demo \filef{cusp}.} |
| 6256 |
\label{tbl:demo_cusp_4a} |
| 6257 |
\end{center} |
| 6258 |
\end{table} |
| 6259 |
|
| 6260 |
\section{ Plotting the Results with \AUTO.} \label{sec:Tutorial_plotting} |
| 6261 |
The bifurcation diagram computed in the runs above |
| 6262 |
was stored in the files \filef{b.mu} and \filef{b.cusp}, |
| 6263 |
while each labeled solution is fully stored in \filef{s.mu} and |
| 6264 |
\filef{s.cusp}. |
| 6265 |
To use \AUTO to graphically inspect these data-files. |
| 6266 |
type the \AUTO-command given in Table~\ref{tbl:demo_cusp_7}. |
| 6267 |
The saved plots are shown in Figure~\ref{fig:cusp_1} |
| 6268 |
and in Figure~\ref{fig:cusp_2}. |
| 6269 |
|
| 6270 |
Figure~\ref{fig:cusp_1} shows the bifurcation diagrams for the first |
| 6271 |
run, and Figure~\ref{fig:cusp_2} for the second run. |
| 6272 |
|
| 6273 |
The plotting window consists of a menubar at the top, a plotting area, |
| 6274 |
and a control panel with four control widgets at the bottom. By |
| 6275 |
default the first two columns in the bifurcation diagram output |
| 6276 |
are plotted against each other. To obtain a $\mu$ versus $x$ |
| 6277 |
bifurcation diagram you need to plot column 'mu' versus column 'x'. |
| 6278 |
You can do that by changing the ``Y'' box to say ``[x]'', either by |
| 6279 |
typing it there, by using the menu obtained by clicking the |
| 6280 |
downwards facing triangle or by using a scripted command as used |
| 6281 |
in \filef{cusp.auto}. |
| 6282 |
You can also change the mode of |
| 6283 |
the plotting tool from ``bifurcation'' to ``solution''. This is |
| 6284 |
accomplished by clicking on the widget marked ``Type'' on the bottom |
| 6285 |
control panel and setting it from ``bifurcation'' to ``solution''. In |
| 6286 |
the plotting window will appear a plot of the first labeled solution, |
| 6287 |
in this case just a point. You can plot all points by changing |
| 6288 |
the ``Label'' to ``[1,2,3,4,5,6,7,8,9,10]''. |
| 6289 |
|
| 6290 |
The plotting tool can also be used to create Postscript files from |
| 6291 |
plots by selecting the ``File'' on the menubar and then selecting the |
| 6292 |
``Save Postscript...'' from the drop down menu. |
| 6293 |
This will bring up |
| 6294 |
a dialog into which the user can enter the filename of the postscript |
| 6295 |
file to save the plot in. |
| 6296 |
When using matplotlib |
| 6297 |
you can also click on the floppy disk icon to save using a variety of |
| 6298 |
file formats. |
| 6299 |
Further information on the plotting tool can be found in |
| 6300 |
Section~\ref{clui:plotting}. |
| 6301 |
|
| 6302 |
\begin{table}[htbp] |
| 6303 |
\begin{center} |
| 6304 |
\begin{tabular}{| l | l |} |
| 6305 |
\hline |
| 6306 |
\AUTO-COMMAND & ACTION \\ |
| 6307 |
\hline |
| 6308 |
%============================================================================== |
| 6309 |
\commandf{plot(mu)} & run \AUTO to graph the contents of \parf{mu}\\ |
| 6310 |
\commandf{plot("mu")} & run \AUTO to graph the contents of |
| 6311 |
\filef{b.mu} and \filef{s.mu}; \\ |
| 6312 |
& (this is the same as \commandf{plot(loadbd("mu"))})\\ |
| 6313 |
%============================================================================== |
| 6314 |
\hline |
| 6315 |
\end{tabular} |
| 6316 |
\caption{Commands for plotting |
| 6317 |
or the bifurcation diagram and solutions of the \python variable \parf{mu}, |
| 6318 |
and the files \filef{b.mu} and \filef{s.mu}} |
| 6319 |
\label{tbl:demo_cusp_7} |
| 6320 |
\end{center} |
| 6321 |
\end{table} |
| 6322 |
|
| 6323 |
\begin{figure}[p] |
| 6324 |
\epsfysize 9.0cm |
| 6325 |
\centerline{\epsffile{include/cusp1}} |
| 6326 |
\caption{The first bifurcation diagram of demo \filef{cusp}.} |
| 6327 |
\label{fig:cusp_1} |
| 6328 |
\end{figure} |
| 6329 |
\begin{figure}[p] |
| 6330 |
\epsfysize 9.0cm |
| 6331 |
\centerline{\epsffile{include/cusp2}} |
| 6332 |
\caption{The second bifurcation diagram of demo \filef{cusp}.} |
| 6333 |
\label{fig:cusp_2} |
| 6334 |
\end{figure} |
| 6335 |
|
| 6336 |
\section{ Plotting the Results with \AUTO in 3D.} |
| 6337 |
Whilst not very useful for this simple example, you can also plot |
| 6338 |
your results in 3D, using the \commandf{plot3} command ({\cal PLAUT04}), for example |
| 6339 |
\commandf{plot3('mu')}. Unlike the PyPLAUT tool by default, this shows |
| 6340 |
the stable and unstable parts: blue is stable, and red is unstable. You can also |
| 6341 |
spin the bifurcation diagram around and zoom in using the mouse. |
| 6342 |
|
| 6343 |
\section{ Exporting the Results for different plotters.} |
| 6344 |
It is often useful to use other plotting programs or general-purpose |
| 6345 |
tools to work with AUTO's data. The ``writeRawFilename'' method (see |
| 6346 |
also Section~\ref{sec:clui_exporting}) can be used for this. |
| 6347 |
In this tutorial we can for |
| 6348 |
instance export the bifurcation diagram using\\ |
| 6349 |
\commandf{cusp.writeRawFilename('cusp.dat') }, and then use |
| 6350 |
the command \commandf{plot 'cusp.dat' using 1:4 wi li } to plot |
| 6351 |
the bifurcation diagram in GNUPlot. |
| 6352 |
|
| 6353 |
\newpage |
| 6354 |
\section{ ab : A Programmed Demo.} \label{sec:Demos_ab} |
| 6355 |
%============================================================================== |
| 6356 |
%DEMO=ab======================================================================= |
| 6357 |
%============================================================================== |
| 6358 |
This demo illustrates the computation of |
| 6359 |
stationary solutions, |
| 6360 |
Hopf bifurcations and |
| 6361 |
periodic solutions. |
| 6362 |
The equations, that model an A $\to$ B reaction, are those from |
| 6363 |
\citename{URP:74} \citeyear{URP:74}, namely |
| 6364 |
\begin{equation} \begin{array}{cl} |
| 6365 |
u_1 ' &= -u_1 + p_1 (1-u_1) e^{u_2}, \\ |
| 6366 |
u_2 ' &= -u_2 + p_1 p_2 ( 1-u_1) e^{u_2} - p_3 u_2.\\ |
| 6367 |
\end{array} \end{equation} |
| 6368 |
This demo is fully scripted, see Table~\ref{tbl:demo_ab}. |
| 6369 |
|
| 6370 |
\begin{table}[htbp] |
| 6371 |
\begin{center} |
| 6372 |
\begin{tabular}{| l | l |} |
| 6373 |
\hline |
| 6374 |
\AUTO-COMMAND & ACTION \\ |
| 6375 |
\hline |
| 6376 |
%============================================================================== |
| 6377 |
\commandf{mkdir ab} & create an empty work directory \\ |
| 6378 |
\commandf{cd ab} & change directory \\ |
| 6379 |
\commandf{demo('ab')} & copy the demo files to the work directory \\ |
| 6380 |
\hline |
| 6381 |
%============================================================================== |
| 6382 |
\commandf{auto('ab.auto')} & run the demo \\ |
| 6383 |
\hline |
| 6384 |
\end{tabular} |
| 6385 |
\caption{Commands for running demo \filef{ab}.} |
| 6386 |
\label{tbl:demo_ab} |
| 6387 |
\end{center} |
| 6388 |
\end{table} |
| 6389 |
|
| 6390 |
If you look at the file \filef{ab.auto } you see that the script |
| 6391 |
computes a stationary solution family for certain values of $p_2$, |
| 6392 |
and that a periodic orbit family is computed for each Hopf bifurcation |
| 6393 |
that was found in the stationary solution families. |
| 6394 |
|
| 6395 |
%============================================================================== |
| 6396 |
%============================================================================== |
| 6397 |
\chapter{ \AUTO Demos : Fixed points.} \label{ch:Demos_Fixed_points} |
| 6398 |
%============================================================================== |
| 6399 |
%============================================================================== |
| 6400 |
|
| 6401 |
%============================================================================== |
| 6402 |
%DEMO=enz====================================================================== |
| 6403 |
%============================================================================== |
| 6404 |
\section{ enz : Stationary Solutions of an Enzyme Model.} \label{sec:Demos_enz} |
| 6405 |
The equations, that model a two-compartment enzyme system |
| 6406 |
(\citename{JPK:80} \citeyear{JPK:80}), |
| 6407 |
are given by |
| 6408 |
\begin{equation} \label{2'} \begin{array}{cl} |
| 6409 |
s_1 '&= |
| 6410 |
(s_0 - s_1) + (s_2 - s_1) - \rho R (s_1), \\ |
| 6411 |
s_2 '&= |
| 6412 |
(s_0 +\mu - s_2) + (s_1 - s_2) - \rho R (s_2), \\\end{array} \end{equation} |
| 6413 |
where |
| 6414 |
$$ R (s)=\frac{s}{1+s+ \kappa s^{2} }.$$ |
| 6415 |
The free parameter is $s_0$. Other parameters are fixed. |
| 6416 |
This equation is also considered in |
| 6417 |
\citename{DoKeKe:91a} \citeyear{DoKeKe:91a}. |
| 6418 |
|
| 6419 |
\begin{table}[htbp] |
| 6420 |
\begin{center} |
| 6421 |
\begin{tabular}{| l | l |} |
| 6422 |
\hline |
| 6423 |
\AUTO-COMMAND & ACTION \\ |
| 6424 |
\hline |
| 6425 |
%============================================================================== |
| 6426 |
\commandf{mkdir enz} & create an empty work directory \\ |
| 6427 |
\commandf{cd enz} & change directory \\ |
| 6428 |
\commandf{demo('enz')} & copy the demo files to the work directory \\ |
| 6429 |
\hline |
| 6430 |
%============================================================================== |
| 6431 |
\commandf{run('enz')} & compute stationary solution families \\ |
| 6432 |
\commandf{save('enz')} & save output-files as \filef{b.enz, s.enz, d.enz} \\ |
| 6433 |
\hline |
| 6434 |
\end{tabular} |
| 6435 |
\caption{Python commands for running demo \filef{enz}.} |
| 6436 |
\label{tbl:demo_enz} |
| 6437 |
\end{center} |
| 6438 |
\end{table} |
| 6439 |
|
| 6440 |
\begin{table}[htbp] |
| 6441 |
\begin{center} |
| 6442 |
\begin{tabular}{| l | l |} |
| 6443 |
\hline |
| 6444 |
\AUTO-COMMAND & ACTION \\ |
| 6445 |
\hline |
| 6446 |
%============================================================================== |
| 6447 |
\commandf{mkdir enz} & create an empty work directory \\ |
| 6448 |
\commandf{cd enz} & change directory \\ |
| 6449 |
\commandf{@dm enz} & copy the demo files to the work directory \\ |
| 6450 |
\hline |
| 6451 |
%============================================================================== |
| 6452 |
\commandf{@r enz} & compute stationary solution families \\ |
| 6453 |
\commandf{@sv enz} & save output-files as \filef{b.enz, s.enz, d.enz} \\ |
| 6454 |
\hline |
| 6455 |
\end{tabular} |
| 6456 |
\caption{Shell commands for running demo \filef{enz}.} |
| 6457 |
\label{tbl:demo_enz2} |
| 6458 |
\end{center} |
| 6459 |
\end{table} |
| 6460 |
|
| 6461 |
\newpage |
| 6462 |
%============================================================================== |
| 6463 |
%DEMO=dd2====================================================================== |
| 6464 |
%============================================================================== |
| 6465 |
\section{ dd2 : Fixed Points of a Discrete Dynamical System.} \label{sec:Demos_dd2} |
| 6466 |
This demo illustrates the computation of a solution family and |
| 6467 |
its bifurcating families for a discrete dynamical system. |
| 6468 |
Also illustrated are the continuation of |
| 6469 |
period-doubling bifurcations, and branch switching at such |
| 6470 |
points. |
| 6471 |
The equations, a discrete predator-prey system, are |
| 6472 |
\begin{equation} \begin{array}{cl} |
| 6473 |
u_1^{k+1} &=p_1 |
| 6474 |
u_1^{k}(1-u_1^{k})-p_2u_1^{k} u_2^{k},\\ |
| 6475 |
u_2^{k+1}&=(1-p_3)u_2^{k}+p_2u_1^{k}u_2^{k}.\\ |
| 6476 |
\end{array} \end{equation} |
| 6477 |
In the first, third, and fourth run $p_1$ is free. |
| 6478 |
In the second run, both $p_1$ and $p_2$ are free. |
| 6479 |
The remaining equation parameter, $p_3$, is fixed in both runs. |
| 6480 |
|
| 6481 |
\begin{table}[htbp] |
| 6482 |
\begin{center} |
| 6483 |
\begin{tabular}{| l | l |} |
| 6484 |
\hline |
| 6485 |
\AUTO-COMMAND & ACTION \\ |
| 6486 |
\hline |
| 6487 |
%============================================================================== |
| 6488 |
\commandf{mkdir dd2 } & create an empty work directory \\ |
| 6489 |
\commandf{cd dd2 } & change directory \\ |
| 6490 |
\commandf{demo('dd2') } & copy the demo files to the work directory \\ |
| 6491 |
\hline |
| 6492 |
%============================================================================== |
| 6493 |
|
| 6494 |
\commandf{r1=run(e='dd2',c='dd2')} & 1st run; fixed point solution branches \\ |
| 6495 |
\commandf{save('dd2')} & save output-files as \filef{b.dd2, s.dd2, d.dd2} \\ |
| 6496 |
\hline |
| 6497 |
%============================================================================== |
| 6498 |
\commandf{run(r1("PD1"),ICP=["p1","p2"],ISW=2)} & \parbox[t]{3in}{2nd run; a locus of period-doubling bifurcations. \vspace{0.2cm}}\\ |
| 6499 |
\commandf{save('pd')} & save output-files as \filef{b.pd, s.pd, d.pd} \\ |
| 6500 |
\hline |
| 6501 |
%============================================================================== |
| 6502 |
\commandf{r3=run(r1("PD1"),ISW=-1)} & \parbox[t]{3in}{3rd run; |
| 6503 |
the bifurcating period-2 orbit. \vspace{0.2cm}}\\ |
| 6504 |
\commandf{append('dd2')} & append output-files to \filef{b.dd2, s.dd2, d.dd2} \\ |
| 6505 |
\hline |
| 6506 |
%============================================================================== |
| 6507 |
\commandf{run(r3("PD1"))} & \parbox[t]{3in}{4th run; the |
| 6508 |
bifurcation period-4 orbit. \vspace{0.2cm}}\\ |
| 6509 |
\commandf{append('dd2')} & append output-files to \filef{b.dd2, s.dd2, d.dd2} \\ |
| 6510 |
\hline |
| 6511 |
\end{tabular} |
| 6512 |
\caption{Commands for running demo \filef{dd2}.} |
| 6513 |
\label{tbl:demo_dd2} |
| 6514 |
\end{center} |
| 6515 |
\end{table} |
| 6516 |
|
| 6517 |
\newpage |
| 6518 |
%============================================================================== |
| 6519 |
%DEMO=log====================================================================== |
| 6520 |
%============================================================================== |
| 6521 |
\section{ log : The Logistic Map.} \label{sec:Demos_log} |
| 6522 |
This demo shows 5 subsequent periodic doublings in the logistic map |
| 6523 |
\begin{equation} \begin{array}{cl} |
| 6524 |
x^{k+1} &= \mu x (1-x),\\ |
| 6525 |
\end{array} \end{equation} |
| 6526 |
and approximates the Feigenbaum constant. The script |
| 6527 |
\filef{log.auto} shows a Python loop in which values |
| 6528 |
of $\mu$ for subsequent period-doubling bifurcations are compared. |
| 6529 |
|
| 6530 |
\begin{table}[htbp] |
| 6531 |
\begin{center} |
| 6532 |
\begin{tabular}{| l | l |} |
| 6533 |
\hline |
| 6534 |
\AUTO-COMMAND & ACTION \\ |
| 6535 |
\hline |
| 6536 |
%============================================================================== |
| 6537 |
\commandf{mkdir log } & create an empty work directory \\ |
| 6538 |
\commandf{cd log } & change directory \\ |
| 6539 |
\commandf{demo('log') } & copy the demo files to the work directory \\ |
| 6540 |
\commandf{auto('log.auto') } & run the script log.auto \\ |
| 6541 |
\commandf{plot('log') } & plot the bifurcation diagram \\ |
| 6542 |
\hline |
| 6543 |
\end{tabular} |
| 6544 |
\caption{Commands for running demo \filef{log}.} |
| 6545 |
\label{tbl:demo_log} |
| 6546 |
\end{center} |
| 6547 |
\end{table} |
| 6548 |
|
| 6549 |
\newpage |
| 6550 |
%============================================================================== |
| 6551 |
%DEMO=hen====================================================================== |
| 6552 |
%============================================================================== |
| 6553 |
\section{ hen: The H\'enon Map.} \label{sec:Demos_hen} |
| 6554 |
In this demo, a two-parameter bifurcation analysis of the H\'enon map |
| 6555 |
\begin{equation} \begin{array}{cl} |
| 6556 |
x^{k+1} &= y,\\ |
| 6557 |
y^{k+1} &= \alpha-\beta x - y^2,\\ |
| 6558 |
\end{array} \end{equation} |
| 6559 |
is performed. This demo features the detection and continuation |
| 6560 |
of Naimark-Sacker, period-doubling, and fold bifurcations in two |
| 6561 |
parameters. On these codimension-one bifurcation curves |
| 6562 |
certain codimension-two bifurcations are detected: |
| 6563 |
the 1:1 (R1), 1:2 (R2), 1:3 (R3), and 1:4 (R4) resonance and fold-flip (LPD) |
| 6564 |
bifurcation points. After running the script \filef{hen.auto}, the |
| 6565 |
results can be plotted using \commandf{plot('hen')} or \commandf{@pp hen}. |
| 6566 |
|
| 6567 |
\begin{table}[htbp] |
| 6568 |
\begin{center} |
| 6569 |
\begin{tabular}{| l | l |} |
| 6570 |
\hline |
| 6571 |
\AUTO-COMMAND & ACTION \\ |
| 6572 |
\hline |
| 6573 |
%============================================================================== |
| 6574 |
\commandf{mkdir hen } & create an empty work directory \\ |
| 6575 |
\commandf{cd hen } & change directory \\ |
| 6576 |
\commandf{demo('hen') } & copy the demo files to the work directory \\ |
| 6577 |
\commandf{r1 = run('hen')} & \parbox[t]{3in}{ |
| 6578 |
fixed point solution branch for $\beta$ |
| 6579 |
($\alpha=1$) (detects a period-doubling (PD) |
| 6580 |
and a Naimark-Sacker (TR) bifurcation)\vspace{0.1cm}} \\ |
| 6581 |
\commandf{save('beta')} & save output-files as \filef{b.beta, s.beta, |
| 6582 |
d.beta} \\ |
| 6583 |
\hline |
| 6584 |
\parbox[t]{3in}{ |
| 6585 |
\commandf{run(r1("TR1"),ICP=['alpha','beta'], ISW=2,ILP=0,STOP=['R11','R21'])}\vspace{0.1cm}}& |
| 6586 |
\parbox[t]{3in}{ |
| 6587 |
continue the TR bifurcation in two parameters until a 1:1 or 1:2 |
| 6588 |
resonance is found\vspace{0.1cm}}\\ |
| 6589 |
\commandf{save('hen')} & save output-files as \filef{b.hen, s.hen, d.hen} \\ |
| 6590 |
\commandf{run(DS='-')} & compute last continuation the opposite way\\ |
| 6591 |
\commandf{append('hen')} & append output-files to \filef{b.hen, s.hen, d.hen} \\ |
| 6592 |
\hline |
| 6593 |
\parbox[t]{3in}{ |
| 6594 |
\commandf{run(r1("PD1"),ICP=['alpha','beta'], ISW=2,ILP=0)}\vspace{0.1cm}}& |
| 6595 |
\parbox[t]{3in}{ |
| 6596 |
continue the PD bifurcation in two parameters\vspace{0.1cm}}\\ |
| 6597 |
\commandf{append('hen')} & append output-files as \filef{b.hen, s.hen, d.hen} \\ |
| 6598 |
\commandf{run(DS='-')} & compute last continuation the opposite way\\ |
| 6599 |
\commandf{append('hen')} & append output-files to \filef{b.hen, s.hen, d.hen} \\ |
| 6600 |
\hline |
| 6601 |
\parbox[t]{3in}{ |
| 6602 |
\commandf{r4=run(c='hen',ICP=['alpha'], DS='-',STOP=['LP1'])}\vspace{0.1cm}}& |
| 6603 |
\parbox[t]{3in}{ |
| 6604 |
fixed point solution branch for $\alpha$ |
| 6605 |
($\beta=1$) (detects and stops at a fold (LP))\vspace{0.1cm}} \\ |
| 6606 |
\commandf{save('alpha')} & save output-files as \filef{b.alpha, s.alpha, |
| 6607 |
d.alpha} \\ |
| 6608 |
\hline |
| 6609 |
\parbox[t]{3in}{ |
| 6610 |
\commandf{run(r4("LP1"),ICP=['alpha','beta'], ISW=2,ILP=0)}\vspace{0.1cm}}& |
| 6611 |
\parbox[t]{3in}{ |
| 6612 |
continue the LP bifurcation in two parameters}\\ |
| 6613 |
\commandf{append('hen')} & append output-files as \filef{b.hen, s.hen, d.hen} \\ |
| 6614 |
\commandf{run(DS='-')} & compute last continuation the opposite way\\ |
| 6615 |
\commandf{append('hen')} & append output-files to \filef{b.hen, s.hen, d.hen} \\ |
| 6616 |
\hline |
| 6617 |
\commandf{merge('hen')} & |
| 6618 |
\parbox[t]{3in}{ |
| 6619 |
join all forward and backward branches into |
| 6620 |
single branches\vspace{0.1cm}}\\ |
| 6621 |
\commandf{relabel('hen')} & make all labels unique\\ |
| 6622 |
\hline |
| 6623 |
\end{tabular} |
| 6624 |
\caption{Commands for running demo \filef{hen}.} |
| 6625 |
\label{tbl:demo_hen} |
| 6626 |
\end{center} |
| 6627 |
\end{table} |
| 6628 |
|
| 6629 |
%merge('hen') |
| 6630 |
%relabel('hen') |
| 6631 |
|
| 6632 |
|
| 6633 |
|
| 6634 |
%============================================================================== |
| 6635 |
%============================================================================== |
| 6636 |
\chapter{ {\cal AUTO} Demos : Periodic solutions.} \label{ch:Demos_Periodic} |
| 6637 |
%============================================================================== |
| 6638 |
%============================================================================== |
| 6639 |
|
| 6640 |
%============================================================================== |
| 6641 |
%DEMO=lrz====================================================================== |
| 6642 |
%============================================================================== |
| 6643 |
\newpage |
| 6644 |
\section{ lrz : The Lorenz Equations.} \label{sec:Demos_lrz} |
| 6645 |
This demo computes two symmetric homoclinic orbits in the Lorenz equations |
| 6646 |
\begin{equation} \begin{array}{cl} |
| 6647 |
x' &= \sigma (y - x), \\ |
| 6648 |
y' &= \rho x - y - x z, \\ |
| 6649 |
z' &= x y - \beta z. \\ \end{array} \end{equation} |
| 6650 |
Here $\rho$ is the free parameter, and $\beta=8/3$, $\sigma=10$. |
| 6651 |
The two homoclinic orbits correspond to the final, large period orbits |
| 6652 |
on the two periodic solution families. |
| 6653 |
|
| 6654 |
\begin{table}[htbp] |
| 6655 |
\begin{center} |
| 6656 |
\begin{tabular}{| l | l |} |
| 6657 |
\hline |
| 6658 |
\AUTO-COMMAND & ACTION \\ |
| 6659 |
\hline |
| 6660 |
%============================================================================== |
| 6661 |
|
| 6662 |
\commandf{mkdir lrz} & create an empty work directory \\ |
| 6663 |
\commandf{cd lrz} & change directory \\ |
| 6664 |
\commandf{demo('lrz')} & copy the demo files to the work directory \\ |
| 6665 |
\hline |
| 6666 |
%============================================================================== |
| 6667 |
\commandf{lrz=run(e='lrz',c='lrz')} & compute stationary solutions \\ |
| 6668 |
\commandf{save('lrz')} & save all output to \filef{b.lrz, s.lrz, d.lrz} \\ \hline |
| 6669 |
%============================================================================== |
| 6670 |
\parbox[t]{3in}{ |
| 6671 |
\commandf{run(lrz('HB1'),IPS=2,ICP=['rho', |
| 6672 |
'PERIOD'],NMX=35,NPR=2,DS=0.5)}\vspace{0.2cm}} |
| 6673 |
& \parbox[t]{3in}{ |
| 6674 |
compute periodic solutions; the final orbit is near-homoclinic. |
| 6675 |
\vspace{0.2cm}}\\ |
| 6676 |
\commandf{append('lrz')} & append all output to \filef{b.lrz, s.lrz, d.lrz} \\ |
| 6677 |
\hline |
| 6678 |
%============================================================================== |
| 6679 |
\parbox[t]{3in}{ |
| 6680 |
\commandf{run(lrz('HB2'),IPS=2,ICP=['rho', |
| 6681 |
'PERIOD'],NMX=35,NPR=2,DS=0.5)} |
| 6682 |
\vspace{0.2cm}} & compute the symmetric periodic solution family \\ |
| 6683 |
\commandf{append('lrz')} & append all output to \filef{b.lrz, s.lrz, d.lrz} \\ |
| 6684 |
\hline |
| 6685 |
\end{tabular} |
| 6686 |
\caption{Commands for running demo \filef{lrz}.} |
| 6687 |
\label{tbl:demo_lrz} |
| 6688 |
\end{center} |
| 6689 |
\end{table} |
| 6690 |
|
| 6691 |
\newpage |
| 6692 |
%============================================================================== |
| 6693 |
%DEMO=abc====================================================================== |
| 6694 |
%============================================================================== |
| 6695 |
\section{ abc : The A \texorpdfstring{$\to$}{to} B |
| 6696 |
\texorpdfstring{$\to$}{to} C Reaction.} \label{sec:Demos_abc} |
| 6697 |
This demo illustrates the computation of |
| 6698 |
stationary solutions, |
| 6699 |
Hopf bifurcations |
| 6700 |
and |
| 6701 |
periodic solutions |
| 6702 |
in the A $\to$ B $\to$ C reaction |
| 6703 |
(\citename{DoHe:83} \citeyear{DoHe:83}). |
| 6704 |
\begin{equation} \begin{array}{cl} |
| 6705 |
u_1 ' &= -u_1 + p_1 (1-u_1) e^{u_3}, \\ |
| 6706 |
u_2 ' &= -u_2 + p_1 e^{u_3} ( 1-u_1 - p_5 u_2 ),\\ |
| 6707 |
u_3 ' &= -u_3 - p_3 u_3 + p_1 p_4 e^{u_3} |
| 6708 |
( 1-u_1 + p_2 p_5 u_2 ),\\ \end{array} \end{equation} |
| 6709 |
with $p_2=1$, $p_3=1.55$, $p_4=8$, and $p_5=0.04$. |
| 6710 |
The free parameter is $p_1$. |
| 6711 |
|
| 6712 |
The equations, as programmed in the equations-file {\tt abc.f90}, |
| 6713 |
appear in Table~\ref{tbl:demo_abcE1}. |
| 6714 |
The starting point, an equilibrium of the equations, |
| 6715 |
is also defined in the equations-file {\tt abc.f90}, |
| 6716 |
as shown in Table~\ref{tbl:demo_abcE2}. |
| 6717 |
(The equations-file {\tt abc.f90} also contains the skeletons |
| 6718 |
of some other routines, which must be supplied, but which |
| 6719 |
are not used in this application.) |
| 6720 |
|
| 6721 |
A more advanced version, that continues branch points in three |
| 6722 |
parameters is provided by the demo {\tt abcb}. |
| 6723 |
|
| 6724 |
In the constants-file ({\tt c.abc.1}) for the first run, as shown in |
| 6725 |
Table~\ref{tbl:demo_abcC1}, we note the following: |
| 6726 |
|
| 6727 |
\begin{itemize} |
| 6728 |
\item[-] {\tt IPS=1}~: a family of stationary solutions is computed. |
| 6729 |
|
| 6730 |
\item[-] {\tt IRS=0}~: the starting point defined in {\tt STPNT} |
| 6731 |
is to be used (see Table~\ref{tbl:demo_abcE2}). |
| 6732 |
|
| 6733 |
\item[-] {\tt ICP=[1]}~: the continuation parameter is PAR(1) |
| 6734 |
|
| 6735 |
\item[-] {\tt UZR=\{-1:0.4\}}~: there is one user output point, namely at |
| 6736 |
{\tt PAR(1)=0.4}. Moreover, since the index ("{\tt -1}") in |
| 6737 |
the last line of the constants-file {\tt c.abc.1} is negative, |
| 6738 |
the calculation will terminate when the calculation reaches |
| 6739 |
the value {\tt PAR(1)=0.4}.. |
| 6740 |
\end{itemize} |
| 6741 |
|
| 6742 |
In the constants-file ({\tt c.abc.2}) for the second run, as shown in |
| 6743 |
Table~\ref{tbl:demo_abcC2}, we note that: |
| 6744 |
|
| 6745 |
\begin{itemize} |
| 6746 |
\item[-] {\tt IPS=2}~: a family of periodic solutions is computed. |
| 6747 |
|
| 6748 |
\item[-] {\tt IRS=2}~: the starting point is the solution with label 2, |
| 6749 |
(a Hopf bifurcation point), to be read from the solutions-file |
| 6750 |
(here {\tt s.abc}). |
| 6751 |
|
| 6752 |
\item[-] {\tt ICP=[1,11]}~: there are two continuation parameters |
| 6753 |
(namely {\tt PAR(1)}, and the period, {\tt PAR(11)}). |
| 6754 |
|
| 6755 |
\item[-] {\tt UZR=\{-1:0.25\}}~: there is one user output point, now at |
| 6756 |
{\tt PAR(1)=0.25}, where the calculation is to terminate, |
| 6757 |
since the index ("{\tt -1}") is negative. |
| 6758 |
\end{itemize} |
| 6759 |
|
| 6760 |
%------------------------------------------------------ |
| 6761 |
\begin{table}[htbp] |
| 6762 |
{\small |
| 6763 |
\begin{center} |
| 6764 |
\begin{boxedverbatim} |
| 6765 |
SUBROUTINE FUNC(NDIM,U,ICP,PAR,IJAC,F,DFDU,DFDP) |
| 6766 |
! ---------- ---- |
| 6767 |
|
| 6768 |
IMPLICIT NONE |
| 6769 |
INTEGER, INTENT(IN) :: NDIM, ICP(*), IJAC |
| 6770 |
DOUBLE PRECISION, INTENT(IN) :: U(NDIM), PAR(*) |
| 6771 |
DOUBLE PRECISION, INTENT(OUT) :: F(NDIM) |
| 6772 |
DOUBLE PRECISION, INTENT(INOUT) :: DFDU(NDIM,NDIM), DFDP(NDIM,*) |
| 6773 |
|
| 6774 |
DOUBLE PRECISION X1,X2,X3,D,ALPHA,BETA,B,S,E,X1C |
| 6775 |
|
| 6776 |
X1=U(1) |
| 6777 |
X2=U(2) |
| 6778 |
X3=U(3) |
| 6779 |
|
| 6780 |
D=PAR(1) |
| 6781 |
ALPHA=PAR(2) |
| 6782 |
BETA=PAR(3) |
| 6783 |
B=PAR(4) |
| 6784 |
S=PAR(5) |
| 6785 |
|
| 6786 |
E=DEXP(X3) |
| 6787 |
X1C=1-X1 |
| 6788 |
|
| 6789 |
F(1)=-X1 + D*X1C*E |
| 6790 |
F(2)=-X2 + D*E*(X1C - S*X2) |
| 6791 |
F(3)=-X3 - BETA*X3 + D*B*E*(X1C + ALPHA*S*X2) |
| 6792 |
|
| 6793 |
END SUBROUTINE FUNC |
| 6794 |
\end{boxedverbatim} |
| 6795 |
\end{center} |
| 6796 |
} |
| 6797 |
\caption{The equations for demo {\tt abc}, |
| 6798 |
as defined in the equations-file {\tt abc.f90}.} |
| 6799 |
\label{tbl:demo_abcE1} |
| 6800 |
\end{table} |
| 6801 |
%------------------------------------------------------ |
| 6802 |
|
| 6803 |
|
| 6804 |
%------------------------------------------------------ |
| 6805 |
\begin{table}[htbp] |
| 6806 |
{\small |
| 6807 |
\begin{center} |
| 6808 |
\begin{boxedverbatim} |
| 6809 |
SUBROUTINE STPNT(NDIM,U,PAR,T) |
| 6810 |
! ---------- ----- |
| 6811 |
|
| 6812 |
IMPLICIT NONE |
| 6813 |
INTEGER, INTENT(IN) :: NDIM |
| 6814 |
DOUBLE PRECISION, INTENT(INOUT) :: U(NDIM),PAR(*) |
| 6815 |
DOUBLE PRECISION, INTENT(IN) :: T |
| 6816 |
|
| 6817 |
PAR(1)=0.0 |
| 6818 |
PAR(2)=1.0 |
| 6819 |
PAR(3)=1.55 |
| 6820 |
PAR(4)=8. |
| 6821 |
PAR(5)=0.04 |
| 6822 |
|
| 6823 |
U(1)=0. |
| 6824 |
U(2)=0. |
| 6825 |
U(3)=0. |
| 6826 |
|
| 6827 |
END SUBROUTINE STPNT |
| 6828 |
\end{boxedverbatim} |
| 6829 |
\end{center} |
| 6830 |
} |
| 6831 |
\caption{The starting solution for demo {\tt abc}, |
| 6832 |
as defined in the equations-file {\tt abc.f90}.} |
| 6833 |
\label{tbl:demo_abcE2} |
| 6834 |
\end{table} |
| 6835 |
%------------------------------------------------------ |
| 6836 |
|
| 6837 |
%------------------------------------------------------ |
| 6838 |
\begin{table}[htbp] |
| 6839 |
{\small |
| 6840 |
\begin{center} |
| 6841 |
\begin{boxedverbatim} |
| 6842 |
NDIM= 3, IPS = 1, IRS = 0, ILP = 1 |
| 6843 |
ICP = [1] |
| 6844 |
NTST= 15, NCOL= 4, IAD = 3, ISP = 1, ISW = 1, IPLT= 0, NBC= 0, NINT= 0 |
| 6845 |
NMX= 130, NPR= 200, MXBF= 10, IID = 2, ITMX= 8, ITNW= 5, NWTN= 3, JAC= 0 |
| 6846 |
EPSL= 1e-07, EPSU = 1e-07, EPSS =0.0001 |
| 6847 |
DS = 0.02, DSMIN= 0.001, DSMAX= 0.1, IADS= 1 |
| 6848 |
NPAR = 5, THL = {11: 0.0}, THU = {} |
| 6849 |
UZR = {1: 0.4}, STOP = ['UZ1'] |
| 6850 |
\end{boxedverbatim} |
| 6851 |
\end{center} |
| 6852 |
} |
| 6853 |
\caption{The constants-file {\tt c.abc.1} for Run 1 (stationary solutions) |
| 6854 |
of demo {\tt abc}.} |
| 6855 |
\label{tbl:demo_abcC1} |
| 6856 |
\end{table} |
| 6857 |
%------------------------------------------------------ |
| 6858 |
|
| 6859 |
|
| 6860 |
%------------------------------------------------------ |
| 6861 |
\begin{table}[htbp] |
| 6862 |
{\small |
| 6863 |
\begin{center} |
| 6864 |
\begin{boxedverbatim} |
| 6865 |
NDIM= 3, IPS = 2, IRS = 2, ILP = 1 |
| 6866 |
ICP = [1, 11] |
| 6867 |
NTST= 25, NCOL= 4, IAD = 3, ISP = 1, ISW = 1, IPLT= 0, NBC= 0, NINT= 0 |
| 6868 |
NMX= 200, NPR= 200, MXBF= 10, IID = 2, ITMX= 8, ITNW= 5, NWTN= 3, JAC= 0 |
| 6869 |
EPSL= 1e-07, EPSU = 1e-07, EPSS =0.0001 |
| 6870 |
DS = 0.02, DSMIN= 0.001, DSMAX= 0.1, IADS= 1 |
| 6871 |
NPAR = 5, THL = {11: 0.0}, THU = {} |
| 6872 |
UZR = {1: 0.25}, STOP = ['UZ1'] |
| 6873 |
\end{boxedverbatim} |
| 6874 |
\end{center} |
| 6875 |
} |
| 6876 |
\caption{The constants-file {\tt c.abc.2} for Run 2 (periodic orbits) |
| 6877 |
of demo {\tt abc}.} |
| 6878 |
\label{tbl:demo_abcC2} |
| 6879 |
\end{table} |
| 6880 |
%------------------------------------------------------ |
| 6881 |
|
| 6882 |
|
| 6883 |
\begin{table}[htbp] |
| 6884 |
\begin{center} |
| 6885 |
\begin{tabular}{| l | l |} |
| 6886 |
\hline |
| 6887 |
COMMAND & ACTION \\ |
| 6888 |
\hline |
| 6889 |
%============================================================================== |
| 6890 |
\commandf{mkdir abc} & create an empty work directory \\ |
| 6891 |
\commandf{cd abc} & change directory \\ |
| 6892 |
\commandf{@dm abc} & copy the demo files to the work directory \\ |
| 6893 |
\hline |
| 6894 |
%============================================================================== |
| 6895 |
\commandf{@R abc 1} & compute the stationary solution family |
| 6896 |
with four Hopf bifurcations \\ |
| 6897 |
\commandf{@sv abc} & save output-files as {\tt b.abc, s.abc, d.abc} \\ |
| 6898 |
\hline |
| 6899 |
%============================================================================== |
| 6900 |
\commandf{@R abc 2} & compute a family of periodic solutions from the first Hopf point \\ |
| 6901 |
\commandf{@ap abc} & append the output-files to {\tt b.abc, s.abc, d.abc} \\ |
| 6902 |
\hline |
| 6903 |
%============================================================================== |
| 6904 |
\commandf{@R abc 3} & compute a family of periodic solutions from the second Hopf point \\ |
| 6905 |
\commandf{@ap abc} & append the output-files to {\tt b.abc, s.abc, d.abc} \\ |
| 6906 |
\hline |
| 6907 |
%============================================================================== |
| 6908 |
\commandf{@R abc 4} & compute a family of periodic solutions from the third Hopf point \\ |
| 6909 |
\commandf{@ap abc} & append the output-files to {\tt b.abc, s.abc, d.abc} \\ |
| 6910 |
\hline |
| 6911 |
%============================================================================== |
| 6912 |
\commandf{@R abc 5} & compute a family of periodic solutions from the fourth Hopf point \\ |
| 6913 |
\commandf{@ap abc} & append the output-files to {\tt b.abc, s.abc, d.abc} \\ |
| 6914 |
\hline |
| 6915 |
%============================================================================== |
| 6916 |
\end{tabular} |
| 6917 |
\caption{Unix Commands for running demo {\tt abc}.} |
| 6918 |
\label{tbl:demo_abcL} |
| 6919 |
\end{center} |
| 6920 |
\end{table} |
| 6921 |
|
| 6922 |
%------------------------------------------------------ |
| 6923 |
\begin{table}[htbp] |
| 6924 |
{\small |
| 6925 |
\begin{center} |
| 6926 |
\begin{boxedverbatim} |
| 6927 |
abc=run(e='abc',c='abc.1') |
| 6928 |
abc=abc+run(abc('HB1'),c='abc.2') |
| 6929 |
abc=abc+run(abc('HB2'),c='abc.3') |
| 6930 |
abc=abc+run(abc('HB3'),c='abc.4') |
| 6931 |
abc=abc+run(abc('HB4'),c='abc.5') |
| 6932 |
save(abc,'abc') |
| 6933 |
\end{boxedverbatim} |
| 6934 |
\end{center} |
| 6935 |
} |
| 6936 |
\caption{Python Commands for running demo {\tt abc}.} |
| 6937 |
\label{tbl:demo_abcP1} |
| 6938 |
\end{table} |
| 6939 |
%------------------------------------------------------ |
| 6940 |
|
| 6941 |
%------------------------------------------------------ |
| 6942 |
\begin{table}[htbp] |
| 6943 |
{\small |
| 6944 |
\begin{center} |
| 6945 |
\begin{boxedverbatim} |
| 6946 |
abc=run(e='abc',c='abc.1') |
| 6947 |
for solution in abc('HB'): |
| 6948 |
abc=abc+run(solution,c='abc.2') |
| 6949 |
abc=rl(abc) |
| 6950 |
save(abc,'abc') |
| 6951 |
\end{boxedverbatim} |
| 6952 |
\end{center} |
| 6953 |
} |
| 6954 |
\caption{Python Program for running demo {\tt abc}.} |
| 6955 |
\label{tbl:demo_abcP2} |
| 6956 |
\end{table} |
| 6957 |
%------------------------------------------------------ |
| 6958 |
|
| 6959 |
|
| 6960 |
\newpage |
| 6961 |
%============================================================================== |
| 6962 |
%DEMO=pp2====================================================================== |
| 6963 |
%============================================================================== |
| 6964 |
\section{ pp2 : A 2D Predator-Prey Model.} \label{sec:Demos_pp2} |
| 6965 |
This demo illustrates the computation of families of stationary |
| 6966 |
solutions, including bifurcating stationary families, as well as |
| 6967 |
the detection of a Hopf bifurcation. |
| 6968 |
The first run computes the families of stationary solutions, bounded |
| 6969 |
by $0\le p_1\le 1$ and $u_1 \ge -0.25$. Then the script \filef{pp2.auto} |
| 6970 |
scans the first run for Hopf bifurcations, finds one, and computes |
| 6971 |
the family of periodic solutions that emanates |
| 6972 |
from the Hopf bifurcation. This family terminates in |
| 6973 |
a heteroclinic orbit. The continuation is configured to stop if the period |
| 6974 |
\parf{PAR(11)}$=36$, when the heteroclinic orbit is very close. |
| 6975 |
|
| 6976 |
The equations, which model a predator-prey system with harvesting, are |
| 6977 |
\begin{equation} \begin{array}{cl} |
| 6978 |
u_1 ' &= p_2 u_1 (1 - u_1 ) - u_1 u_2 - p_1 (1-e^{-p_3 u_1}) ,\\ |
| 6979 |
u_2 ' &= -u_2 + p_4 u_1 u_2 .\end{array} \end{equation} |
| 6980 |
Here $p_1$ (quota) is the principal continuation parameter, |
| 6981 |
while $p_2=p_4=3$ and $p_3=5$, are fixed. The variables $u_1$ and |
| 6982 |
$u_2$ denote prey and predator, for instance fish and sharks. |
| 6983 |
The use of {\cal PLAUT} is also illustrated. The saved plots are shown |
| 6984 |
in Figure~\ref{fig:pp2_1} and Figure~\ref{fig:pp2_2}. |
| 6985 |
You can obtain similar figures using the Python CLUI's plot |
| 6986 |
command and using {\cal PLAUT04}. |
| 6987 |
\begin{table}[htbp] |
| 6988 |
\begin{center} |
| 6989 |
\begin{tabular}{| l | l |} |
| 6990 |
\hline |
| 6991 |
COMMAND & ACTION \\ |
| 6992 |
\hline |
| 6993 |
%============================================================================== |
| 6994 |
\commandf{mkdir pp2} & create an empty work directory \\ |
| 6995 |
\commandf{cd pp2} & change directory \\ |
| 6996 |
\commandf{@dm pp2} & copy the demo files to the work directory \\ |
| 6997 |
\hline |
| 6998 |
%============================================================================== |
| 6999 |
\commandf{auto pp2.auto } or & Run the script pp2.auto\\ |
| 7000 |
\commandf{auto('pp2.auto') } & \\ |
| 7001 |
\hline |
| 7002 |
%============================================================================== |
| 7003 |
\end{tabular} |
| 7004 |
\caption{Commands for running demo {\tt pp2}.} |
| 7005 |
\label{tbl:demo_pp2_1} |
| 7006 |
\end{center} |
| 7007 |
\end{table} |
| 7008 |
|
| 7009 |
\begin{table}[htbp] |
| 7010 |
\begin{center} |
| 7011 |
\begin{tabular}{| l | l |} |
| 7012 |
\hline |
| 7013 |
{\cal AUTO}-COMMAND & ACTION \\ |
| 7014 |
\hline |
| 7015 |
\commandf{@p pp2} or \commandf{@pp pp2} & |
| 7016 |
\begin{minipage}{10cm}~\\ |
| 7017 |
run {\cal PLAUT} or {\cal |
| 7018 |
PyPLAUT} to graph the contents of {\tt b.pp2} and {\tt s.pp2};\\ |
| 7019 |
\end{minipage} |
| 7020 |
\\ |
| 7021 |
\hline |
| 7022 |
{\cal PLAUT/PyPLAUT}-COMMAND & ACTION \\ |
| 7023 |
\hline |
| 7024 |
\commandf{d2} & set convenient defaults\\ |
| 7025 |
\commandf{ax} & select axes \\ |
| 7026 |
\commandf{1 3} & select real columns 1 and 3 in {\tt b.pp2} \\ |
| 7027 |
\commandf{bd0} & plot the bifurcation diagram; $max~u_1$ versus $p_1$ \\ |
| 7028 |
\hline |
| 7029 |
\commandf{d1} & choose other default settings \\ |
| 7030 |
\commandf{bd} & get blow-up of current bifurcation diagram \\ |
| 7031 |
\commandf{0~ 1 ~-0.25~ 1} & enter diagram limits \\ |
| 7032 |
\commandf{sav} & save plot (see Figure~\ref{fig:pp2_1})\\ |
| 7033 |
\commandf{fig.1} or \commandf{fig1.eps} & upon prompt, enter a new |
| 7034 |
file name, e.g., {\tt fig.1} or {\tt fig.eps}\\ |
| 7035 |
\commandf{cl} & clear the screen \\ |
| 7036 |
\hline |
| 7037 |
\commandf{2d} & enter 2D mode, for plotting labeled solutions\\ |
| 7038 |
\commandf{11 15 19 23} & select these labeled orbits in {\tt s.pp2}\\ |
| 7039 |
\commandf{d} & default orbit display; $u_1$ versus time\\ |
| 7040 |
\hline |
| 7041 |
\commandf{1 3} & select columns 1 and 3 in {\tt s.pp2} \\ |
| 7042 |
\commandf{d} & display the orbits; $u_2$ versus time\\ |
| 7043 |
\hline |
| 7044 |
\commandf{2 3} & select columns 2 and 3 in {\tt s.pp2} \\ |
| 7045 |
\commandf{d} & phase plane display; $u_2$ versus $u_1$\\ |
| 7046 |
\commandf{sav} & save plot (see Figure~\ref{fig:pp2_2})\\ |
| 7047 |
\commandf{fig.2} or \commandf{fig2.eps} & upon prompt, enter a new file name \\ |
| 7048 |
\commandf{ex} & exit from 2D mode \\ |
| 7049 |
\hline |
| 7050 |
\commandf{end} & exit from {\cal PLAUT/PyPLAUT} \\ |
| 7051 |
\hline |
| 7052 |
%============================================================================== |
| 7053 |
\end{tabular} |
| 7054 |
\caption{Plotting commands for demo {\tt pp2}.} |
| 7055 |
\label{tbl:demo_pp2_2} |
| 7056 |
\end{center} |
| 7057 |
\end{table} |
| 7058 |
|
| 7059 |
%------------------------------------------------------ |
| 7060 |
\begin{figure}[p] |
| 7061 |
\epsfysize 9.0cm |
| 7062 |
\centerline{\epsffile{include/pp21}} |
| 7063 |
\caption{The bifurcation diagram of demo {\tt pp2}.} |
| 7064 |
\label{fig:pp2_1} |
| 7065 |
\end{figure} |
| 7066 |
%------------------------------------------------------ |
| 7067 |
|
| 7068 |
%------------------------------------------------------ |
| 7069 |
\begin{figure}[p] |
| 7070 |
\epsfysize 9.0cm |
| 7071 |
\centerline{\epsffile{include/pp22}} |
| 7072 |
\caption{The phase plot of solutions 11, 15, 19, and 23 in demo {\tt pp2}.} |
| 7073 |
\label{fig:pp2_2} |
| 7074 |
\end{figure} |
| 7075 |
%------------------------------------------------------ |
| 7076 |
|
| 7077 |
|
| 7078 |
\newpage |
| 7079 |
%============================================================================== |
| 7080 |
%DEMO=lor====================================================================== |
| 7081 |
%============================================================================== |
| 7082 |
\section{ lor : Starting an Orbit from Numerical Data.} \label{sec:Demos_lor} |
| 7083 |
This demo illustrates how to start the computation of a family of |
| 7084 |
periodic solutions from numerical data obtained, for example, from an |
| 7085 |
initial value solver. |
| 7086 |
As an illustrative application we consider the Lorenz equations |
| 7087 |
\begin{equation} \begin{array}{cl} |
| 7088 |
x' &= \sigma (y - x), \\ |
| 7089 |
y' &= \rho x - y - x z, \\ |
| 7090 |
z' &= x y - \beta z. \\\end{array} \end{equation} |
| 7091 |
Numerical simulations with a simple initial value solver show the |
| 7092 |
existence of a stable periodic orbit when $\rho=280$, $\beta=8/3$, $\sigma=10$. |
| 7093 |
Numerical data representing one complete periodic oscillation are |
| 7094 |
contained in the file \filef{lor.dat}. |
| 7095 |
Each row in \filef{lor.dat} contains four real numbers, namely, |
| 7096 |
the time variable $t$, $x$, $y$ and $z$. |
| 7097 |
The correponding parameter values are defined in the user-supplied subroutine |
| 7098 |
\filef{STPNT}. |
| 7099 |
The \AUTO constant \parf{dat='lor'} then allows for using |
| 7100 |
the data in \filef{lor.dat} where we also specify \parf{IRS=0}. |
| 7101 |
The mesh will be suitably adapted to the solution, using the number of |
| 7102 |
mesh intervals \parf{NTST} and the number of collocation point per mesh |
| 7103 |
interval \parf{NCOL} specified in the constants-file \filef{c.lor.1}. |
| 7104 |
|
| 7105 |
\begin{table}[htbp] |
| 7106 |
\begin{center} |
| 7107 |
\begin{tabular}{| l | l |} |
| 7108 |
\hline |
| 7109 |
\AUTO-COMMAND & ACTION \\ |
| 7110 |
\hline |
| 7111 |
%============================================================================== |
| 7112 |
\commandf{mkdir lor} & create an empty work directory \\ |
| 7113 |
\commandf{cd lor} & change directory \\ |
| 7114 |
\commandf{demo('lor')} & copy the demo files to the work directory \\ |
| 7115 |
\hline |
| 7116 |
%============================================================================== |
| 7117 |
\commandf{lor=run('lor',c='lor.1')} & compute a solution family, restart from \filef{lor.dat} \\ |
| 7118 |
& save to bifurcation diagram object \parf{lor} \\ |
| 7119 |
\hline |
| 7120 |
%============================================================================== |
| 7121 |
\commandf{pd=run(lor('PD1'),c='lor.2')} & \parbox[t]{3in}{ switch branches at a period-doubling detected in the first run. Constants changed : {\tt IRS, ISW, NTST} \vspace{0.2cm}} \\ |
| 7122 |
\commandf{save(lor+pd,'lor')} & save the two runs to \filef{b.lor, s.lor, d.lor} \\ |
| 7123 |
\hline |
| 7124 |
%============================================================================== |
| 7125 |
\end{tabular} |
| 7126 |
\caption{Commands for running demo \filef{lor}.} |
| 7127 |
\label{tbl:demo_lor} |
| 7128 |
\end{center} |
| 7129 |
\end{table} |
| 7130 |
|
| 7131 |
\newpage |
| 7132 |
%============================================================================== |
| 7133 |
%DEMO=frc====================================================================== |
| 7134 |
%============================================================================== |
| 7135 |
\section{ frc : A Periodically Forced System.} \label{sec:Demos_frc} |
| 7136 |
This demo illustrates the computation of periodic solutions |
| 7137 |
to a periodically forced system. |
| 7138 |
In \AUTO this can be done by adding a nonlinear oscillator with |
| 7139 |
the desired periodic forcing as one of the solution components. |
| 7140 |
An example of such an oscillator is |
| 7141 |
\begin{equation} \begin{array}{cl} |
| 7142 |
x'&=x + \beta y - x (x^{2} + y^{2}), \\ |
| 7143 |
y'&=-\beta x + y - y (x^{2} + y^{2}), \\\end{array} \end{equation} |
| 7144 |
which has the asymptotically stable solution $x=sin (\beta t)$, |
| 7145 |
$y=cos (\beta t)$. |
| 7146 |
We couple this oscillator to the Fitzhugh-Nagumo equations~: |
| 7147 |
\begin{equation} \begin{array}{cl} |
| 7148 |
v'&=\bigl( F(v) - w \bigr) / \eps, \\ |
| 7149 |
w'&=v - dw - \bigl( b + r \sin(\beta t) \bigr) , |
| 7150 |
\end{array} \end{equation} |
| 7151 |
by replacing $\sin(\beta t)$ by $x$. |
| 7152 |
Above, $F(v) = v (v-a) (1-v)$ and $a,b,\eps$ and $d$ are fixed. |
| 7153 |
The first run is a homotopy from $r=0$, where a solution is known analytically, |
| 7154 |
to $r=0.2$. |
| 7155 |
Part of the solution family with $r=0.2$ and varying $\beta$ |
| 7156 |
is computed in the second run. |
| 7157 |
For detailed results see |
| 7158 |
\citename{AlDoOt:90} \citeyear{AlDoOt:90}. |
| 7159 |
|
| 7160 |
|
| 7161 |
\begin{table}[htbp] |
| 7162 |
\begin{center} |
| 7163 |
\begin{tabular}{| l | l |} |
| 7164 |
\hline |
| 7165 |
\AUTO-COMMAND & ACTION \\ |
| 7166 |
\hline |
| 7167 |
%============================================================================== |
| 7168 |
\commandf{mkdir frc} & create an empty work directory \\ |
| 7169 |
\commandf{cd frc} & change directory \\ |
| 7170 |
\commandf{demo('frc')} & copy the demo files to the work directory \\ |
| 7171 |
\hline |
| 7172 |
%============================================================================== |
| 7173 |
\commandf{r1=run(e='frc',c='frc')} & homotopy to $r=0.2$ \\ |
| 7174 |
\commandf{save(r1,'0')} & save output-files as \filef{b.0, s.0, d.0} \\ |
| 7175 |
\hline |
| 7176 |
%============================================================================== |
| 7177 |
\parbox[t]{3in}{ |
| 7178 |
\commandf{r2=run(r1('UZ1'),ICP=[5,11], |
| 7179 |
NMX=20,DS=-0.5,DSMAX=5.0)}\vspace{0.2cm}} & |
| 7180 |
\parbox[t]{3in}{ compute solution family; restart from \parf{r1}. \vspace{0.2cm}} \\ |
| 7181 |
\commandf{save(r2,'frc')} & save output-files as \filef{b.frc, s.frc, d.frc} \\ |
| 7182 |
\hline |
| 7183 |
%============================================================================== |
| 7184 |
\end{tabular} |
| 7185 |
\caption{Commands for running demo \filef{frc}.} |
| 7186 |
\label{tbl:demo_frc} |
| 7187 |
\end{center} |
| 7188 |
\end{table} |
| 7189 |
|
| 7190 |
\newpage |
| 7191 |
%============================================================================== |
| 7192 |
%DEMO=ppp====================================================================== |
| 7193 |
%============================================================================== |
| 7194 |
\section{ ppp : Continuation of Hopf Bifurcations.} \label{sec:Demos_ppp} |
| 7195 |
This demo illustrates the continuation of Hopf bifurcations in a 3-dimensional |
| 7196 |
predator prey model (\citename{Do:84} \citeyear{Do:84}). |
| 7197 |
This curve contain branch points, where one locus of Hopf points |
| 7198 |
bifurcates from another locus of Hopf points, and generalized Hopf (Bautin) |
| 7199 |
bifurcations (GH), where the Hopf bifurcation changes from sub- to |
| 7200 |
supercritical. The diagnostics file \filef{d.hb} can be inspected to |
| 7201 |
see where the Hopf bifurcation is subcritical and where it is supercritical. |
| 7202 |
The equations are |
| 7203 |
\begin{equation} \begin{array}{cl} |
| 7204 |
u_1 ' &= u_1(1-u_1) - p_4 u_1 u_2 , \\ |
| 7205 |
u_2 ' &= -p_2 u_2 + p_4 u_1 u_2 - p_5 u_2 u_3 |
| 7206 |
-p_1(1-e^{-p_6 u_2}) \\ |
| 7207 |
u_3 ' &= -p_3 u_3 + p_5 u_2 u_3 . \\ |
| 7208 |
\end{array} \end{equation} |
| 7209 |
Here $p_2=1/4$, $p_3=1/2$, $p_4=3$, $p_5=3$, $p_6=5$, |
| 7210 |
and $p_1$ is the free parameter. |
| 7211 |
In the continuation of Hopf points the parameter $p_4$ |
| 7212 |
is also free. |
| 7213 |
|
| 7214 |
\begin{table}[htbp] |
| 7215 |
\begin{center} |
| 7216 |
\begin{tabular}{| l | l |} |
| 7217 |
\hline |
| 7218 |
\AUTO-COMMAND & ACTION \\ |
| 7219 |
\hline |
| 7220 |
%============================================================================== |
| 7221 |
\commandf{mkdir ppp} & create an empty work directory \\ |
| 7222 |
\commandf{cd ppp} & change directory \\ |
| 7223 |
\commandf{demo('ppp')} & copy the demo files to the work directory \\ |
| 7224 |
\hline |
| 7225 |
%============================================================================== |
| 7226 |
\commandf{ppp=run(e='ppp',c='ppp')} & |
| 7227 |
\parbox[t]{3in}{ |
| 7228 |
compute stationary solutions; detect Hopf bifurcations |
| 7229 |
\vspace{0.2cm}}\\ |
| 7230 |
\hline |
| 7231 |
%============================================================================== |
| 7232 |
\parbox[t]{3.4in}{ |
| 7233 |
\commandf{ppp=ppp+run(ppp("HB2"),IPS=2,ICP=[1,11], |
| 7234 |
ILP=0,NMX=15,NPR=50,DS=0.1,DSMAX=0.5)}\vspace{0.2cm}} & |
| 7235 |
compute a family of periodic solutions\\ |
| 7236 |
\commandf{save(ppp,'ppp')} & save the output to \filef{b.ppp, s.ppp, d.ppp} \\ |
| 7237 |
\hline |
| 7238 |
%============================================================================== |
| 7239 |
\parbox[t]{3.4in}{ |
| 7240 |
\commandf{hb = |
| 7241 |
run(ppp("HB2"),ICP=[1,4],ILP=0, |
| 7242 |
ISW=2,NMX=100,RL1=0.58,DSMAX=0.1)\vspace{0.2cm}}} & |
| 7243 |
compute Hopf bifurcation curves \\ |
| 7244 |
\commandf{save(hb,'hb')} & save the output-files as \filef{b.hb, s.hb, d.hb} \\ |
| 7245 |
\hline |
| 7246 |
%============================================================================== |
| 7247 |
\end{tabular} |
| 7248 |
\caption{Commands for running demo \filef{ppp}.} |
| 7249 |
\label{tbl:demo_ppp_1} |
| 7250 |
\end{center} |
| 7251 |
\end{table} |
| 7252 |
|
| 7253 |
|
| 7254 |
\newpage |
| 7255 |
%============================================================================== |
| 7256 |
%DEMO=plp====================================================================== |
| 7257 |
%============================================================================== |
| 7258 |
\section{ plp : Fold Continuation for Periodic Solutions.} \label{sec:Demos_plp} |
| 7259 |
This demo, which corresponds to computations in |
| 7260 |
\citename{DoKeKe:91a} \citeyear{DoKeKe:91a}, shows how one can |
| 7261 |
continue folds on a family of periodic solutions in two parameters. |
| 7262 |
The calculation of a locus of Hopf bifurcations is also included. |
| 7263 |
The equations, that model a one-compartment activator-inhibitor system |
| 7264 |
(\citename{JPK:80} \citeyear{JPK:80}), |
| 7265 |
are given by |
| 7266 |
\begin{equation} \begin{array}{cl} |
| 7267 |
s' &= (s_{0} - s) - \rho R (s,a), \\ |
| 7268 |
a' &=\alpha (a_{0} - a) - \rho R (s,a), \\ |
| 7269 |
\end{array} \end{equation} |
| 7270 |
where |
| 7271 |
$$ R(s,a)=\frac{s a}{1+s+ \kappa s^{2} }, |
| 7272 |
\qquad \kappa > 0. $$ |
| 7273 |
The free parameter is $\rho$. |
| 7274 |
In the Hopf and fold continuations the parameter $s_0$ is also free. |
| 7275 |
The computed loci of Hopf points and folds suggest the existence |
| 7276 |
of {\it isolas} of periodic solutions. The computation of one such |
| 7277 |
isola is also included in this demo. All calculations can be carried |
| 7278 |
out by running the Python script \filef{plp.auto} included in the demo. |
| 7279 |
|
| 7280 |
\newpage |
| 7281 |
%============================================================================== |
| 7282 |
%DEMO=ph1====================================================================== |
| 7283 |
%============================================================================== |
| 7284 |
\section{ ph1 : Phase-Shifting using Continuation.} \label{sec:Demos_ph1} |
| 7285 |
This demo, which uses the activator-inhibitor model in |
| 7286 |
\citename{DoKeKe:91a} \citeyear{DoKeKe:91a}, shows how one can |
| 7287 |
phase-shift a periodic solution. This can be useful in applications, for example |
| 7288 |
when one wants a component of a periodic solution to have a specific value at |
| 7289 |
time $0$. |
| 7290 |
The equations are given by |
| 7291 |
\begin{equation} \begin{array}{cl} |
| 7292 |
s' &= (s_{0} - s) - \rho R (s,a)~, \\ |
| 7293 |
a' &=\alpha (a_{0} - a) - \rho R (s,a)~, \\ |
| 7294 |
\end{array} \end{equation} |
| 7295 |
where |
| 7296 |
$$ R(s,a)=\frac{s a}{1+s+ \kappa s^{2} }~.$$ |
| 7297 |
The first two runs compute a family |
| 7298 |
of stationary solutions and a bifurcating family of periodic solutions. |
| 7299 |
The free problem parameter in these runs is $\rho$. |
| 7300 |
The results are saved in the files \filef{b.sa}, \filef{s.sa}, and \filef{d.sa}. |
| 7301 |
The third run starts at a specified |
| 7302 |
periodic solution in \filef{s.sa}, namely, the solution with label $6$, and |
| 7303 |
phase-shifts this solution in time until $s(0)=30$. The above sequence of |
| 7304 |
calculations can be carried out by running the Python script \filef{ph1.auto} |
| 7305 |
included in the demo. |
| 7306 |
|
| 7307 |
The basic idea for doing the phase shift in the third run is to drop the integral |
| 7308 |
phase condition, which is automatically added when the {\cal AUTO}-constant \parf{IPS} |
| 7309 |
has value $2$. For this purpose the third run uses the value $4$ for \parf{IPS}, |
| 7310 |
as specified in \filef{c.ph1}, in which case the periodicity conditions must be |
| 7311 |
specified explicitly in the subroutine {\tt BCND} in the equations-file \filef{ph1.f90}. |
| 7312 |
Also, the interval of periodicity must be scaled explicitly to the interval $[0,1]$, |
| 7313 |
which introduces the period $T$ as an explicit parameter in the differential equations. |
| 7314 |
Note that no integral phase condition is specified in {\tt ICND}. |
| 7315 |
The problem formulation in \filef{ph1.f90} is therefore |
| 7316 |
|
| 7317 |
\begin{equation} \begin{array}{cl} |
| 7318 |
s' &= T[(s_{0} - s) - \rho R (s,a)]~, \\ |
| 7319 |
a' &= T[\alpha (a_{0} - a) - \rho R (s,a)]~, \\ |
| 7320 |
\end{array} \end{equation} |
| 7321 |
\\ |
| 7322 |
with boundary conditions |
| 7323 |
\\ |
| 7324 |
\begin{equation} \begin{array}{cl} |
| 7325 |
s(0) - s(1) &= 0~, \\ |
| 7326 |
a(0) - a(1) &= 0~. \\ |
| 7327 |
\end{array} \end{equation} |
| 7328 |
|
| 7329 |
Note that the \AUTO parameter {\tt PAR(9)}, defined in the subroutine |
| 7330 |
{\tt PVLS} in \filef{ph1.f90}, is used to monitor the value of $s(0)$. |
| 7331 |
Since there are two constraints, the third run requires only one free |
| 7332 |
parameter, namely $T$ ({\tt PAR(11)}). Note that, to numerical accuracy, |
| 7333 |
$T$ does not change during this run. |
| 7334 |
Alternatively one can use the free parameter $\rho$ ({\tt PAR(4)}) |
| 7335 |
in the third run. In this case, to numerical accuracy, $\rho$ does not |
| 7336 |
change during the run. |
| 7337 |
The third run terminates when {\tt PAR(9)} reached the value $30$, as |
| 7338 |
specified in the equations-file \filef{c.ph1}. |
| 7339 |
|
| 7340 |
\newpage |
| 7341 |
%============================================================================== |
| 7342 |
%DEMO=pp3====================================================================== |
| 7343 |
%============================================================================== |
| 7344 |
\section{ pp3 : Periodic Families and Loci of Hopf Points.} \label{sec:Demos_pp3} |
| 7345 |
This demo illustrates the computation of stationary solution families |
| 7346 |
that contain Hopf bifurcations, and the computation of the emanating |
| 7347 |
families of periodic solutions. In this example the periodic |
| 7348 |
solution families intersect at a secondary bifurcation point |
| 7349 |
(a branch point). It it also shown how to compute a locus of Hopf bifurcation |
| 7350 |
points in two parameters. (In this example the locus contains branch points, |
| 7351 |
which lead to another locus!) |
| 7352 |
|
| 7353 |
The equations, which model a 3D predator-prey system with harvesting |
| 7354 |
(\citename{Do:84} \citeyear{Do:84}), are |
| 7355 |
\begin{equation} \begin{array}{cl} |
| 7356 |
u_1 ' &= u_1(1-u_1) - p_4 u_1 u_2 , \\ |
| 7357 |
u_2 ' &= -p_2 u_2 + p_4 u_1 u_2 - p_5 u_2 u_3 |
| 7358 |
-p_1(1-e^{-p_6 u_2}) \\ |
| 7359 |
u_3 ' &= -p_3 u_3 + p_5 u_2 u_3 . \\\end{array} \end{equation} |
| 7360 |
The free parameter is $p_1$, while the other parameters are fixed, |
| 7361 |
namely $p_2=0.25$, $p_3=0.5$, $p_4=4$, $p_5=3$, and $p_6=5$. |
| 7362 |
However, both $p_1$ and $p_4$ are free in the computation of loci of Hopf points. |
| 7363 |
|
| 7364 |
The script in \filef{pp3.auto} first computes the bifurcation diagram |
| 7365 |
involving the stationary solutions. It finds four Hopf bifurcations. |
| 7366 |
A periodic orbit family is computed from each of these four Hopf |
| 7367 |
bifurcations. Then the second Hopf bifurcation from the first run |
| 7368 |
is continued in two parameters, also producing the other locus. |
| 7369 |
|
| 7370 |
\begin{table}[htbp] |
| 7371 |
\begin{center} |
| 7372 |
\begin{tabular}{| l | l |} |
| 7373 |
\hline |
| 7374 |
COMMAND & ACTION \\ |
| 7375 |
\hline |
| 7376 |
%============================================================================== |
| 7377 |
\commandf{mkdir pp3} & create an empty work directory \\ |
| 7378 |
\commandf{cd pp3} & change directory \\ |
| 7379 |
\commandf{@dm pp3} & copy the demo files to the work directory \\ |
| 7380 |
\hline |
| 7381 |
%============================================================================== |
| 7382 |
\commandf{auto pp3.auto } or & Run the script pp3.auto\\ |
| 7383 |
\commandf{auto('pp3.auto') } & \\ |
| 7384 |
%============================================================================== |
| 7385 |
\hline |
| 7386 |
%============================================================================== |
| 7387 |
\end{tabular} |
| 7388 |
\caption{Commands for running demo {\tt pp3}.} |
| 7389 |
\label{tbl:demo_pp3} |
| 7390 |
\end{center} |
| 7391 |
\end{table} |
| 7392 |
|
| 7393 |
\begin{table}[htbp] |
| 7394 |
\begin{center} |
| 7395 |
\begin{tabular}{| l | l |} |
| 7396 |
\hline |
| 7397 |
{\cal AUTO}-COMMAND & ACTION \\ |
| 7398 |
\hline |
| 7399 |
\commandf{@p pp3} or \commandf{@pp pp3} & \begin{minipage}{8cm}~\\ |
| 7400 |
run {\cal PLAUT/PyPLAUT} to graph the contents of {\tt b.pp3} and {\tt |
| 7401 |
s.pp3};\\ |
| 7402 |
\end{minipage} \\ |
| 7403 |
\hline |
| 7404 |
{\cal PLAUT/PyPLAUT}-COMMAND & ACTION \\ |
| 7405 |
\hline |
| 7406 |
\commandf{d2} & set convenient defaults\\ |
| 7407 |
\commandf{ax} & select axes \\ |
| 7408 |
\commandf{1 3} & select real columns 1 and 3 in {\tt b.pp3} \\ |
| 7409 |
\commandf{bd0} & plot the bifurcation diagram; $max~u_1$ versus $p_1$ \\ |
| 7410 |
\hline |
| 7411 |
\commandf{bd} & get blow-up of current bifurcation diagram \\ |
| 7412 |
\commandf{0~ 0.6 ~0~ 1.2} & enter diagram limits \\ |
| 7413 |
\hline |
| 7414 |
\commandf{d1} & choose other default settings (with labels) \\ |
| 7415 |
\commandf{bd} & another blow-up of the bifurcation diagram \\ |
| 7416 |
\commandf{0~ 0.6 ~0~ 0.75} & enter diagram limits \\ |
| 7417 |
\hline |
| 7418 |
\commandf{d2} & set defaults\\ |
| 7419 |
\commandf{2d} & enter 2D mode, for plotting labeled solutions\\ |
| 7420 |
\commandf{13 14 15 } & select these orbits from {\tt s.pp3}\\ |
| 7421 |
\commandf{d} & default orbit display; $u_1$ versus time\\ |
| 7422 |
\hline |
| 7423 |
\commandf{2 3} & select columns 2 and 3 in {\tt s.pp3} \\ |
| 7424 |
\commandf{d} & display the orbits; $u_2$ versus $u_1$\\ |
| 7425 |
\hline |
| 7426 |
\commandf{2d} & enter 2D mode, for plotting labeled solutions\\ |
| 7427 |
\commandf{16 17 18 19} & select these orbits\\ |
| 7428 |
\commandf{d} & default orbit display; $u_1$ versus time\\ |
| 7429 |
\hline |
| 7430 |
\commandf{2 3} & select columns 2 and 3 in {\tt s.pp3} \\ |
| 7431 |
\commandf{d} & phase plane display; $u_2$ versus $u_1$\\ |
| 7432 |
\hline |
| 7433 |
\commandf{2 4} & select columns 2 and 4 in {\tt s.pp3} \\ |
| 7434 |
\commandf{d} & phase plane display; $u_3$ versus $u_1$\\ |
| 7435 |
\commandf{ex} & exit from 2D mode \\ |
| 7436 |
\hline |
| 7437 |
\commandf{end} & exit from {\cal PLAUT} \\ |
| 7438 |
\hline |
| 7439 |
%============================================================================== |
| 7440 |
\end{tabular} |
| 7441 |
\caption{Plotting commands for demo {\tt pp3}.} |
| 7442 |
\label{tbl:demo_pp3_2} |
| 7443 |
\end{center} |
| 7444 |
\end{table} |
| 7445 |
|
| 7446 |
\begin{table}[htbp] |
| 7447 |
\begin{center} |
| 7448 |
\begin{tabular}{| l | l |} |
| 7449 |
\hline |
| 7450 |
{\cal AUTO}-COMMAND & ACTION \\ |
| 7451 |
\hline |
| 7452 |
\commandf{@p hb} or \commandf{@pp hb} & run {\cal PLAUT/PyPLAUT} to |
| 7453 |
graph \\ |
| 7454 |
& the contents of {\tt b.hb} and {\tt s.hb}; \\ |
| 7455 |
\hline |
| 7456 |
{\cal PLAUT/PyPLAUT}-COMMAND & ACTION \\ |
| 7457 |
\hline |
| 7458 |
\commandf{d0} & set defaults\\ |
| 7459 |
\commandf{ax} & select axes \\ |
| 7460 |
\commandf{1 6} & select real columns 1 and 6 in {\tt b.hb} \\ |
| 7461 |
\commandf{bd0} & plot the bifurcation diagram; $p_4$ versus $p_1$ \\ |
| 7462 |
\hline |
| 7463 |
\commandf{end} & exit from {\cal PLAUT} \\ |
| 7464 |
\hline |
| 7465 |
%============================================================================== |
| 7466 |
\end{tabular} |
| 7467 |
\caption{Plotting the Hopf loci for demo {\tt pp3}.} |
| 7468 |
\label{tbl:demo_pp3_3} |
| 7469 |
\end{center} |
| 7470 |
\end{table} |
| 7471 |
|
| 7472 |
|
| 7473 |
\newpage |
| 7474 |
%============================================================================== |
| 7475 |
%DEMO=tor====================================================================== |
| 7476 |
%============================================================================== |
| 7477 |
\section{ tor : Detection of Torus Bifurcations.} \label{sec:Demos_tor} |
| 7478 |
This demo uses a model in |
| 7479 |
\citename{FrRLuGaPo:93} \citeyear{FrRLuGaPo:93} |
| 7480 |
to illustrate the detection of a torus bifurcation. |
| 7481 |
It also illustrates branch switching at a secondary periodic bifurcation |
| 7482 |
with double Floquet multiplier at $z=1$. |
| 7483 |
The computational results also include folds, homoclinic orbits, |
| 7484 |
and period-doubling bifurcations. |
| 7485 |
Their continuation is not illustrated here; |
| 7486 |
see instead the demos \filef{plp}, \filef{pp2}, and \filef{pp3}, respectively. |
| 7487 |
The equations are |
| 7488 |
\begin{equation} \begin{array}{cl} |
| 7489 |
x'(t) & = \bigr[ -(\beta+\nu)x + \beta y - a_3 x^3 + b_3 (y-x)^3 \bigr] / r,\\ |
| 7490 |
y'(t) &= \beta x - (\beta + \gamma) y - z - b_3 (y-x)^3, \\ |
| 7491 |
z'(t) &= y,\end{array} \end{equation} |
| 7492 |
where $\gamma=-0.6$, $r=0.6$, $a_3=0.328578$, and $b_3=0.933578$. |
| 7493 |
Initially $\nu=-0.9$ and $\beta=0.5$. |
| 7494 |
|
| 7495 |
\begin{table}[htbp] |
| 7496 |
\begin{center} |
| 7497 |
\begin{tabular}{| l | l |} |
| 7498 |
\hline |
| 7499 |
\AUTO-COMMAND & ACTION \\ |
| 7500 |
\hline |
| 7501 |
%============================================================================== |
| 7502 |
\commandf{mkdir tor} & create an empty work directory \\ |
| 7503 |
\commandf{cd tor} & change directory \\ |
| 7504 |
\commandf{demo('tor')} & copy the demo files to the work directory \\ |
| 7505 |
\hline |
| 7506 |
%============================================================================== |
| 7507 |
\commandf{r1=run(e='tor',c='tor')} & |
| 7508 |
\parbox[t]{3in}{ |
| 7509 |
1st run; compute a stationary solution family with Hopf bifurcation |
| 7510 |
\vspace{0.2cm}}\\ |
| 7511 |
\hline |
| 7512 |
%============================================================================== |
| 7513 |
\commandf{r2=run(r1("HB1"),IPS=2,ICP=[1,11])} & |
| 7514 |
\parbox[t]{3in}{ compute a family of periodic solutions; restart from \parf{r1}. \vspace{0.2cm}} \\ |
| 7515 |
\hline |
| 7516 |
%============================================================================== |
| 7517 |
\commandf{r3=run(r2("BP1"),ISW=-1,NMX=90)} & \parbox[t]{3in}{ compute a bifurcating family of periodic solutions; restart from \parf{r2}. \vspace{0.2cm}} \\ |
| 7518 |
\commandf{save(r1+r2+r3,'1')} & save output to \filef{b.1, s.1, d.1} \\ |
| 7519 |
\hline |
| 7520 |
%============================================================================== |
| 7521 |
\end{tabular} |
| 7522 |
\caption{Commands for running demo \filef{tor}.} |
| 7523 |
\label{tbl:demo_tor} |
| 7524 |
\end{center} |
| 7525 |
\end{table} |
| 7526 |
|
| 7527 |
\newpage |
| 7528 |
%============================================================================== |
| 7529 |
%DEMO=pen====================================================================== |
| 7530 |
%============================================================================== |
| 7531 |
\section{ pen : Rotations of Coupled Pendula.} \label{sec:Demos_pen} |
| 7532 |
This demo illustrates the computation of rotations, i.e., solutions that |
| 7533 |
are periodic, modulo a phase gain of an even multiple of $\pi$. |
| 7534 |
\AUTO checks the starting data for components with such a phase gain |
| 7535 |
and, if present, it will automatically adjust the computations accordingly. |
| 7536 |
The model equations, a system of two coupled pendula, |
| 7537 |
(\citename{DoArOt:91} \citeyear{DoArOt:91}), |
| 7538 |
are given by |
| 7539 |
\begin{equation} \begin{array}{cl} |
| 7540 |
& \phi_1'' + \eps \phi_1' + \sin \phi_1 |
| 7541 |
= I + \gamma(\phi_2-\phi_1), \\ |
| 7542 |
& \phi_2'' + \eps \phi_2' + \sin \phi_2 |
| 7543 |
= I + \gamma(\phi_1-\phi_2) ,\\ |
| 7544 |
\end{array} \end{equation} |
| 7545 |
or, in equivalent first order form, |
| 7546 |
\begin{equation} \begin{array}{cl} |
| 7547 |
& \phi_1' = \psi_1, \\ |
| 7548 |
& \phi_2' = \psi_2, \\ |
| 7549 |
& \psi_1' = - \eps \psi_1 - \sin \phi_1 + I + \gamma(\phi_2-\phi_1), \\ |
| 7550 |
& \psi_2' = - \eps \psi_2 - \sin \phi_2 + I + \gamma(\phi_1-\phi_2).\\ |
| 7551 |
\end{array} \end{equation} |
| 7552 |
Throughout $\gamma=0.175$. Initially, $\eps=0.1$ and $I=0.4$. |
| 7553 |
|
| 7554 |
Numerical data representing one complete rotation are |
| 7555 |
contained in the file \filef{pen.dat}. |
| 7556 |
Each row in \filef{pen.dat} contains five real numbers, namely, |
| 7557 |
the time variable $t$, $\phi_1$, $\phi_2$, $\psi_1$ and $\psi_2$. |
| 7558 |
The correponding parameter values are defined in the user-supplied subroutine |
| 7559 |
\funcf{ STPNT}. |
| 7560 |
|
| 7561 |
Actually, in this example, a scaled time variable $t$ is given in \filef{pen.dat}. |
| 7562 |
For this reason the period (\parf{PAR(11)}) is also set in \funcf{STPNT}. |
| 7563 |
Normally \AUTO would automatically set the period according to |
| 7564 |
the data in \filef{pen.dat}. |
| 7565 |
|
| 7566 |
The \AUTO-constant \parf{dat='pen'} in \filef{c.pen.1} |
| 7567 |
causes \AUTO to start from the data in \filef{pen.dat}. |
| 7568 |
The mesh will be suitably adapted to the solution, using the number of |
| 7569 |
mesh intervals \parf{NTST} and the number of collocation point per mesh |
| 7570 |
interval \parf{NCOL} specified in the constants-file \filef{c.pen.1}. |
| 7571 |
|
| 7572 |
The first run, with $I$ as free problem parameter, |
| 7573 |
starts from the solution (here \parf{IRS=0}) in \filef{pen.dat}. |
| 7574 |
A period-doubling bifurcation is located, and the period-doubled family |
| 7575 |
is computed in the second run. |
| 7576 |
Two branch points are located, and the bifurcating |
| 7577 |
families are traced out in the third and fourth run, respectively. |
| 7578 |
The fifth run generates starting data for the subsequent computation of |
| 7579 |
a locus of period-doubling bifurcations. |
| 7580 |
The actual computation is done in the sixth run, with $\eps$ and $I$ |
| 7581 |
as free problem parameters. |
| 7582 |
|
| 7583 |
\begin{table}[htbp] |
| 7584 |
\begin{center} |
| 7585 |
\begin{tabular}{| l | l |} |
| 7586 |
\hline |
| 7587 |
\AUTO-COMMAND & ACTION \\ |
| 7588 |
\hline |
| 7589 |
%============================================================================== |
| 7590 |
\commandf{mkdir pen} & create an empty work directory \\ |
| 7591 |
\commandf{cd pen} & change directory \\ |
| 7592 |
\commandf{demo('pen')} & copy the demo files to the work directory \\ |
| 7593 |
\hline |
| 7594 |
%============================================================================== |
| 7595 |
\commandf{pen=run('pen',c='pen.1')} & \parbox[t]{3in}{ |
| 7596 |
locate a period doubling bifurcation; restart from \filef{pen.dat}} \\ |
| 7597 |
\hline |
| 7598 |
%============================================================================== |
| 7599 |
\commandf{pen=pen+run(pen('PD1'),c='pen.2')} & \parbox[t]{3in}{ a |
| 7600 |
family of period-doubled (and out-of-phase) rotations. |
| 7601 |
Constants changed : \parf{IPS, NTST, ISW, NMX} \\ |
| 7602 |
append output to bifurcation diagram object \filef{pen}} \\ |
| 7603 |
\hline |
| 7604 |
%============================================================================== |
| 7605 |
\commandf{pen=pen+run(pen('BP1'),c='pen.3')} & \parbox[t]{3in}{ a secondary bifurcating family (without bifurcation detection). Constants changed : \parf{IRS, ISP} \\ |
| 7606 |
append output to bifurcation diagram object \filef{pen}} \\ |
| 7607 |
\hline |
| 7608 |
%============================================================================== |
| 7609 |
\commandf{pen=pen+run(pen('BP2'),c='pen.4')} & \parbox[t]{3in}{ |
| 7610 |
another secondary bifurcating family (without bifurcation |
| 7611 |
detection). Constants changed : \parf{IRS}\\ |
| 7612 |
append output to bifurcation diagram object \filef{pen} |
| 7613 |
\vspace{0.2cm}}\\ |
| 7614 |
\commandf{save(pen,'pen')} & save \parf{pen} to output-files \filef{b.pen, s.pen, d.pen} \\ |
| 7615 |
|
| 7616 |
\hline |
| 7617 |
%============================================================================== |
| 7618 |
\commandf{t=run(pen('PD1'),c='pen.5')} & \parbox[t]{3in}{ generate starting data for period doubling continuation. Constants changed : \parf{IRS, ICP, ICP, ISW, NMX} \vspace{0.2cm}} \\ |
| 7619 |
\hline |
| 7620 |
%============================================================================== |
| 7621 |
\commandf{pd=run(t,sv='pd')} & \parbox[t]{3in}{ compute a locus of period doubling bifurcations; restart from \parf{t}. Constants changed : \parf{IRS} \vspace{0.2cm}} \\ |
| 7622 |
& save output-files as \filef{b.pd, s.pd, d.pd} \\ |
| 7623 |
%\hline |
| 7624 |
%============================================================================== |
| 7625 |
%% \commandf{@pn pen} & run an animation program to view the solutions in \filef{s.pen} \\ |
| 7626 |
%% & (on SGI machines only; see also the file \filef{auto/07p/pendula/README}). |
| 7627 |
% \\ |
| 7628 |
\hline |
| 7629 |
%============================================================================== |
| 7630 |
\end{tabular} |
| 7631 |
\caption{Commands for running demo \filef{pen}.} |
| 7632 |
\label{tbl:demo_pen} |
| 7633 |
\end{center} |
| 7634 |
\end{table} |
| 7635 |
|
| 7636 |
\newpage |
| 7637 |
%============================================================================== |
| 7638 |
%DEMO=chu====================================================================== |
| 7639 |
%============================================================================== |
| 7640 |
\section{ chu : A Non-Smooth System (Chua's Circuit).} \label{sec:Demos_chu} |
| 7641 |
Chua's circuit |
| 7642 |
is one of the simplest electronic devices to exhibit complex behavior. |
| 7643 |
For related calculations see |
| 7644 |
\citename{KhRoCh:93} \citeyear{KhRoCh:93}. |
| 7645 |
The equations modeling the circuit are |
| 7646 |
\begin{equation} \begin{array}{cl} |
| 7647 |
u_1' &= \alpha \bigl[~ u_2 - h(u_1) ~\bigr]~,\\ |
| 7648 |
u_2' &= u_1 - u_2 + u_3~, \\ |
| 7649 |
u_3' &= - \beta~ u_2~, |
| 7650 |
\end{array} \end{equation} |
| 7651 |
where |
| 7652 |
$$ h(x) = a_1 x + \frac{1}{2}~ (a_0 - a_1) ~ |
| 7653 |
\bigl\{ \abs{x+1} - \abs{x-1} \bigr\}~,$$ |
| 7654 |
and where we take |
| 7655 |
$\beta = 14.3$, $a_0 = - 1/7$, $a_1 = 2/7$. |
| 7656 |
|
| 7657 |
Note that $h(x)$ is not a smooth function, and hence the solution |
| 7658 |
to the equations may have non-smooth derivatives. |
| 7659 |
However, for the orthogonal collocation method to attain its optimal accuracy, |
| 7660 |
it is necessary that the solution be sufficiently smooth. |
| 7661 |
Moreover, the adaptive mesh selection strategy will fail |
| 7662 |
if the solution or one of its lower order derivatives has discontinuities. |
| 7663 |
For these reasons we use the smooth approximation |
| 7664 |
$$ \abs{x} ~\approx~ \frac{2 x}{\pi } ~ {\rm arctan}(Kx),$$ |
| 7665 |
which get better as $K$ increases. |
| 7666 |
In the numerical calculations below we use $K = 10$. |
| 7667 |
The free parameter is $\alpha$. |
| 7668 |
|
| 7669 |
|
| 7670 |
\begin{table}[htbp] |
| 7671 |
\begin{center} |
| 7672 |
\begin{tabular}{| l | l |} |
| 7673 |
\hline |
| 7674 |
\AUTO-COMMAND & ACTION \\ |
| 7675 |
\hline |
| 7676 |
%============================================================================== |
| 7677 |
\commandf{mkdir chu} & create an empty work directory \\ |
| 7678 |
\commandf{cd chu} & change directory \\ |
| 7679 |
\commandf{demo('chu')} & copy the demo files to the work directory \\ |
| 7680 |
\hline |
| 7681 |
%============================================================================== |
| 7682 |
\commandf{r1=run(e='chu',c='chu')} & 1st run; stationary solutions \\ |
| 7683 |
\hline |
| 7684 |
%============================================================================== |
| 7685 |
\commandf{r2=run(r1("HB1"),IPS=2,ICP=[1,11])} & \parbox[t]{3in}{ 2nd run; periodic solutions, with detection of period-doubling. \vspace{0.2cm}} \\ |
| 7686 |
\commandf{save(r1+r2,'chu')} & save all output to \filef{b.chu, s.chu, d.chu} \\ |
| 7687 |
\hline |
| 7688 |
%============================================================================== |
| 7689 |
\end{tabular} |
| 7690 |
\caption{Commands for running demo \filef{chu}.} |
| 7691 |
\label{tbl:demo_chu} |
| 7692 |
\end{center} |
| 7693 |
\end{table} |
| 7694 |
|
| 7695 |
\newpage |
| 7696 |
%============================================================================== |
| 7697 |
%DEMO=phs====================================================================== |
| 7698 |
%============================================================================== |
| 7699 |
\section{ phs : Effect of the Phase Condition.} \label{sec:Demos_phs} |
| 7700 |
This demo illustrates the effect of the phase condition |
| 7701 |
on the computation of periodic solutions. |
| 7702 |
We consider the differential equation |
| 7703 |
\begin{equation} \begin{array}{cl} |
| 7704 |
u_1'&= \lambda u_1 - u_2, \\ |
| 7705 |
u_2'&= u_1 (1-u_1) . \\ |
| 7706 |
\end{array} \end{equation} |
| 7707 |
This equation has a Hopf bifurcation from the trivial solution at $\lambda=0$. |
| 7708 |
The bifurcating family of periodic solutions |
| 7709 |
is vertical and along it the period increases monotonically. |
| 7710 |
The family terminates in a homoclinic orbit containing the |
| 7711 |
saddle point $(u_1,u_2)=(1,0)$. |
| 7712 |
Graphical inspection of the computed periodic orbits, |
| 7713 |
for example $u_1$ versus the scaled time variable $t$, |
| 7714 |
shows how the phase condition has the effect of keeping the ``peak'' |
| 7715 |
in the solution in the same location. |
| 7716 |
|
| 7717 |
\begin{table}[htbp] |
| 7718 |
\begin{center} |
| 7719 |
\begin{tabular}{| l | l |} |
| 7720 |
\hline |
| 7721 |
\AUTO-COMMAND & ACTION \\ |
| 7722 |
\hline |
| 7723 |
%============================================================================== |
| 7724 |
\commandf{mkdir phs} & create an empty work directory \\ |
| 7725 |
\commandf{cd phs} & change directory \\ |
| 7726 |
\commandf{demo('phs')} & copy the demo files to the work directory \\ |
| 7727 |
\hline |
| 7728 |
%============================================================================== |
| 7729 |
\commandf{r1=run(e='phs',c='phs.1')} & detect Hopf bifurcation \\ |
| 7730 |
\hline |
| 7731 |
%============================================================================== |
| 7732 |
\commandf{r2=run(r1('HB1'),c='phs.2')} & \parbox[t]{3in}{ compute periodic solutions. Constants changed : \parf{IRS, IPS, NPR} \vspace{0.2cm}} \\ |
| 7733 |
\commandf{save(r1+r2,'phs')} & save output to \filef{b.phs, s.phs, d.phs} \\ |
| 7734 |
\hline |
| 7735 |
%============================================================================== |
| 7736 |
\end{tabular} |
| 7737 |
\caption{Commands for running demo \filef{phs}.} |
| 7738 |
\label{tbl:demo_phs} |
| 7739 |
\end{center} |
| 7740 |
\end{table} |
| 7741 |
|
| 7742 |
\newpage |
| 7743 |
%============================================================================== |
| 7744 |
%DEMO=ivp====================================================================== |
| 7745 |
%============================================================================== |
| 7746 |
\section{ ivp : Time Integration with Euler's Method.} \label{sec:Demos_ivp} |
| 7747 |
This demo uses Euler's method to locate a stationary solution of the |
| 7748 |
following predator-prey system with harvesting~: |
| 7749 |
|
| 7750 |
\begin{equation} \begin{array}{cl} |
| 7751 |
u_1 ' &= p_2 u_1 (1 - u_1 ) - u_1 u_2 - p_1 (1-e^{-p_3 u_1}) ,\\ |
| 7752 |
u_2 ' &= -u_2 + p_4 u_1 u_2 ,\\\end{array} \end{equation} |
| 7753 |
where all problem parameters have a fixed value. |
| 7754 |
The equations are the same as those in demo \filef{pp2}. |
| 7755 |
The continuation parameter is the independent time variable, namely \parf{PAR(14)}. |
| 7756 |
|
| 7757 |
Note that Euler time integration is only first order accurate, so that |
| 7758 |
the time step must be sufficiently small to ensure correct results. |
| 7759 |
Indeed, this option has been added only as a convenience, and should |
| 7760 |
generally be used only to locate stationary states. |
| 7761 |
Note that the \AUTO-constants \parf{DS}, \parf{DSMIN}, and \parf{DSMAX} |
| 7762 |
control the step size |
| 7763 |
in the space consisting of time, here \parf{PAR(14)}, and the state vector, |
| 7764 |
here $(u_1,u_2)$. |
| 7765 |
|
| 7766 |
\begin{table}[htbp] |
| 7767 |
\begin{center} |
| 7768 |
\begin{tabular}{| l | l |} |
| 7769 |
\hline |
| 7770 |
\AUTO-COMMAND & ACTION \\ |
| 7771 |
\hline |
| 7772 |
%============================================================================== |
| 7773 |
\commandf{mkdir ivp} & create an empty work directory \\ |
| 7774 |
\commandf{cd ivp} & change directory \\ |
| 7775 |
\commandf{demo('ivp')} & copy the demo files to the work directory \\ |
| 7776 |
\hline |
| 7777 |
%============================================================================== |
| 7778 |
\commandf{r1=run(e='ivp',c='ivp')} & time integration \\ |
| 7779 |
\commandf{save(r1,'ivp')} & save output-files as \filef{b.ivp, s.ivp, d.ivp} \\ |
| 7780 |
\hline |
| 7781 |
%============================================================================== |
| 7782 |
\end{tabular} |
| 7783 |
\caption{Commands for running demo \filef{ivp}.} |
| 7784 |
\label{tbl:demo_ivp} |
| 7785 |
\end{center} |
| 7786 |
\end{table} |
| 7787 |
|
| 7788 |
|
| 7789 |
\newpage |
| 7790 |
%============================================================================== |
| 7791 |
%DEMO=r3b====================================================================== |
| 7792 |
%============================================================================== |
| 7793 |
\section{ r3b : The Circular Restricted 3-Body Problem (CR3BP).} \label{sec:Demo_r3b} |
| 7794 |
|
| 7795 |
This demo computes periodic solutions and two-dimensional unstable |
| 7796 |
manifolds of those periodic solutions in the restricted three body |
| 7797 |
problem: |
| 7798 |
\begin{align*} |
| 7799 |
\dot x &= x_p\\ |
| 7800 |
\dot y &= y_p\\ |
| 7801 |
\dot z &= z_p\\ |
| 7802 |
\dot x_p&= 2y_p+x-(1-\mu)\frac{x+\mu}{{d_E}^3}-\mu\frac{x-1+\mu}{{d_M}^3}+lx_p\\ |
| 7803 |
\dot y_p &= -2x_p +y - (1-\mu)\frac{y}{{d_E}^3} - \mu\frac{y}{{d_M}^3} + l y_p\\ |
| 7804 |
\dot z_p &= -(1-\mu)\frac{z}{{d_E}^3} - \mu\frac{z}{{d_M}^3} + l z_p |
| 7805 |
\end{align*} |
| 7806 |
where $d_E=\sqrt{(x+\mu)^2+y^2+z^2}$ and $d_M=\sqrt{(x-1+\mu)^2+y^2+z^2}$. |
| 7807 |
Here $l\ne 0$ breaks the conservativeness of the system. In general, |
| 7808 |
continuations involve $l$ as a parameter, and $l$ will then |
| 7809 |
approximately stay at zero. |
| 7810 |
|
| 7811 |
\subsection{Computation of Periodic Solutions of the CR3BP} |
| 7812 |
|
| 7813 |
Running the Python script \filef{r3b.auto} will generate the families of periodic |
| 7814 |
solutions L1, H1, and V1, for the case of the mass-ratio $\mu=0.063$: |
| 7815 |
\begin{center} |
| 7816 |
\begin{tabular}{l | l } |
| 7817 |
\commandf{auto r3b.auto} & \commandf{auto('r3b.auto')} \\ |
| 7818 |
\end{tabular} |
| 7819 |
\end{center} |
| 7820 |
where, as in the following examples, the left hand side command can be used |
| 7821 |
at the shell prompt, and the right hand side command at the Python CLUI |
| 7822 |
prompt. Note that the commands starting with @ work in both interfaces, |
| 7823 |
but cannot be used in the expert scripts with a .py suffix. |
| 7824 |
|
| 7825 |
For example, the data generated for the Lyapunov family L1 will |
| 7826 |
consist of |
| 7827 |
\begin{center} |
| 7828 |
\begin{tabular}{l l} |
| 7829 |
\filef{b.L1} & the bifurcation diagram data \\ |
| 7830 |
\filef{s.L1} & a selection of periodic orbits \\ |
| 7831 |
\filef{d.L1} & diagnostic data, including Floquet multipliers \\ |
| 7832 |
\end{tabular} |
| 7833 |
\end{center} |
| 7834 |
The necessary labeled starting solutions are first computed and stored |
| 7835 |
in the file \filef{s.start}. |
| 7836 |
Each starting solution is an equilibrium (``libration |
| 7837 |
point''), and its data also contains the period of a bifurcating family of |
| 7838 |
periodic orbits. |
| 7839 |
|
| 7840 |
The Table below shows the label of each of the starting solutions in |
| 7841 |
s.start, indicating which libration point it corresponds to, and which |
| 7842 |
family of periodic orbits it will generate: |
| 7843 |
\begin{center} |
| 7844 |
\begin{tabular}{| l | l | l |} |
| 7845 |
\hline |
| 7846 |
Label& Libration Pt. &Family \\ |
| 7847 |
\hline |
| 7848 |
1 & L1 & L1 \\ |
| 7849 |
2 & L1 & V1 \\ |
| 7850 |
3 & L2 & L2 \\ |
| 7851 |
4 & L2 & V2 \\ |
| 7852 |
5 & L3 & L3 \\ |
| 7853 |
6 & L3 & V3 \\ |
| 7854 |
7 & L4 & V4 \\ |
| 7855 |
8 & L5 & V5 \\ |
| 7856 |
\hline |
| 7857 |
\end{tabular} |
| 7858 |
\end{center} |
| 7859 |
Note (by looking at the constant-files \filef{c.r3b.*}) that actually only the |
| 7860 |
starting solutions labeled 1 and 2 are used in the current calculations, |
| 7861 |
as executed by the Python script. |
| 7862 |
|
| 7863 |
Starting solution for other values of $\mu$ can be generated using the script |
| 7864 |
\filef{compute\_lps.py}, for instance by running |
| 7865 |
\begin{center} |
| 7866 |
\begin{tabular}{l | l} |
| 7867 |
\commandf{autox compute\_lps.py 0.05} & \commandf{import compute\_lps} \\ |
| 7868 |
& \commandf{compute\_lps.compute(0.05)} \\ |
| 7869 |
\end{tabular} |
| 7870 |
\end{center} |
| 7871 |
After that, it is necessary to run \filef{r3b.auto} again to regenerate the |
| 7872 |
families. |
| 7873 |
|
| 7874 |
The demos L1a, H1a, H1b, H1c, V1a, V1b can be run subsequent to the r3b |
| 7875 |
demo to compute 2D unstable manifolds of selected periodic orbits that |
| 7876 |
belong to the L1, V1, and H1 families. |
| 7877 |
|
| 7878 |
\subsection{Computing Unstable Manifolds of Periodic Orbits in the CR3BP} |
| 7879 |
|
| 7880 |
Instructions for computing 2-d unstable manifolds of periodic orbits |
| 7881 |
in the Circular Restricted 3-Body Problem (CR3BP) using AUTO-07p. |
| 7882 |
|
| 7883 |
\subsubsection{The instructions below are for the Halo family L1 in AUTO demo L1a.} |
| 7884 |
|
| 7885 |
Instructions for computing 2-d unstable manifolds of other periodic |
| 7886 |
orbits in the CR3BP are similar (Demos H1a, H1b, H1c, V1a, V1b), and |
| 7887 |
are given after these instructions. |
| 7888 |
|
| 7889 |
Select a labeled solution which has exactly one Floquet multiplier with |
| 7890 |
absolute value greater than 1. (Floquet multipliers can be found in the file |
| 7891 |
\filef{d.L1} generated by demo r3b.) Enter the label of the periodic solution |
| 7892 |
in the file \filef{L1a.auto} at {\tt label=} in \filef{L1a.auto}. Also enter |
| 7893 |
the size of the |
| 7894 |
initial step into the direction of the unstable manifold there at {\tt step=}. |
| 7895 |
Note that representative values of these three quantities have already |
| 7896 |
been entered there.\\ |
| 7897 |
Now run the Python script \filef{L1a.auto}: |
| 7898 |
\begin{center} |
| 7899 |
\begin{tabular}{ l | l } |
| 7900 |
\commandf{auto L1a.auto} & \commandf{auto('L1a.auto')} |
| 7901 |
\end{tabular} |
| 7902 |
\end{center} |
| 7903 |
This will run \filef{r3b.auto} as above if this was not already done. |
| 7904 |
|
| 7905 |
Through various computational steps the execution of the Python script |
| 7906 |
will result in AUTO files \filef{b.L1a}, \filef{s.L1a}, and |
| 7907 |
\filef{d.L1a}, where the orbits in |
| 7908 |
\filef{s.L1a} constitute the manifold, which can be viewed with the graphics |
| 7909 |
program \commandf{plaut04} or \commandf{r3bplaut04}: |
| 7910 |
\begin{center} |
| 7911 |
\begin{tabular}{ l | l } |
| 7912 |
\commandf{@pl L1a} or \commandf{@r3b L1a} & \commandf{plot3('L1a',r3b=True)} |
| 7913 |
\end{tabular} |
| 7914 |
\end{center} |
| 7915 |
The various steps executed by the Python commands in the script file |
| 7916 |
\filef{L1a.auto} are explained below in Tables~\ref{tbl:demo_l1a1} and |
| 7917 |
\ref{tbl:demo_l1a2}, which also show |
| 7918 |
the equivalent Unix shell versions of these AUTO commands. |
| 7919 |
|
| 7920 |
The Python script \filef{L1aX.auto} does the same as |
| 7921 |
\filef{L1a.auto}, but with |
| 7922 |
additional calculations that generate additional AUTO data files, e.g., |
| 7923 |
to detect heteroclinic connections. Some of these additional runs take |
| 7924 |
quite a bit of CPU time and generate big data files. |
| 7925 |
|
| 7926 |
\begin{table}[htbp] |
| 7927 |
\begin{center} |
| 7928 |
\begin{tabular}{|l|l|} |
| 7929 |
\hline |
| 7930 |
\commandf{mkdir r3b} & \commandf{mkdir r3b} \\ |
| 7931 |
\commandf{cd r3b} & \commandf{cd r3b} \\ |
| 7932 |
\commandf{@dm r3b} & \commandf{demo('r3b')} \\ |
| 7933 |
\multicolumn{2}{|l|}{Copy the r3b demo to the local directory r3b.}\\ |
| 7934 |
\hline |
| 7935 |
|
| 7936 |
\commandf{auto r3b.auto} & \commandf{auto('r3b.auto')} \\ |
| 7937 |
\multicolumn{2}{|l|}{Generate the CR3BP AUTO data files.} \\ |
| 7938 |
\hline |
| 7939 |
|
| 7940 |
\commandf{autox ext.py L1 3 -1e-5} & \commandf{import ext} \\ |
| 7941 |
& \commandf{sext=ext.get('L1',3,-1e-5)} \\ |
| 7942 |
\multicolumn{2}{|p{7in}|}{ |
| 7943 |
Convert the data for a selected labeled solution from |
| 7944 |
\filef{s.L1}, |
| 7945 |
adding a zero adjoint variable. The solution label is 3, |
| 7946 |
and the initial step size into the unstable manifold |
| 7947 |
is $-10^{-5}$. |
| 7948 |
The \filef{ext.py} script looks for the relevant |
| 7949 |
Floquet multiplier in |
| 7950 |
\filef{d.L1}. The converted solution will be written in the |
| 7951 |
file \filef{s.ext} or stored in \parf{sext}.}\\ |
| 7952 |
\hline |
| 7953 |
|
| 7954 |
\commandf{@r flq ext} & \commandf{flq=run(sext,c='flq',e='flq')} \\ |
| 7955 |
\multicolumn{2}{|p{7in}|}{ |
| 7956 |
Compute the Floquet eigenfunction. Free scalar variables in |
| 7957 |
this run (see \filef{c.flq}) are: |
| 7958 |
|
| 7959 |
\begin{tabular}{l@{=}l} |
| 7960 |
\parf{PAR(1)} & unfolding parameter \\ |
| 7961 |
\parf{PAR(4)} & multiplier\\ |
| 7962 |
\parf{PAR(5)} & norm of eigenfunction\\ |
| 7963 |
\end{tabular} |
| 7964 |
|
| 7965 |
If this run is successful then \filef{PAR(5)} |
| 7966 |
should become nonzero, |
| 7967 |
in fact, \filef{PAR(5)} should reach the value 1. |
| 7968 |
If the run is not successful then see REMARK 1 below.}\\ |
| 7969 |
\hline |
| 7970 |
|
| 7971 |
\commandf{@sv flq} & \commandf{save(flq,'flq')} \\ |
| 7972 |
\multicolumn{2}{|l|}{ |
| 7973 |
Save the results in \filef{b.flq}, \filef{s.flq}, and |
| 7974 |
\filef{d.flq}.}\\ |
| 7975 |
\hline |
| 7976 |
|
| 7977 |
\commandf{autox data.py} & \commandf{import data} \\ |
| 7978 |
& \commandf{startman=data.get(flq('UZ1'))} \\ |
| 7979 |
\multicolumn{2}{|p{7in}|}{ |
| 7980 |
Extract data for a selected orbit from \filef{s.flq}. |
| 7981 |
These data |
| 7982 |
are for both the orbit and its Floquet eigenfunction. It |
| 7983 |
is assumed that \filef{s.flq} |
| 7984 |
contains only one labeled solution, |
| 7985 |
with label 2. If you did the ``optional'' computation (see |
| 7986 |
Remark 2) you may need to change the label of the |
| 7987 |
restart solution:}\\ |
| 7988 |
\commandf{autox data.py flq n} & \commandf{startman=data.get(flq(n))} \\ |
| 7989 |
\multicolumn{2}{|p{7in}|}{ |
| 7990 |
where $n$ is the different label number. |
| 7991 |
The extracted data may be saved in a file called |
| 7992 |
\filef{s.startman}, |
| 7993 |
which contains a new starting solution that can be |
| 7994 |
used as a base for the manifold computations. |
| 7995 |
The orbit coordinates are at |
| 7996 |
``time zero'', and the Floquet eigenfunction |
| 7997 |
are saved at \parf{PAR(25:30)} and \parf{PAR(31:36)}, |
| 7998 |
respectively.}\\ |
| 7999 |
\hline |
| 8000 |
|
| 8001 |
\commandf{@R man L1a.0 startman}& \commandf{startL1a = run(startman,e='man',c='man.L1a.0')} \\ |
| 8002 |
\multicolumn{2}{|p{7in}|}{ |
| 8003 |
This step does a time integration using continuation in the |
| 8004 |
``period'' $T$, i.e., \parf{PAR(11)}, which here is |
| 8005 |
the |
| 8006 |
``integration time''. |
| 8007 |
The labeled solutions from this run all correspond |
| 8008 |
to the same orbit, except that the orbit gets longer and |
| 8009 |
longer. The starting point of the orbit is the point on the |
| 8010 |
periodic orbit at ``time zero'' plus a small distance |
| 8011 |
($\varepsilon$) |
| 8012 |
into the direction of the unstable manifold. In \AUTO, |
| 8013 |
$\varepsilon$ |
| 8014 |
corresponds to |
| 8015 |
\parf{PAR(6)}. This parameter $\varepsilon$ is initialized |
| 8016 |
via the script \filef{ext.py}. |
| 8017 |
(The sign of $\varepsilon$ is significant!) |
| 8018 |
The parameters in this run (see \filef{c.man.L1a.0}) are: |
| 8019 |
|
| 8020 |
\begin{tabular}{l@{=}lll@{=}l} |
| 8021 |
\parf{PAR(3)} & energy & & |
| 8022 |
\parf{PAR(21)} & $x$-coordinate at end point\\ |
| 8023 |
\parf{PAR(11)} & integration time & & |
| 8024 |
\parf{PAR(22)} & $y$-coordinate at end point\\ |
| 8025 |
\parf{PAR(12)} & length of the orbit & & |
| 8026 |
\parf{PAR(23)} & $z$-coordinate at end point |
| 8027 |
\end{tabular} |
| 8028 |
}\\ |
| 8029 |
\hline |
| 8030 |
|
| 8031 |
\commandf{@sv startL1a} & \commandf{save(startL1a,'startL1a')} \\ |
| 8032 |
\multicolumn{2}{|l|}{ |
| 8033 |
Save the results in \filef{b.startL1a}, \filef{s.startL1a}, |
| 8034 |
and \filef{d.startL1a}. |
| 8035 |
}\\ |
| 8036 |
\hline |
| 8037 |
\end{tabular} |
| 8038 |
\end{center} |
| 8039 |
\caption{Detailed AUTO shell and Python commands for the L1a demo |
| 8040 |
(part 1).} |
| 8041 |
\label{tbl:demo_l1a1} |
| 8042 |
\end{table} |
| 8043 |
|
| 8044 |
|
| 8045 |
\begin{table}[htbp] |
| 8046 |
\begin{center} |
| 8047 |
\begin{tabular}{|l|l|} |
| 8048 |
\hline |
| 8049 |
\commandf{@R man L1a.1 startL1a} & \commandf{L1a=run(startL1a,c='man.L1a.1')} \\ |
| 8050 |
\multicolumn{2}{|p{7in}|}{ |
| 8051 |
Look at \filef{c.man.L1a.1} to see from which label in |
| 8052 |
\filef{s.startL1a} this |
| 8053 |
run starts. In this run the y-coordinate of the end point |
| 8054 |
(\parf{PAR(22)}) is kept fixed, |
| 8055 |
while the ``period'' (\parf{PAR(11)}), |
| 8056 |
i.e., the total integration time, is allowed to vary, as |
| 8057 |
is the value of epsilon, i.e., \parf{PAR(6)}. |
| 8058 |
Note that if \parf{PAR(6)} |
| 8059 |
becomes ``large'' then the manifold may no longer be accurate. |
| 8060 |
The free parameters in this run are: |
| 8061 |
|
| 8062 |
\begin{tabular}{l@{=}lll@{=}l} |
| 8063 |
\parf{PAR(3)} & energy & & |
| 8064 |
\parf{PAR(12)} & length of the orbit \\ |
| 8065 |
\parf{PAR(6)} & ``starting distance'' & & |
| 8066 |
\parf{PAR(21)} & $x$-coordinate at end point \\ |
| 8067 |
\parf{PAR(11)} & integration time & & |
| 8068 |
\parf{PAR(23)} & $z$-coordinate at end point |
| 8069 |
\end{tabular} |
| 8070 |
}\\ |
| 8071 |
\hline |
| 8072 |
|
| 8073 |
\commandf{@sv L1a} & \commandf{save(L1a,'L1a')} \\ |
| 8074 |
|
| 8075 |
\multicolumn{2}{|l|}{ |
| 8076 |
Save the results in \filef{b.L1a}, \filef{s.L1a}, and \filef{d.L1a}. |
| 8077 |
}\\ |
| 8078 |
\hline |
| 8079 |
|
| 8080 |
\commandf{@R man L1a.2 startL1a} & |
| 8081 |
\commandf{L1a2=run(startL1a,c='man.L1a.2')} \\ |
| 8082 |
\multicolumn{2}{|p{7in}|}{ |
| 8083 |
Another run, starting from a longer initial orbit, which |
| 8084 |
computes part of the manifold. The free parameters are the |
| 8085 |
same as in the preceding run. This computation results in |
| 8086 |
the orbit winding around the selected periodic L1 |
| 8087 |
orbit. |
| 8088 |
}\\ |
| 8089 |
\hline |
| 8090 |
\commandf{@sv L1a2} & \commandf{save(L1a2,'L1a2')} \\ |
| 8091 |
|
| 8092 |
\multicolumn{2}{|l|}{ |
| 8093 |
Save the results in \filef{b.L1a2}, \filef{s.L1a2}, |
| 8094 |
and |
| 8095 |
\filef{d.L1a2} .}\\ |
| 8096 |
\hline |
| 8097 |
\end{tabular} |
| 8098 |
\end{center} |
| 8099 |
\caption{Detailed AUTO shell and Python commands for the L1a demo |
| 8100 |
(part 2).} |
| 8101 |
\label{tbl:demo_l1a2} |
| 8102 |
\end{table} |
| 8103 |
|
| 8104 |
\noindent Use |
| 8105 |
\begin{center} |
| 8106 |
\begin{tabular}{ l | l } |
| 8107 |
\commandf{auto clean.auto} & \commandf{auto('clean.auto')}\\ |
| 8108 |
\end{tabular} |
| 8109 |
\end{center} |
| 8110 |
to remove all generated files. |
| 8111 |
|
| 8112 |
\noindent\textbf{REMARK 1}\\ |
| 8113 |
If the run to compute the Floquet eigenfunction is not successful, i.e., if |
| 8114 |
\parf{PAR(5)} does not become nonzero, |
| 8115 |
then try to compute the Floquet eigenfunction |
| 8116 |
in more stages, as in Table~\ref{tbl:demo_r3b_remark1}. |
| 8117 |
|
| 8118 |
\begin{table}[htbp] |
| 8119 |
\begin{center} |
| 8120 |
\begin{tabular}{|l|l|} |
| 8121 |
\hline |
| 8122 |
\multicolumn{2}{|p{7in}|}{ |
| 8123 |
Give the label of the selected solution, and a value that |
| 8124 |
is smaller than the associated Floquet multiplier (magnitude |
| 8125 |
greater than 1) .}\\ |
| 8126 |
\commandf{autox ext.py L1 3 -1e-5 2000} & \commandf{import ext} \\ |
| 8127 |
& \commandf{sext=ext.get('L1',3,-1e-5,2000)} \\ |
| 8128 |
\hline |
| 8129 |
\commandf{@R flq 2 ext} & \commandf{flq=run(sext,c='flq.2',e='flq')} \\ |
| 8130 |
|
| 8131 |
\multicolumn{2}{|p{7in}|}{ |
| 8132 |
Continue the approximate multiplier; If all goes well then |
| 8133 |
the actual multiplier will be detected as a branch point |
| 8134 |
(BP) with Label 2. Free scalar variables in this run are: |
| 8135 |
|
| 8136 |
\begin{tabular}{l@{=}l} |
| 8137 |
\parf{PAR(1)} & unfolding parameter \\ |
| 8138 |
\parf{PAR(4)} & multiplier\\ |
| 8139 |
\parf{PAR(5)} & norm of eigenfunction |
| 8140 |
\end{tabular}}\\ |
| 8141 |
\hline |
| 8142 |
|
| 8143 |
\commandf{@sv flq} & \commandf{save(flq,'flq')} \\ |
| 8144 |
\hline |
| 8145 |
\commandf{@R flq 3} & \commandf{flq=run(flq,e='flq',c='flq.3')} \\ |
| 8146 |
|
| 8147 |
\multicolumn{2}{|p{7in}|}{ |
| 8148 |
Switch branches at the BP, thereby generating the nonzero |
| 8149 |
Floquet eigenfunction. The free scalar variables are : |
| 8150 |
|
| 8151 |
\begin{tabular}{l@{=}l} |
| 8152 |
\parf{PAR(1)} & unfolding parameter \\ |
| 8153 |
\parf{PAR(4)} & multiplier\\ |
| 8154 |
\parf{PAR(5)} & norm of eigenfunction |
| 8155 |
\end{tabular} |
| 8156 |
|
| 8157 |
If all goes well then \parf{PAR(5)} should become |
| 8158 |
nonzero, and the |
| 8159 |
corresponding solution should have Label 4. |
| 8160 |
}\\ |
| 8161 |
\hline |
| 8162 |
\commandf{@sv flq} & \commandf{save(flq,'flq')}\\ |
| 8163 |
\hline |
| 8164 |
\end{tabular} |
| 8165 |
\end{center} |
| 8166 |
\caption{Detailed AUTO shell and Python commands for Remark 1.} |
| 8167 |
\label{tbl:demo_r3b_remark1} |
| 8168 |
\end{table} |
| 8169 |
|
| 8170 |
\noindent\textbf{REMARK 2}\\ |
| 8171 |
One can also follow the orbit, its multiplier and eigenfunction, as in |
| 8172 |
Table~\ref{tbl:demo_r3b_remark2}. |
| 8173 |
|
| 8174 |
\begin{table}[htbp] |
| 8175 |
\begin{center} |
| 8176 |
\begin{tabular}{|l|l|} |
| 8177 |
\hline |
| 8178 |
\commandf{@R flq 4} & \commandf{flq=run(flq,e='flq',c='flq.4')}\\ |
| 8179 |
\multicolumn{2}{|p{7in}|}{ |
| 8180 |
Free scalar variables in this run are |
| 8181 |
|
| 8182 |
\begin{tabular}{l@{=}l} |
| 8183 |
\parf{PAR(1)} & unfolding parameter \\ |
| 8184 |
\parf{PAR(4)} & multiplier \\ |
| 8185 |
\parf{PAR(11)} & period \\ |
| 8186 |
\end{tabular} |
| 8187 |
|
| 8188 |
The norm, \parf{PAR(5)}, of the eigenfunction is fixed in |
| 8189 |
this run. |
| 8190 |
}\\ |
| 8191 |
\hline |
| 8192 |
\commandf{@sv flq} & \commandf{save(flq,'flq')}\\ |
| 8193 |
\hline |
| 8194 |
\end{tabular} |
| 8195 |
\end{center} |
| 8196 |
\caption{Detailed AUTO shell and Python commands for Remark 2.} |
| 8197 |
\label{tbl:demo_r3b_remark2} |
| 8198 |
\end{table} |
| 8199 |
|
| 8200 |
\subsubsection{The instructions below are for the Halo family H1 in AUTO demo H1a.} |
| 8201 |
|
| 8202 |
Follow the instructions for L1a above, where you replace L by H throughout, |
| 8203 |
for instance you can run everything in one go using |
| 8204 |
\begin{center} |
| 8205 |
\begin{tabular}{l|l} |
| 8206 |
\commandf{auto H1a.auto} & \commandf{auto('H1a.auto')} \\ |
| 8207 |
\end{tabular} |
| 8208 |
\end{center} |
| 8209 |
or with the extra calculations: |
| 8210 |
\begin{center} |
| 8211 |
\begin{tabular}{l|l} |
| 8212 |
\commandf{auto H1aX.auto} & \commandf{auto('H1aX.auto')} \\ |
| 8213 |
\end{tabular} |
| 8214 |
\end{center} |
| 8215 |
The Floquet eigenfunction is now computed from label 7 with step size |
| 8216 |
$-10^{-3}$. |
| 8217 |
The detailed commands are likewise, except for the manifold calculations |
| 8218 |
in Table~\ref{tbl:demo_l1a2}, and those are given in |
| 8219 |
Table~\ref{tbl:demo_h1a}. |
| 8220 |
|
| 8221 |
\begin{table}[htbp] |
| 8222 |
\begin{center} |
| 8223 |
\begin{tabular}{|l|l|} |
| 8224 |
\hline |
| 8225 |
\commandf{@R man H1a.1 startH1a} & |
| 8226 |
\commandf{H1a=run(startH1a,e='man',c='man.H1a.1')}\\ |
| 8227 |
\multicolumn{2}{|p{7in}|}{ |
| 8228 |
Look at c.man.H1a.1 to see from which label in s.startH1a this |
| 8229 |
run starts. In this run the x-coordinate of the end point |
| 8230 |
(\parf{PAR(21)}) is kept fixed, while the ``period'' |
| 8231 |
(\parf{PAR(11)}), |
| 8232 |
i.e., the total integration time, is allowed to vary, as |
| 8233 |
is the value of $\varepsilon$, i.e., |
| 8234 |
\parf{PAR(6)}. Note that if \parf{PAR(6)} |
| 8235 |
becomes ``large'' then the manifold may no longer be accurate. |
| 8236 |
The free parameters in this run are: |
| 8237 |
|
| 8238 |
\begin{tabular}{l@{=}lll@{=}l} |
| 8239 |
\parf{PAR(3)} & energy & & |
| 8240 |
\parf{PAR(12)} & length of the orbit \\ |
| 8241 |
\parf{PAR(6)} & ``starting distance'' & & |
| 8242 |
\parf{PAR(22)} & $y$-coordinate at end point \\ |
| 8243 |
\parf{PAR(11)} & integration time & & |
| 8244 |
\parf{PAR(23)} & $z$-coordinate at end point |
| 8245 |
\end{tabular}}\\ |
| 8246 |
\hline |
| 8247 |
\commandf{@sv H1a} &\commandf{save(H1a,'H1a')}\\ |
| 8248 |
|
| 8249 |
\multicolumn{2}{|l|}{ |
| 8250 |
Save the results in \filef{b.H1a}, \filef{s.H1a}, and \filef{d.H1a}.}\\ |
| 8251 |
\hline |
| 8252 |
|
| 8253 |
\commandf{@R man H1a.2 startH1a} & |
| 8254 |
\commandf{hetH1a=run(startH1a,e='man',c='man.H1a.2')}\\ |
| 8255 |
|
| 8256 |
\multicolumn{2}{|p{7in}|}{ |
| 8257 |
Another run, starting from a longer initial orbit, which |
| 8258 |
computes part of the manifold. The free parameters are the |
| 8259 |
same as in the preceding run. This computation results in |
| 8260 |
the detection of a connecting orbit. |
| 8261 |
}\\ |
| 8262 |
\hline |
| 8263 |
\commandf{@sv hetH1a} &\commandf{save(hetH1a,'hetH1a')}\\ |
| 8264 |
\multicolumn{2}{|l|}{ |
| 8265 |
Save the results in \filef{b.hetH1a}, \filef{s.hetH1a}, and \filef{d.hetH1a}.}\\ |
| 8266 |
\hline |
| 8267 |
\end{tabular} |
| 8268 |
\end{center} |
| 8269 |
\caption{Detailed AUTO shell and Python commands for the H1a demo.} |
| 8270 |
\label{tbl:demo_h1a} |
| 8271 |
\end{table} |
| 8272 |
|
| 8273 |
\subsubsection{The instructions below are for the Halo family H1 in AUTO demo H1b.} |
| 8274 |
|
| 8275 |
Follow the instructions for L1a above, where you replace L by H, and a by b |
| 8276 |
throughout; for instance you can run everything in one go using |
| 8277 |
\begin{center} |
| 8278 |
\begin{tabular}{l|l} |
| 8279 |
\commandf{auto H1b.auto} & \commandf{auto('H1b.auto')} \\ |
| 8280 |
\end{tabular} |
| 8281 |
\end{center} |
| 8282 |
or with the extra calculations: |
| 8283 |
\begin{center} |
| 8284 |
\begin{tabular}{l|l} |
| 8285 |
\commandf{auto H1bX.auto} & \commandf{auto('H1bX.auto')} \\ |
| 8286 |
\end{tabular} |
| 8287 |
\end{center} |
| 8288 |
The Floquet eigenfunction is now computed from label 3 with step size |
| 8289 |
$-10^{-5}$. |
| 8290 |
The detailed commands follow the ones for H1a above, except that there |
| 8291 |
is one extra run; see Table~\ref{tbl:demo_h1b}. |
| 8292 |
|
| 8293 |
\begin{table}[htbp] |
| 8294 |
\begin{center} |
| 8295 |
\begin{tabular}{|l|l|} |
| 8296 |
\hline |
| 8297 |
\commandf{@R man H1b.3 startH1b} & |
| 8298 |
\commandf{het2H1b=run(startH1b,e='man',c='man.H1b.3')}\\ |
| 8299 |
\multicolumn{2}{|p{7in}|}{ |
| 8300 |
Another run, starting from a longer initial orbit, which |
| 8301 |
computes part of the manifold. The free parameters are the |
| 8302 |
same as in the preceding run. This computation results in |
| 8303 |
the detection of another connecting orbit. |
| 8304 |
}\\ |
| 8305 |
\hline |
| 8306 |
\commandf{@sv het2H1b} & \commandf{save(het2H1b,'het2H1b')}\\ |
| 8307 |
\multicolumn{2}{|l|}{ |
| 8308 |
Save the results in \filef{b.het2H1b}, \filef{s.het2H1b}, and |
| 8309 |
\filef{d.het2H1b}.}\\ |
| 8310 |
\hline |
| 8311 |
\end{tabular} |
| 8312 |
\end{center} |
| 8313 |
\caption{Detailed AUTO shell and Python commands for the H1b demo.} |
| 8314 |
\label{tbl:demo_h1b} |
| 8315 |
\end{table} |
| 8316 |
|
| 8317 |
\subsubsection{The instructions below are for the Halo family H1 in AUTO demo H1c.} |
| 8318 |
|
| 8319 |
Follow the instructions for L1a above, where you replace L by H, and a by c |
| 8320 |
throughout; for instance you can run everything in one go using |
| 8321 |
\begin{center} |
| 8322 |
\begin{tabular}{l|l} |
| 8323 |
\commandf{auto H1c.auto} & \commandf{auto('H1c.auto')} \\ |
| 8324 |
\end{tabular} |
| 8325 |
\end{center} |
| 8326 |
The Floquet eigenfunction is now computed from label 68 with step size |
| 8327 |
$-10^{-2}$. |
| 8328 |
|
| 8329 |
The detailed commands follow the ones for H1a above, except that the last |
| 8330 |
run is left out, and so the \filef{H1cX.auto} script is not necessary. |
| 8331 |
|
| 8332 |
\subsubsection{The instructions below are for the Halo family V1 in AUTO demo V1a.} |
| 8333 |
|
| 8334 |
Follow the instructions for L1a above, where you replace L by V throughout, |
| 8335 |
for instance you can run everything in one go using |
| 8336 |
\begin{center} |
| 8337 |
\begin{tabular}{l|l} |
| 8338 |
\commandf{auto V1a.auto} & \commandf{auto('V1a.auto')} \\ |
| 8339 |
\end{tabular} |
| 8340 |
\end{center} |
| 8341 |
The Floquet eigenfunction is now computed from label 8 with step size |
| 8342 |
$-10^{-5}$. |
| 8343 |
The detailed commands are likewise, except for the manifold calculations |
| 8344 |
in Table~\ref{tbl:demo_l1a2}, and those are given in |
| 8345 |
Table~\ref{tbl:demo_v1a}. |
| 8346 |
|
| 8347 |
\begin{table}[htbp] |
| 8348 |
\begin{center} |
| 8349 |
\begin{tabular}{|l|l|} |
| 8350 |
\hline |
| 8351 |
\commandf{@R man V1a.1 startV1a} & |
| 8352 |
\commandf{V1a=run(startV1a,e='man',c='man.V1a.1')}\\ |
| 8353 |
|
| 8354 |
\multicolumn{2}{|p{7in}|}{ |
| 8355 |
Look at \filef{c.man.V1a.1} to see from which label in |
| 8356 |
\filef{s.startV1a} this |
| 8357 |
run starts. In this run the $z$-coordinate of the end point |
| 8358 |
(\parf{PAR(23)}) |
| 8359 |
is kept fixed, while the ``period'' (\parf{PAR(11)}), |
| 8360 |
i.e., the total integration time, is allowed to vary, as |
| 8361 |
is the value of $\varepsilon$, i.e., \parf{PAR(6)}. |
| 8362 |
Note that if \parf{PAR(6)} |
| 8363 |
becomes ``large'' then the manifold may no longer be accurate. |
| 8364 |
The free parameters in this run are: |
| 8365 |
\begin{tabular}{l@{=}lll@{=}l} |
| 8366 |
\parf{PAR(3)} & energy & & |
| 8367 |
\parf{PAR(12)} & length of the orbit \\ |
| 8368 |
\parf{PAR(6)} & ``starting distance'' & & |
| 8369 |
\parf{PAR(21)} & $x$-coordinate at end point \\ |
| 8370 |
\parf{PAR(11)} & integration time & & |
| 8371 |
\parf{PAR(22)} & $y$-coordinate at end point |
| 8372 |
\end{tabular} |
| 8373 |
}\\ |
| 8374 |
\hline |
| 8375 |
\commandf{@sv V1a} & \commandf{save(V1a,'V1a')}\\ |
| 8376 |
\multicolumn{2}{|l|}{ |
| 8377 |
Save the results in \filef{b.V1a}, \filef{s.V1a}, and |
| 8378 |
\filef{d.V1a}.}\\ |
| 8379 |
\hline |
| 8380 |
\end{tabular} |
| 8381 |
\end{center} |
| 8382 |
\caption{Detailed AUTO shell and Python commands for the V1a demo.} |
| 8383 |
\label{tbl:demo_v1a} |
| 8384 |
\end{table} |
| 8385 |
|
| 8386 |
\subsubsection{The instructions below are for the Halo family V1 in AUTO demo V1b.} |
| 8387 |
|
| 8388 |
Follow the instructions for L1a above, where you replace L by V, and a by b |
| 8389 |
throughout; for instance you can run everything in one go using |
| 8390 |
\begin{center} |
| 8391 |
\begin{tabular}{l|l} |
| 8392 |
\commandf{auto V1b.auto} & \commandf{auto('V1b.auto')} \\ |
| 8393 |
\end{tabular} |
| 8394 |
\end{center} |
| 8395 |
or with the extra calculations: |
| 8396 |
\begin{center} |
| 8397 |
\begin{tabular}{l|l} |
| 8398 |
\commandf{auto V1bX.auto} & \commandf{auto('V1bX.auto')} \\ |
| 8399 |
\end{tabular} |
| 8400 |
\end{center} |
| 8401 |
The Floquet eigenfunction is now computed from label 12 with step size |
| 8402 |
$10^{-5}$. |
| 8403 |
|
| 8404 |
The detailed commands are likewise, except for the manifold calculations |
| 8405 |
in Table~\ref{tbl:demo_l1a2}, and those are given in |
| 8406 |
Table~\ref{tbl:demo_v1b}. |
| 8407 |
|
| 8408 |
\begin{table}[htbp] |
| 8409 |
\begin{center} |
| 8410 |
\begin{tabular}{|l|l|} |
| 8411 |
\hline |
| 8412 |
\commandf{@R man V1b.1 startV1b} & |
| 8413 |
\commandf{V1b=run(startV1b,e='man',c='man.V1b.1')}\\ |
| 8414 |
\multicolumn{2}{|p{7in}|}{ |
| 8415 |
Look at \filef{c.man.V1b.1} |
| 8416 |
to see from which label in \filef{s.startV1b} this |
| 8417 |
run starts. In this run the $x$-coordinate of the end point |
| 8418 |
(\parf{PAR(21)}) is kept fixed, while the ``period'' |
| 8419 |
(\parf{PAR(11)}), |
| 8420 |
i.e., the total integration time, is allowed to vary, as |
| 8421 |
is the value of $\varepsilon$, i.e., \parf{PAR(6)}. |
| 8422 |
Note that if \parf{PAR(6)} |
| 8423 |
becomes ``large'' then the manifold may no longer be accurate. |
| 8424 |
The free parameters in this run are: |
| 8425 |
\begin{tabular}{l@{=}lll@{=}l} |
| 8426 |
\parf{PAR(3)} & energy & & |
| 8427 |
\parf{PAR(12)} & length of the orbit \\ |
| 8428 |
\parf{PAR(6)} & ``starting distance'' & & |
| 8429 |
\parf{PAR(22)} & $y$-coordinate at end point \\ |
| 8430 |
\parf{PAR(11)} & integration time & & |
| 8431 |
\parf{PAR(23)} & $z$-coordinate at end point |
| 8432 |
\end{tabular}}\\ |
| 8433 |
\hline |
| 8434 |
\commandf{@sv V1b} & \commandf{save(V1b,'V1b')}\\ |
| 8435 |
\multicolumn{2}{|l|}{ |
| 8436 |
Save the results in \filef{b.V1b}, \filef{s.V1b}, and |
| 8437 |
\filef{d.V1b} .}\\ |
| 8438 |
\hline |
| 8439 |
\commandf{@R man V1b.2 startV1b} & |
| 8440 |
\commandf{hetV1b=run(startV1b,e='man',c='man.V1b.2')} \\ |
| 8441 |
\multicolumn{2}{|p{7in}|}{ |
| 8442 |
Another run, starting from a longer initial orbit, which |
| 8443 |
computes part of the manifold. The free parameters are the |
| 8444 |
same as in the preceding run. This computation results in |
| 8445 |
the detection of a connecting orbit.}\\ |
| 8446 |
\hline |
| 8447 |
|
| 8448 |
\commandf{@sv hetV1b} & \commandf{save(hetV1b,'hetV1b')}\\ |
| 8449 |
\multicolumn{2}{|l|}{ |
| 8450 |
Save the results in \filef{b.hetV1b}, |
| 8451 |
\filef{s.hetV1b}, and \filef{d.hetV1b} . |
| 8452 |
}\\ |
| 8453 |
\hline |
| 8454 |
\end{tabular} |
| 8455 |
\end{center} |
| 8456 |
\caption{Detailed AUTO shell and Python commands for the V1b demo.} |
| 8457 |
\label{tbl:demo_v1b} |
| 8458 |
\end{table} |
| 8459 |
|
| 8460 |
%============================================================================== |
| 8461 |
%============================================================================== |
| 8462 |
\chapter{ \AUTO Demos : BVP.} \label{ch:Demos_BVP} |
| 8463 |
%============================================================================== |
| 8464 |
%============================================================================== |
| 8465 |
|
| 8466 |
%============================================================================== |
| 8467 |
%DEMO=exp====================================================================== |
| 8468 |
%============================================================================== |
| 8469 |
\section{ exp : Bratu's Equation.} \label{sec:Demos_exp} |
| 8470 |
This demo illustrates the computation of a solution family to |
| 8471 |
the boundary value problem |
| 8472 |
|
| 8473 |
|
| 8474 |
\begin{equation} \begin{array}{cl} |
| 8475 |
u_1 ' &= u_2 , \\ |
| 8476 |
u_2 ' &= -p_1 e^{u_1} , \\ |
| 8477 |
\end{array} \end{equation} |
| 8478 |
with boundary conditions $ u_1(0)=0 , \quad u_1(1)=0.$ |
| 8479 |
This equation is also considered in |
| 8480 |
\citename{DoKeKe:91a} \citeyear{DoKeKe:91a}. |
| 8481 |
\begin{table}[htbp] |
| 8482 |
\begin{center} |
| 8483 |
\begin{tabular}{| l | l |} |
| 8484 |
\hline |
| 8485 |
\AUTO-COMMAND & ACTION \\ |
| 8486 |
\hline |
| 8487 |
%============================================================================== |
| 8488 |
\commandf{mkdir exp} & create an empty work directory \\ |
| 8489 |
\commandf{cd exp} & change directory \\ |
| 8490 |
\commandf{demo('exp')} & copy the demo files to the work directory \\ |
| 8491 |
\hline |
| 8492 |
%============================================================================== |
| 8493 |
\commandf{r1=run(e='exp',c='exp')} & 1st run; compute solution family containing fold \\ |
| 8494 |
\hline |
| 8495 |
%============================================================================== |
| 8496 |
\commandf{r2=run(r1,NTST=20)} & 2nd run; restart at the last labeled solution, using increased accuracy\\ |
| 8497 |
\commandf{save(r1+r2,'exp')} & save output to \filef{b.exp, s.exp, d.exp} \\ |
| 8498 |
\hline |
| 8499 |
%============================================================================== |
| 8500 |
\end{tabular} |
| 8501 |
\caption{Commands for running demo \filef{exp}.} |
| 8502 |
\label{tbl:demo_exp} |
| 8503 |
\end{center} |
| 8504 |
\end{table} |
| 8505 |
|
| 8506 |
\newpage |
| 8507 |
%============================================================================== |
| 8508 |
%DEMO=int====================================================================== |
| 8509 |
%============================================================================== |
| 8510 |
\section{ int : Boundary and Integral Constraints.} \label{sec:Demos_int} |
| 8511 |
This demo illustrates the computation of a solution family to |
| 8512 |
the equation |
| 8513 |
|
| 8514 |
\begin{equation} \begin{array}{cl} |
| 8515 |
u_1 ' &= u_2 , \\ |
| 8516 |
u_2 ' &= -p_1 e^{u_1} , \\\end{array} \end{equation} |
| 8517 |
with a non-separated boundary condition and an integral constraint: |
| 8518 |
|
| 8519 |
$$ u_1(0)-u_1(1)-p_2=0 ,\qquad \int_0^{1}u(t)dt-p_3=0 . $$ |
| 8520 |
The solution family contains a fold, which, in the second run, is |
| 8521 |
continued in two equation parameters. |
| 8522 |
|
| 8523 |
\begin{table}[htbp] |
| 8524 |
\begin{center} |
| 8525 |
\begin{tabular}{| l | l |} |
| 8526 |
\hline |
| 8527 |
\AUTO-COMMAND & ACTION \\ |
| 8528 |
\hline |
| 8529 |
%============================================================================== |
| 8530 |
\commandf{mkdir int} & create an empty work directory \\ |
| 8531 |
\commandf{cd int} & change directory \\ |
| 8532 |
\commandf{demo('int')} & copy the demo files to the work directory \\ |
| 8533 |
\hline |
| 8534 |
%============================================================================== |
| 8535 |
\commandf{r1=run(e='int',c='int')} & 1st run; detection of a fold \\ |
| 8536 |
\commandf{save(r1,'int')} & save output-files as \filef{b.int, s.int, d.int} \\ |
| 8537 |
\hline |
| 8538 |
%============================================================================== |
| 8539 |
\commandf{r2=run(r1("LP1"),ICP=[1,2],ISW=2)} & 2nd run; generate starting data for a curve of folds.\\ |
| 8540 |
\hline |
| 8541 |
%============================================================================== |
| 8542 |
|
| 8543 |
\commandf{r3=run(r2)} & \parbox[t]{3in}{3rd run; compute a curve of |
| 8544 |
folds; restart from the last and only label in \parf{r2}. \vspace{0.2cm}}\\ |
| 8545 |
\commandf{save(r3,'lp')} & save the output-files as \filef{b.lp, s.lp, d.lp} \\ |
| 8546 |
\hline |
| 8547 |
%============================================================================== |
| 8548 |
\end{tabular} |
| 8549 |
\caption{Commands for running demo \filef{int}.} |
| 8550 |
\label{tbl:demo_int} |
| 8551 |
\end{center} |
| 8552 |
\end{table} |
| 8553 |
|
| 8554 |
\newpage |
| 8555 |
%============================================================================== |
| 8556 |
%DEMO=bvp====================================================================== |
| 8557 |
%============================================================================== |
| 8558 |
\section{ bvp : A Nonlinear ODE Eigenvalue Problem.} \label{sec:Demos_bvp} |
| 8559 |
This demo illustrates the location of eigenvalues of a nonlinear ODE |
| 8560 |
boundary value problem as bifurcations from the trivial solution family. |
| 8561 |
The families of solutions that bifurcate at all five computed |
| 8562 |
eigenvalues, that is, the eigenfunctions, are computed in both directions. |
| 8563 |
The equations are |
| 8564 |
\begin{equation} \begin{array}{cl} |
| 8565 |
u_1 ' &= u_2 , \\ |
| 8566 |
u_2 ' &=-(p_1 \pi)^{2}u_1 + u_1^{2} ,\end{array} \end{equation} |
| 8567 |
with boundary conditions $ u_1(0)=0 , \quad u_1(1)=0.$~~~ |
| 8568 |
We add the integral constraint |
| 8569 |
$$ \int_0^{1} u_1(t) dt - p_2 = 0. $$ |
| 8570 |
Then $p_2$ is simply the average of the first solution component. |
| 8571 |
The integral constaint gives a measure: the exact same continuations |
| 8572 |
could be done without any integral conditions in just the |
| 8573 |
one parameter $p_1$, |
| 8574 |
however $p_2$ gives us extra possibilities to plot and stop at |
| 8575 |
desirable solutions. |
| 8576 |
The values that \filef{bvp.auto} sets in \parf{UZR} make sure that |
| 8577 |
solutions are given for $p_2=\pm 3,\pm 6,\pm 9$, and the continuation |
| 8578 |
stops at $p_2=\pm 9$, and also makes sure that $0 \le p_1 \le 5.5$. |
| 8579 |
\begin{table}[htbp] |
| 8580 |
\begin{center} |
| 8581 |
\begin{tabular}{| l | l |} |
| 8582 |
\hline |
| 8583 |
\AUTO-COMMAND & ACTION \\ |
| 8584 |
\hline |
| 8585 |
%============================================================================== |
| 8586 |
\commandf{mkdir bvp} & create an empty work directory \\ |
| 8587 |
\commandf{cd bvp} & change directory \\ |
| 8588 |
\commandf{@dm bvp } & copy the demo files to the work directory \\ |
| 8589 |
\hline |
| 8590 |
%============================================================================== |
| 8591 |
\commandf{auto bvp.auto } or & Run the script bvp.auto\\ |
| 8592 |
\commandf{auto('bvp.auto') } & \\ |
| 8593 |
\hline |
| 8594 |
%============================================================================== |
| 8595 |
\end{tabular} |
| 8596 |
\caption{Commands for running demo \filef{bvp}.} |
| 8597 |
\label{tbl:demo_bvp} |
| 8598 |
\end{center} |
| 8599 |
\end{table} |
| 8600 |
|
| 8601 |
\newpage |
| 8602 |
%============================================================================== |
| 8603 |
%DEMO=lin====================================================================== |
| 8604 |
%============================================================================== |
| 8605 |
\section{ lin : A Linear ODE Eigenvalue Problem.} \label{sec:Demos_lin} |
| 8606 |
This demo illustrates the location of eigenvalues of a linear ODE |
| 8607 |
boundary value problem as bifurcations from the trivial solution family. |
| 8608 |
By means of branch switching an eigenfunction is computed, |
| 8609 |
as is illustrated for the first eigenvalue. |
| 8610 |
This eigenvalue is then continued in two parameters |
| 8611 |
by fixing the $L_2$-norm of the first solution component. |
| 8612 |
The eigenvalue problem is given by the equations |
| 8613 |
|
| 8614 |
\begin{equation} \begin{array}{cl} |
| 8615 |
u_1 ' &= u_2 , \\ |
| 8616 |
u_2 ' &= (p_1 \pi)^{2} u_1 , \end{array} \end{equation} |
| 8617 |
with boundary conditions $ u_1(0)-p_2=0 $ and $ u_1(1)=0.$ |
| 8618 |
We add the integral constraint |
| 8619 |
$$ \int_0^{1} u_1(t)^{2} dt - p_3 = 0. $$ |
| 8620 |
Then $p_3$ is simply the $L_2$-norm of the first solution component. |
| 8621 |
In the first two runs $p_2$ is fixed, while $p_1$ and $p_3$ are free. |
| 8622 |
In the third run $p_3$ is fixed, while $p_1$ and $p_2$ are free. |
| 8623 |
|
| 8624 |
\begin{table}[htbp] |
| 8625 |
\begin{center} |
| 8626 |
\begin{tabular}{| l | l |} |
| 8627 |
\hline |
| 8628 |
\AUTO-COMMAND & ACTION \\ |
| 8629 |
\hline |
| 8630 |
%============================================================================== |
| 8631 |
\commandf{mkdir lin} & create an empty work directory \\ |
| 8632 |
\commandf{cd lin} & change directory \\ |
| 8633 |
\commandf{demo('lin')} & copy the demo files to the work directory \\ |
| 8634 |
\hline |
| 8635 |
%============================================================================== |
| 8636 |
\commandf{r1=run(e='lin',c='lin')} & \parbox[t]{3in}{1st run; |
| 8637 |
compute the trivial solution family and locate eigenvalues. \vspace{0.2cm}} \\ |
| 8638 |
\hline |
| 8639 |
%============================================================================== |
| 8640 |
\commandf{r2=run(r1('BP1'),NTST=6,ISW=-1,DSMAX=0.5)} & \parbox[t]{3in}{2nd run; compute a few steps along the bifurcating family. \vspace{0.2cm}}\\ |
| 8641 |
\commandf{save(r1+r2,'lin')} & save all output to \filef{b.lin, s.lin, d.lin} \\ |
| 8642 |
\hline |
| 8643 |
%============================================================================== |
| 8644 |
\commandf{r3=run(r2('UZ1'),ICP=[1,2],NTST=5,ISW=1)} & \parbox[t]{3in}{3rd run; compute a two-parameter curve of eigenvalues. \vspace{0.2cm}} \\ |
| 8645 |
\commandf{save(r3,'2p')} & save the output-files as \filef{b.2p, s.2p, d.2p} \\ |
| 8646 |
\hline |
| 8647 |
%============================================================================== |
| 8648 |
\end{tabular} |
| 8649 |
\caption{Commands for running demo \filef{lin}.} |
| 8650 |
\label{tbl:demo_lin} |
| 8651 |
\end{center} |
| 8652 |
\end{table} |
| 8653 |
|
| 8654 |
\newpage |
| 8655 |
%============================================================================== |
| 8656 |
%DEMO=non====================================================================== |
| 8657 |
%============================================================================== |
| 8658 |
\section{ non : A Non-Autonomous BVP.} \label{sec:Demos_non} |
| 8659 |
This demo illustrates the continuation of solutions to |
| 8660 |
the non-autonomous boundary value problem |
| 8661 |
|
| 8662 |
\begin{equation} \begin{array}{cl} |
| 8663 |
u_1 ' &= u_2 , \\ |
| 8664 |
u_2 ' &= -p_1 e^{x^3 u_1} , \\\end{array} \end{equation} |
| 8665 |
with boundary conditions $ u_1(0)=0 , \quad u_1(1)=0.$ |
| 8666 |
Here $x$ is the independent variable. |
| 8667 |
This system is first converted to the following equivalent |
| 8668 |
autonomous system~: |
| 8669 |
\begin{equation} \begin{array}{cl} |
| 8670 |
u_1 ' &= u_2 , \\ |
| 8671 |
u_2 ' &= -p_1 e^{u_3^3 u_1} , \\ |
| 8672 |
u_3 ' &= 1 , \\ |
| 8673 |
\end{array} \end{equation} |
| 8674 |
with boundary conditions $ u_1(0)=0 , \quad u_1(1)=0, \quad u_3(0)=0.$ |
| 8675 |
(For a periodically forced system see demo \filef{frc}). |
| 8676 |
|
| 8677 |
\begin{table}[htbp] |
| 8678 |
\begin{center} |
| 8679 |
\begin{tabular}{| l | l |} |
| 8680 |
\hline |
| 8681 |
\AUTO-COMMAND & ACTION \\ |
| 8682 |
\hline |
| 8683 |
%============================================================================== |
| 8684 |
\commandf{mkdir non} & create an empty work directory \\ |
| 8685 |
\commandf{cd non} & change directory \\ |
| 8686 |
\commandf{demo('non')} & copy the demo files to the work directory \\ |
| 8687 |
\hline |
| 8688 |
%============================================================================== |
| 8689 |
|
| 8690 |
\commandf{r1=run(e='non',c='non')} & compute the solution family \\ |
| 8691 |
\commandf{save(r1,'non')} & save output-files as \filef{b.non, s.non, d.non} \\ |
| 8692 |
\hline |
| 8693 |
%============================================================================== |
| 8694 |
\end{tabular} |
| 8695 |
\caption{Commands for running demo \filef{non}.} |
| 8696 |
\label{tbl:demo_non} |
| 8697 |
\end{center} |
| 8698 |
\end{table} |
| 8699 |
|
| 8700 |
\newpage |
| 8701 |
%============================================================================== |
| 8702 |
%DEMO=kar====================================================================== |
| 8703 |
%============================================================================== |
| 8704 |
\section{ kar : The Von Karman Swirling Flows.} \label{sec:Demos_kar} |
| 8705 |
The steady axi-symmetric flow of a viscous incompressible fluid |
| 8706 |
above an infinite rotating disk is modeled by the following |
| 8707 |
ODE boundary value problem (Equation (11) in |
| 8708 |
\citename{LeKe:80} \citeyear{LeKe:80}~: |
| 8709 |
\begin{equation} \begin{array}{cl} |
| 8710 |
u_1' &= T u_2, \\ |
| 8711 |
u_2' &= T u_3, \\ |
| 8712 |
u_3' &= T \bigl[ -2 \gamma u_4 + u_2^2 - 2 u_1 u_3 - u_4^2 \bigr], \\ |
| 8713 |
u_4' &= T u_5, \\ |
| 8714 |
u_5' &= T \bigl[ 2 \gamma u_2 + 2 u_2 u_4 - 2 u_1 u_5 \bigr], \\ |
| 8715 |
\end{array} \end{equation} |
| 8716 |
with left boundary conditions |
| 8717 |
$$ u_1(0)=0, \qquad u_2(0)=0, \qquad u_4(0)=1-\gamma, $$ |
| 8718 |
and (asymptotic) right boundary conditions |
| 8719 |
\begin{equation} \begin{array}{cl} |
| 8720 |
& \bigl[ f_\infty + a(f_\infty,\gamma) \bigr] ~ u_2(1) + u_3(1) |
| 8721 |
- \gamma ~ \frac{ u_4(1) }{ a(f_\infty,\gamma) } = 0, \\ |
| 8722 |
& a(f_\infty,\gamma)~ \frac{ b^2(f_\infty,\gamma) }{ \gamma } ~u_2(1) |
| 8723 |
+ \bigl[ f_\infty + a(f_\infty,\gamma) \bigr] ~u_4(1) |
| 8724 |
+ u_5(1) = 0, \\ |
| 8725 |
& u_1(1) = f_\infty, |
| 8726 |
\end{array} \end{equation} |
| 8727 |
where |
| 8728 |
\begin{equation} \begin{array}{cl} |
| 8729 |
& a(f_\infty,\gamma) = \frac{1 }{ \sqrt{2} } |
| 8730 |
\bigl[ (f_\infty^4 + 4 \gamma^2)^{1/2} + f_\infty^2 \bigr]^{1/2}, \\ |
| 8731 |
& b(f_\infty,\gamma) = \frac{1 }{ \sqrt{2} } |
| 8732 |
\bigl[ (f_\infty^4 + 4 \gamma^2)^{1/2} - f_\infty^2 \bigr]^{1/2}. \\ |
| 8733 |
\end{array} \end{equation} |
| 8734 |
Note that there are five differential equations and six boundary conditions. |
| 8735 |
Correspondingly, there are two free parameters in the computation of a |
| 8736 |
solution family, namely $\gamma$ and $f_\infty$. |
| 8737 |
The ``period'' $T$ is fixed; $T=500$. |
| 8738 |
The starting solution is $u_i=0$, $i=1,\cdots,5$, |
| 8739 |
at $\gamma=1$, $f_\infty=0$. |
| 8740 |
|
| 8741 |
\begin{table}[htbp] |
| 8742 |
\begin{center} |
| 8743 |
\begin{tabular}{| l | l |} |
| 8744 |
\hline |
| 8745 |
\AUTO-COMMAND & ACTION \\ |
| 8746 |
\hline |
| 8747 |
%============================================================================== |
| 8748 |
\commandf{mkdir kar} & create an empty work directory \\ |
| 8749 |
\commandf{cd kar} & change directory \\ |
| 8750 |
\commandf{demo('kar')} & copy the demo files to the work directory \\ |
| 8751 |
\hline |
| 8752 |
%============================================================================== |
| 8753 |
\commandf{r1=run(e='kar',c='kar')} & computation of the solution family \\ |
| 8754 |
\commandf{save(r1,'kar')} & save output-files as \filef{b.kar, s.kar, d.kar} \\ |
| 8755 |
\hline |
| 8756 |
%============================================================================== |
| 8757 |
\end{tabular} |
| 8758 |
\caption{Commands for running demo \filef{kar}.} |
| 8759 |
\label{tbl:demo_kar} |
| 8760 |
\end{center} |
| 8761 |
\end{table} |
| 8762 |
|
| 8763 |
\newpage |
| 8764 |
%============================================================================== |
| 8765 |
%DEMO=spb====================================================================== |
| 8766 |
%============================================================================== |
| 8767 |
\section{ spb : A Singularly-Perturbed BVP.} \label{sec:Demos_spb} |
| 8768 |
This demo illustrates the use of continuation to compute |
| 8769 |
solutions to the singularly perturbed boundary value problem |
| 8770 |
\begin{equation} \begin{array}{cl} |
| 8771 |
u_1 ' &= u_2 , \\ |
| 8772 |
u_2 ' &= \frac{\lambda }{ \eps} \bigl( |
| 8773 |
u_1 u_2 (u_1^2 - 1) + u_1 |
| 8774 |
\bigr) , \\ \end{array} \end{equation} |
| 8775 |
with boundary conditions $u_1(0)=3/2$, $u_1(1)=\gamma.$ |
| 8776 |
The parameter $\lambda$ has been introduced into the equations in order |
| 8777 |
to allow a homotopy from a simple equation with known exact solution |
| 8778 |
to the actual equation. This is done in the first run. |
| 8779 |
In the second run $\eps$ is decreased by continuation. |
| 8780 |
In the third run $\eps$ is fixed at $\eps=.001$ and the solution is continued |
| 8781 |
in $\gamma$. |
| 8782 |
This run takes more than 1500 continuation steps. |
| 8783 |
For a detailed analysis of the solution behavior see |
| 8784 |
\citename{JL:82} \citeyear{JL:82}. |
| 8785 |
\begin{table}[htbp] |
| 8786 |
\begin{center} |
| 8787 |
\begin{tabular}{| l | l |} |
| 8788 |
\hline |
| 8789 |
\AUTO-COMMAND & ACTION \\ |
| 8790 |
\hline |
| 8791 |
%============================================================================== |
| 8792 |
\commandf{mkdir spb} & create an empty work directory \\ |
| 8793 |
\commandf{cd spb} & change directory \\ |
| 8794 |
\commandf{demo('spb')} & copy the demo files to the work directory \\ |
| 8795 |
\hline |
| 8796 |
%============================================================================== |
| 8797 |
|
| 8798 |
\commandf{r1=run(e='spb',c='spb.0')} & 1st run; homotopy from $\lambda=0$ to $\lambda=1$ \\ |
| 8799 |
\commandf{save(r1,'0')} & save output-files as \filef{b.0, s.0, d.0} \\ |
| 8800 |
\hline |
| 8801 |
%============================================================================== |
| 8802 |
\commandf{r2=run(r1,c='spb.1')} & \parbox[t]{3in}{2nd run; let |
| 8803 |
$\eps$ tend to zero; restart from the last label of \parf{r0}. |
| 8804 |
constants changed : \parf{IRS, ICP(1), NTST, DS, UZR, STOP} \vspace{0.2cm}}\\ |
| 8805 |
\commandf{save(r2,'1')} & save the output-files as \filef{b.1, s.1, d.1} \\ |
| 8806 |
\hline |
| 8807 |
%============================================================================== |
| 8808 |
\commandf{r3=run(r2('UZ2'),c='spb.3')} & \parbox[t]{3in}{3rd run; |
| 8809 |
continuation in $\gamma$; $\eps=0.001$; restart from 2nd UZ label |
| 8810 |
of \parf{r2}. Constants changed : \parf{IRS, ICP(1), ITNW, EPSL, EPSU, UZR} \vspace{0.2cm}} \\ |
| 8811 |
\commandf{save(r3,'2')} & save the output-files as \filef{b.2, s.2, d.2} \\ |
| 8812 |
\hline |
| 8813 |
%============================================================================== |
| 8814 |
\end{tabular} |
| 8815 |
\caption{Commands for running demo \filef{spb}.} |
| 8816 |
\label{tbl:demo_spb} |
| 8817 |
\end{center} |
| 8818 |
\end{table} |
| 8819 |
|
| 8820 |
\newpage |
| 8821 |
%============================================================================== |
| 8822 |
%DEMO=ezp====================================================================== |
| 8823 |
%============================================================================== |
| 8824 |
\section{ ezp : Complex Bifurcation in a BVP.} \label{sec:Demos_ezp} |
| 8825 |
This demo illustrates the computation of a solution family to |
| 8826 |
the complex boundary value problem |
| 8827 |
|
| 8828 |
\begin{equation} \begin{array}{cl} |
| 8829 |
u_1 ' &= u_2 , \\ |
| 8830 |
u_2 ' &= -p_1 e^{u_1} , \\ |
| 8831 |
\end{array} \end{equation} |
| 8832 |
with boundary conditions $ u_1(0)=0 , ~u_1(1)=0.$ |
| 8833 |
Here $u_1$ and $u_2$ are allowed to be complex, |
| 8834 |
while the parameter $p_1$ can only take real values. |
| 8835 |
In the real case, this is Bratu's equation, whose solution family |
| 8836 |
contains a fold; see the demo \filef{exp}. |
| 8837 |
It is known |
| 8838 |
(\citename{HeKe:90} \citeyear{HeKe:90}) that a simple quadratic fold gives rise to a pitch fork |
| 8839 |
bifurcation in the complex equation. |
| 8840 |
This bifurcation is located in the first computation below. |
| 8841 |
In the second and third run, both legs of the bifurcating solution family |
| 8842 |
are computed. |
| 8843 |
On it, both solution components $u_1$ and $u_2$ have nontrivial |
| 8844 |
imaginary part. |
| 8845 |
|
| 8846 |
|
| 8847 |
|
| 8848 |
\begin{table}[htbp] |
| 8849 |
\begin{center} |
| 8850 |
\begin{tabular}{| l | l |} |
| 8851 |
\hline |
| 8852 |
\AUTO-COMMAND & ACTION \\ |
| 8853 |
\hline |
| 8854 |
%============================================================================== |
| 8855 |
\commandf{mkdir ezp} & create an empty work directory \\ |
| 8856 |
\commandf{cd ezp} & change directory \\ |
| 8857 |
\commandf{demo('ezp')} & copy the demo files to the work directory \\ |
| 8858 |
\hline |
| 8859 |
%============================================================================== |
| 8860 |
\commandf{ezp=run(e='ezp',c='ezp')} & 1st run; compute solution family containing fold \\ |
| 8861 |
\hline |
| 8862 |
%============================================================================== |
| 8863 |
\commandf{ezp=ezp+run(ezp('BP1'),ISW=-1)} & \parbox[t]{3in}{2nd run; compute bifurcating complex solution family. \vspace{0.2cm}}\\ |
| 8864 |
\commandf{ap('ezp')} & append output-files to \filef{p.ezp, s.ezp, d.ezp} \\ |
| 8865 |
\hline |
| 8866 |
%============================================================================== |
| 8867 |
\commandf{ezp=ezp+run(ezp('BP1'),ISW=-1,DS='-')} & \parbox[t]{3in}{3rd run; compute 2nd leg of bifurcating family. \vspace{0.2cm}}\\ |
| 8868 |
\commandf{save(ezp,'ezp')} & save combined output to \filef{b.ezp, s.ezp, d.ezp} \\ |
| 8869 |
\hline |
| 8870 |
%============================================================================== |
| 8871 |
\end{tabular} |
| 8872 |
\caption{Commands for running demo \filef{ezp}.} |
| 8873 |
\label{tbl:demo_ezp} |
| 8874 |
\end{center} |
| 8875 |
\end{table} |
| 8876 |
%============================================================================== |
| 8877 |
\newpage |
| 8878 |
|
| 8879 |
% |
| 8880 |
%============================================================================== |
| 8881 |
%DEMO=um2====================================================================== |
| 8882 |
%============================================================================== |
| 8883 |
\section{ um2 : Basic computation of a 2D unstable manifold.} \label{sec:Demos_um2} |
| 8884 |
This demo shows how one can compute a 2D unstable manifold of an equilibrium |
| 8885 |
using {\it orbit continuation}. |
| 8886 |
The model equations are given by |
| 8887 |
\begin{equation} \begin{array}{cl} |
| 8888 |
x' &= ~\eps x - y^3~, \\ |
| 8889 |
y' &= ~~y + x^3~. \\ |
| 8890 |
\end{array} \end{equation} |
| 8891 |
The origin has eigenvalues $\eps$ and $1$, where $\eps>0$, so that its |
| 8892 |
unstable manifold is indeed $2$-dimensional. Since the phase space itself |
| 8893 |
is $2$-dimensional, one can also consider this demo as showing how to generate |
| 8894 |
part of a $2$-dimensional phase portrait. However, the basic steps in this demo |
| 8895 |
also apply to the computation of $2$-dimensional unstable manifolds of equilibria |
| 8896 |
in higher-dimensional phase space. |
| 8897 |
|
| 8898 |
In the computations the independent time variable $t$ is scaled to vary in |
| 8899 |
the unit interval, so that the actual integration time $T$ becomes an |
| 8900 |
explicit parameter in the equations, namely, |
| 8901 |
|
| 8902 |
\begin{equation} \begin{array}{cl} |
| 8903 |
x' &= ~T~(\eps x - y^3)~, \\ |
| 8904 |
y' &= ~T~(~y + x^3)~. \\ |
| 8905 |
\end{array} \end{equation} |
| 8906 |
|
| 8907 |
To carry out the calculations run the Python script \filef{um2.auto} included |
| 8908 |
in the demo. In order to better appreciate the power of orbit continuation |
| 8909 |
for computing such manifolds, one can also run the script for a smaller value |
| 8910 |
of $\eps$, {\it e.g.}, $\eps=10^{-2},\cdots,10^{-6}$, by changing the value |
| 8911 |
entered on the last line of the constants-file \filef{c.umn.2}. One can view |
| 8912 |
the phase portrait by plotting the solutions in the solutions-file \filef{s.3} |
| 8913 |
in the $x$-$y$ plane. |
| 8914 |
|
| 8915 |
In the first run an orbit is ``grown'' by continuation in the integration time |
| 8916 |
$T$, starting from a very small value of $T$, so that a solution that is |
| 8917 |
constant in time is an accurate initial approximation. The starting solution is |
| 8918 |
in fact a point on a circle of small radius $r_0$ around the stationary point, |
| 8919 |
{\it i.e.}, around the origin. For illustrative purpose the value of $r_0$ is |
| 8920 |
$0.1$ in this demo, but could be smaller if more accuracy is needed. |
| 8921 |
The precise starting point is in the strongly unstable direction, namely, in |
| 8922 |
the $y$-direction, which is the direction of the eigenvector associated with |
| 8923 |
the ``strongly unstable eigenvalue'', which here has value $1$. |
| 8924 |
The growing of the initial orbit is terminated when the norm of its endpoint |
| 8925 |
reaches the value 0.6, {\it i.e.}, when $\sqrt{x(1)^2+y(1)^2}=0.6$. |
| 8926 |
|
| 8927 |
The value of $\eps$ is $0.5$ in the first run. In the second run continuation |
| 8928 |
is used to decrease the value of $\eps$ to $0.1$ (or, if desired, to a smaller |
| 8929 |
value, as already mentioned above). The norm of the endpoint $(x(1),y(1))$ |
| 8930 |
is fixed in the second run, while $T$ is variable. |
| 8931 |
|
| 8932 |
In the third run the norm of the endpoint remains fixed. However, the |
| 8933 |
initial point $(x(0),y(0))$ is allowed to move around the small circle of |
| 8934 |
radius $r_0$ around the orgin. The endpoint thereby moves around the ``large'' |
| 8935 |
circle of radius $0.6$. The integration time $T$ remains variable. |
| 8936 |
The orbits computed in this run generate the local |
| 8937 |
manifold. |
| 8938 |
|
| 8939 |
When viewing the orbits computed in the third run, as written in the file |
| 8940 |
\filef{s.3}, notice that orbits near the ``weakly unstable direction'', |
| 8941 |
which here corresponds to the $x$ direction, have been well-computed. Such |
| 8942 |
orbits are sensitively dependent on the initial condition $(x(0),y(0))$ when |
| 8943 |
the problem is considered as an initial value problem. It is in fact the |
| 8944 |
{\it continuation} of the {\it entire orbits} using a {\it boundary value |
| 8945 |
approach} which enables their determination. As already mentioned, this |
| 8946 |
feature is even more visible when running this demo with a smaller value |
| 8947 |
of $\eps$. |
| 8948 |
\newpage |
| 8949 |
|
| 8950 |
%============================================================================== |
| 8951 |
%DEMO=um3====================================================================== |
| 8952 |
%============================================================================== |
| 8953 |
\section{ um3 : A 2D unstable manifold in 3D.} \label{sec:Demos_um3} |
| 8954 |
This demo uses {\it orbit continuation} to compute part of the 2D unstable |
| 8955 |
manifold of the origin of the equations |
| 8956 |
\begin{equation} \begin{array}{cl} |
| 8957 |
x' &= ~\eps x - y^3 + z^3~, \\ |
| 8958 |
y' &= ~~y + x^3~, \\ |
| 8959 |
z' &= -z + x^2~. \\ |
| 8960 |
\end{array} \end{equation} |
| 8961 |
The origin has unstable eigenvalues $\eps$ and $1$, where $\eps>0$, so that its |
| 8962 |
unstable manifold is $2$-dimensional. |
| 8963 |
In the computations the independent time variable $t$ is scaled to vary in |
| 8964 |
the unit interval, so that the actual integration time $T$ becomes an |
| 8965 |
explicit parameter in the equations; see, for example, demo \filef{um2}. |
| 8966 |
The calculations can be done by running the Python script \filef{um3.auto} |
| 8967 |
included in the demo. |
| 8968 |
|
| 8969 |
In the first run an orbit is ``grown'' by continuation in the integration time |
| 8970 |
$T$, starting from a very small value of $T$, so that a solution that is |
| 8971 |
constant in time is an accurate initial approximation. The starting solution is |
| 8972 |
in fact a point on a circle of small radius $r_0=0.03$ in the unstable eigenspace |
| 8973 |
of the origin. |
| 8974 |
The precise starting point is in the strongly unstable direction, namely, the |
| 8975 |
$y$-direction. |
| 8976 |
The initial orbit is grown until the $L_2$-norm of its endpoint |
| 8977 |
$(x(1),y(1),z(1))$ reaches the value $1$. |
| 8978 |
The value of $\eps$ is fixed at $0.5$ in the first run. In the second run |
| 8979 |
continuation is used to decrease $\eps$ to $0.01$. The norm of the endpoint |
| 8980 |
$(x(1),y(1),z(1))$ is fixed in this run, while $T$ is variable. |
| 8981 |
|
| 8982 |
In the third run the norm of the endpoint remains fixed, but the |
| 8983 |
initial point $(x(0),y(0),z(0))$ is allowed to move around the small circle of |
| 8984 |
radius $r_0$ in the unstable eigenspace of the origin. |
| 8985 |
The endpoint thereby moves on the surface of the ``large'' sphere of radius |
| 8986 |
$1$. The integration time $T$ remains variable. |
| 8987 |
The orbits computed in this run generate the local manifold. |
| 8988 |
|
| 8989 |
When viewing the orbits computed in the third run, as written in the file |
| 8990 |
\filef{s.3}, notice that there appears to be second equilibrium with a 2D |
| 8991 |
stable manifold which intersects the 2D unstable manifold of the origin. |
| 8992 |
The intersection curve, which corresponds to a heteroclinic orbit, |
| 8993 |
is visible in the graphical representation of the manifold. |
| 8994 |
|
| 8995 |
\newpage |
| 8996 |
% |
| 8997 |
%============================================================================== |
| 8998 |
%DEMO=p2c====================================================================== |
| 8999 |
%============================================================================== |
| 9000 |
\section{ p2c : Point to cycle connections.} \label{sec:Demos_p2c} |
| 9001 |
In this demo a point to cycle heteroclinic connection is computed via |
| 9002 |
homotopy, and then continued in two system parameters, in the Lorenz equations |
| 9003 |
\begin{eqnarray*} |
| 9004 |
u_1' &=& p_3 (u_2 - u_1), \\ |
| 9005 |
u_2' &=& p_1 u_1 - u_2 - u_1 u_3, \\ |
| 9006 |
u_3' &=& u_1 u_2 - p_2 u_3. \end{eqnarray*} |
| 9007 |
Type \commandf{auto p2c.auto} to run the demo and |
| 9008 |
\commandf{auto clean.auto} to remove generated files. |
| 9009 |
|
| 9010 |
Refer to \citename{DoKoVoKu08} \citeyear{DoKoVoKu08} and |
| 9011 |
\url{http://www.bio.vu.nl/thb/research/project/globif/index_main.html} |
| 9012 |
for background information. |
| 9013 |
|
| 9014 |
% |
| 9015 |
%============================================================================== |
| 9016 |
%DEMO=c2c====================================================================== |
| 9017 |
%============================================================================== |
| 9018 |
\section{ c2c : Cycle to cycle connections.} \label{sec:Demos_c2c} |
| 9019 |
|
| 9020 |
In this demo a cycle to cycle heteroclinic connection is computed via |
| 9021 |
homotopy, and then continued in one system parameter, in a food chain model: |
| 9022 |
\begin{eqnarray*} |
| 9023 |
x' &=& x(1 - x) - \frac{5 x y}{1 + 3 x}, \\ |
| 9024 |
y' &=& \frac{5 x y}{1 + 3 x} - p_1 y - \frac{0.1 y z}{1 + 2 y}, \\ |
| 9025 |
z' &=& \frac{0.1 y z}{1 + 2 y} - p_2 z. \end{eqnarray*} |
| 9026 |
Type \commandf{auto c2c.auto} to run the demo. |
| 9027 |
After that it is possible to compute two-parameter continuations of |
| 9028 |
folds of the cycle-to-cycle |
| 9029 |
connection, but since this is computationally intensive it is put in |
| 9030 |
a seperate file: type \commandf{auto c2cfolds.auto}. |
| 9031 |
Type \commandf{auto clean.auto} to remove all generated files. |
| 9032 |
|
| 9033 |
Refer to \citename{DoKoVoKu09} \citeyear{DoKoVoKu09} and |
| 9034 |
\url{http://www.bio.vu.nl/thb/research/project/globif/index_main.html} |
| 9035 |
for background information. |
| 9036 |
|
| 9037 |
\newpage |
| 9038 |
%============================================================================== |
| 9039 |
%DEMO=pcl====================================================================== |
| 9040 |
%============================================================================== |
| 9041 |
\section{ pcl : Lorenz: Point-to-cycle connections with Lin's method.} \label{sec:Demos_pcl} |
| 9042 |
This demo computes a point-to-cycle connection (or EtoP connection; |
| 9043 |
for equilibrium to periodic orbit) in the Lorenz equations |
| 9044 |
\begin{equation} \begin{array}{cl} |
| 9045 |
x' &= \sigma (y - x), \\ |
| 9046 |
y' &= \rho x - y - x z, \\ |
| 9047 |
z' &= x y - \beta z, \\ \end{array} \end{equation} |
| 9048 |
using Lin's method, as described in \citename{KrRi:08} |
| 9049 |
\citeyear{KrRi:08}. Initially, we fix |
| 9050 |
$\beta=8/3$, $\sigma=10$, and let $\rho$ vary, starting from $0$. |
| 9051 |
Here we have a transition from simple to chaotic dynamics. For |
| 9052 |
approximate values of $\rho$ in the interval $[13.9265,24.0579]$ |
| 9053 |
one finds preturbulence, organized by a pair of symmetrically |
| 9054 |
related periodic orbits that emanate from a homoclinic bifurcation |
| 9055 |
at $\rho\approx 13.9265$. For $\rho\approx 24.0579$ there exist |
| 9056 |
two symmetric point-to-cycle connections that mark the appearance |
| 9057 |
of a chaotic attractor for higher values of $\rho$. |
| 9058 |
|
| 9059 |
The computation to find one of these two connections uses the following steps: |
| 9060 |
\begin{enumerate} |
| 9061 |
\item |
| 9062 |
Find the secondary equilibria emanating from the pitchfork |
| 9063 |
bifurcation of the equilibrium at $0$, and their Hopf bifurcations, |
| 9064 |
similarly to the demo \filef{lrz}. |
| 9065 |
\item |
| 9066 |
Follow the periodic orbit emanating from the Hopf bifurcation in |
| 9067 |
$\rho$ and its period $T$, until |
| 9068 |
$\rho=24.0579$, a value close to where a point-to-cycle connection is |
| 9069 |
known to exist. |
| 9070 |
\item |
| 9071 |
Extend the system, putting the variational equation (the eigenfunction) |
| 9072 |
into solution coordinates 4, 5, and 6. The trivial (0) eigenvector is |
| 9073 |
continued until we hit a branch point, corresponding to |
| 9074 |
where $\mu=$ \parf{PAR(12)} equals the natural logarithm of a Floquet |
| 9075 |
multiplier. |
| 9076 |
\item |
| 9077 |
Switch branches and continue the non-trivial eigenvector until its |
| 9078 |
norm $h$ equals 1. |
| 9079 |
\item |
| 9080 |
Extend the system again from 6 to 9 dimensions |
| 9081 |
to calculate a connection from the cross section $\Sigma$, given by |
| 9082 |
$x=10$, to the periodic orbit. |
| 9083 |
The connection starts at the non-trivial eigenvector with respect |
| 9084 |
to the periodic orbit with a distance of $\delta=10^{-7}$, |
| 9085 |
and grows backwards in time |
| 9086 |
until it hits the section $\Sigma$ at time $T^+$. |
| 9087 |
\item |
| 9088 |
Extend the system one last time from 9 to 12 dimensions. |
| 9089 |
We calculate a connection from the equilibrium at 0, starting at |
| 9090 |
its eigenvector over a distance of $\varepsilon=10^{-7}$, |
| 9091 |
to the cross section |
| 9092 |
$\Sigma$, at time $T^-$. |
| 9093 |
The second intersection is the one that is closest to the |
| 9094 |
intersection computed in step 5, and it is the one we want. |
| 9095 |
\item |
| 9096 |
Firstly, in the routine \funcf{PVLS} in the equations file \filef{pcl.f90}, |
| 9097 |
the Lin vector, a normalized vector between the points of intersection |
| 9098 |
computed in steps 5 and 6 is put in $Z_x$, $Z_y$ and $Z_z$ |
| 9099 |
(\parf{PAR(24)-PAR(26)}). |
| 9100 |
Starting data for the Lin gap, which measures the distance between |
| 9101 |
these two points of intersection, is put in $\eta=$ \parf{PAR(23)}. |
| 9102 |
Subsequently, close this gap by continuing in |
| 9103 |
$\eta$, $\rho$, $\delta$, $\varepsilon$, $T^-$, $T^+$, $\mu$, and $T$. |
| 9104 |
This process is illustrated in Figure~\ref{fig:Demos_pcl1}. |
| 9105 |
\item |
| 9106 |
Continue the point to cycle connection obtained in step 7 |
| 9107 |
in the system parameters $\rho$ and $\beta$, together with |
| 9108 |
$\delta$, $\varepsilon$, $T^-$, $T^+$, $\mu$, and $T$. |
| 9109 |
Connections for various |
| 9110 |
values of $(\rho,\beta)$ are shown in Figure \ref{fig:Demos_pcl2}. |
| 9111 |
\end{enumerate} |
| 9112 |
|
| 9113 |
The above sequence of calculations can be carried out by |
| 9114 |
running the Python script \filef{pcl.auto} (without constants files) |
| 9115 |
or \filef{pclc.auto} (with constants files) included in the demo. |
| 9116 |
See the script and the Fortran file \filef{pcl.f90} for details on |
| 9117 |
how all parameters are mapped and which precise AUTO constants |
| 9118 |
are changed at every step. |
| 9119 |
\begin{figure}[htb] |
| 9120 |
\begin{center} |
| 9121 |
\begin{picture}(550,190) |
| 9122 |
\put(-10,-20){\includegraphics[scale=0.48]{include/closegap_pcl_par}} |
| 9123 |
\put(240,-20){\includegraphics[scale=0.48]{include/closegap_pcl}} |
| 9124 |
\end{picture} |
| 9125 |
\caption{Closing the Lin-gap to obtain the point-to-cycle |
| 9126 |
connection. |
| 9127 |
The left panel is a plot of $\rho$ versus the gap size $\eta$, |
| 9128 |
and the right panel shows the corresponding orbit segments, |
| 9129 |
projected onto the $(x,z)$-plane. |
| 9130 |
To obtain these figures run \commandf{plot('closegap')} or |
| 9131 |
\commandf{@pp closegap}.} |
| 9132 |
\label{fig:Demos_pcl1} |
| 9133 |
\end{center} |
| 9134 |
\end{figure} |
| 9135 |
|
| 9136 |
\begin{figure}[ht!] |
| 9137 |
\begin{center} |
| 9138 |
\begin{picture}(550,190) |
| 9139 |
\put(-10,-20){\includegraphics[scale=0.48]{include/cont_pcl_par}} |
| 9140 |
\put(240,-20){\includegraphics[scale=0.48]{include/cont_pcl}} |
| 9141 |
\end{picture} |
| 9142 |
\caption{Parameter space diagram (left) and corresponding |
| 9143 |
orbit segments in phase space (right), |
| 9144 |
where the connection is continued in $\rho$ and $\beta$. |
| 9145 |
To obtain these figures run \commandf{plot('cont')} or |
| 9146 |
\commandf{@pp cont}.} |
| 9147 |
\label{fig:Demos_pcl2} |
| 9148 |
\end{center} |
| 9149 |
\end{figure} |
| 9150 |
|
| 9151 |
|
| 9152 |
\newpage |
| 9153 |
%============================================================================== |
| 9154 |
%DEMO=snh====================================================================== |
| 9155 |
%============================================================================== |
| 9156 |
\section{ snh : SNH with Global reinjection: Point-to-cycle connections with Lin's method.} \label{sec:Demos_snh} |
| 9157 |
This demo computes point-to-cycle |
| 9158 |
(or EtoP connection; for equilibrium to periodic orbit) |
| 9159 |
and homoclinic point-to-point connections in the model vector field |
| 9160 |
\begin{equation} \begin{array}{cl} |
| 9161 |
x' &= \nu_1 x - \omega y - (\alpha x - \beta y) \sin \varphi - |
| 9162 |
(x^2+y^2)x + d (2 \cos \varphi+\nu_2)^2, \\ |
| 9163 |
y' &= \nu_1 y + \omega x - (\alpha y + \beta x) \sin \varphi - |
| 9164 |
(x^2+y^2) y + f (2 \cos \varphi+\nu_2)^2, \\ |
| 9165 |
\varphi' &= \nu_2 + s (x^2+y^2) + 2 \cos \varphi + c(x^2+y^2)^2, |
| 9166 |
\\ \end{array} \end{equation} |
| 9167 |
using Lin's method, as described in Krauskopf and Rie\ss |
| 9168 |
(2008). %\cite{kr} |
| 9169 |
This system describes the dynamics near a saddle-node Hopf bifurcation |
| 9170 |
with global reinjection, as discussed in Krauskopf and Oldeman(2006). |
| 9171 |
We keep the following parameters fixed throughout: $\omega=1$, |
| 9172 |
$\alpha=-1.0$, $\beta=0$, $s=-1$, $c=0$, $d=0.01$, and $f=\pi d$. |
| 9173 |
|
| 9174 |
Initially, we fix $\nu_2=-1.46$, since |
| 9175 |
for that value of $\nu_2$, close to $\nu_1=0.74$, |
| 9176 |
there exists a codimension-one connection from a periodic orbit |
| 9177 |
($\Gamma$) to an equilibrium ($b$). Together with a codimension-zero connection |
| 9178 |
back to $\Gamma$, it forms a heteroclinic cycle. In this example, the |
| 9179 |
flow is such that the codimension-one connecting orbit is an EtoP |
| 9180 |
orbit where the flow is from the periodic orbit to the equilibrium. |
| 9181 |
A homoclinic orbit |
| 9182 |
to $b$ also approaches this cycle. Below, we compute all three |
| 9183 |
connecting orbits. |
| 9184 |
|
| 9185 |
The below sequences of calculations can be carried out by |
| 9186 |
running the Python script \filef{snh.auto} included in the demo. |
| 9187 |
The individual connections can be computed by running the scripts |
| 9188 |
\filef{h1b.auto} (homoclinic orbit), \filef{cb.auto} (codimension-one |
| 9189 |
EtoP), and \filef{tb.auto} (codimension-zero EtoP). |
| 9190 |
See the scripts and the Fortran file \filef{snh.f90} for details on |
| 9191 |
how all parameters are mapped and which precise AUTO constants |
| 9192 |
are changed at every step. |
| 9193 |
|
| 9194 |
\subsection{The homoclinic point-to-point connection.} |
| 9195 |
The starting point for this investigation is a homoclinic orbit |
| 9196 |
connecting the point $b$ to itself, where the phase of $\varphi$ is |
| 9197 |
shifted by $2\pi$ (in other words, the homoclinic orbit reinjects |
| 9198 |
once and it is a heteroclinic orbit in the covering space). |
| 9199 |
We can most easily compute the homoclinic orbit using a |
| 9200 |
homotopy method |
| 9201 |
(see the {\cal HomCont} section \ref{sec:Starting_strategies} for details): |
| 9202 |
|
| 9203 |
\begin{enumerate} |
| 9204 |
\item |
| 9205 |
We locate the homoclinic orbit, or here, the heteroclinic orbit in the |
| 9206 |
covering space by continuing the one-dimensional stable manifold in |
| 9207 |
negative time. This way, {\cal HomCont} views the stable manifold as a |
| 9208 |
one-dimension unstable manifold to which its standard homotopy method |
| 9209 |
can be applied and which makes the method much more straightfoward |
| 9210 |
than starting with a two-dimensional unstable manifold. |
| 9211 |
We reach the unstable eigenspace of $E^u(b)$ as soon as the artificial |
| 9212 |
dummy parameter $\omega_1$, measuring a distance to $E^u(b)$, vanishes. |
| 9213 |
\item |
| 9214 |
We can now improve this connection by continuing in decreasing negative time, |
| 9215 |
keeping $\omega_1$ fixed, and freeing up the system parameter $\nu_1$. |
| 9216 |
\item |
| 9217 |
The resulting orbit can be continued forwards and backwards in the |
| 9218 |
system parameter $\nu_1$ and $\nu_2$, using standard {\cal HomCont} settings. |
| 9219 |
Note the setting of \parf{IEQUIB=1}: {\cal HomCont} auto-detects the phase |
| 9220 |
shift and only continues one equilibrium instead of treating |
| 9221 |
the orbit as a general heteroclinic orbit. |
| 9222 |
\end{enumerate} |
| 9223 |
|
| 9224 |
The resulting homoclinic orbit snakes in parameter space between the two |
| 9225 |
tangencies of the codimension-zero connection and terminates at a |
| 9226 |
segment of the codimension-one EtoP connection. We show this in |
| 9227 |
Figure~\ref{fig:Demos_snh3}. |
| 9228 |
|
| 9229 |
\subsection{The codimension-one point-to-cycle connection.} |
| 9230 |
To compute the codimension-one point-to-cycle connection, |
| 9231 |
the following steps are used (very similar to those in the |
| 9232 |
demo \commandf{pcl}): |
| 9233 |
\begin{enumerate} |
| 9234 |
\item |
| 9235 |
Continue the first equilibrium $a$ at $x=y=0$, |
| 9236 |
$\varphi=-\mathrm{arccos}(-\nu_2/2)$, which undergoes a Hopf bifurcation |
| 9237 |
at $\nu_1\approx 0.683447$. |
| 9238 |
\item |
| 9239 |
Follow the periodic orbit, emanating from the Hopf bifurcation, in |
| 9240 |
$\nu_1$ and its period $T$, until $\nu_1=0.74$. |
| 9241 |
\item |
| 9242 |
Extend the system, putting the variational equation (the eigenfunction) |
| 9243 |
into solution coordinates 4, 5, and 6. The trivial (0) eigenvector is |
| 9244 |
continued until we hit a branch point, corresponding to |
| 9245 |
where $\mu=$ \parf{PAR(12)} equals the natural logarithm of a Floquet |
| 9246 |
multiplier. |
| 9247 |
\item |
| 9248 |
Switch branches and continue the non-trivial eigenvector until its |
| 9249 |
norm $h$ equals 1. |
| 9250 |
\item |
| 9251 |
Extend the system again from 6 to 9 dimensions |
| 9252 |
to calculate a connection from the periodic orbit to the cross section |
| 9253 |
$\Sigma$, given by $\varphi=\pi$. |
| 9254 |
The connection starts at the non-trivial eigenvector with respect |
| 9255 |
to the periodic orbit with a distance of $\delta=-10^{-5}$, |
| 9256 |
and grows forwards in time |
| 9257 |
until it hits the section $\Sigma$ at time $T^-$. |
| 9258 |
\item |
| 9259 |
Extend the system one last time from 9 to 12 dimensions. |
| 9260 |
We calculate a connection backwards in time |
| 9261 |
from the second equilibrium $b$ at $x=y=0$, |
| 9262 |
$\varphi=\mathrm{arccos}(-\nu_2/2)$, starting at |
| 9263 |
its eigenvector over a distance of $\varepsilon=10^{-6}$, |
| 9264 |
to the cross section $\Sigma$, at time $T^+$. |
| 9265 |
The Lin vector, a normalized vector between the points of intersection |
| 9266 |
computed in steps 5 and 6, is put in $Z_x$, $Z_y$ and $Z_z$ |
| 9267 |
(\parf{PAR(24)-PAR(26)}). |
| 9268 |
Starting data for the Lin gap, which measures the distance between |
| 9269 |
these two points of intersection is put in $\eta=$ \parf{PAR(23)}. |
| 9270 |
\item |
| 9271 |
Close the gap computed in step 6 by continuing in |
| 9272 |
$\eta$, $\nu_1$, $\delta$, $\varepsilon$, $T^+$, $T^-$, $\mu$, and |
| 9273 |
$T$. The connection is found at $\nu_1=7.41189$. |
| 9274 |
This process is illustrated in Figure~\ref{fig:Demos_snh1}. |
| 9275 |
\item |
| 9276 |
Continue the point to cycle connection obtained in step 7 |
| 9277 |
in the system parameters $\nu_1$ and $\nu_2$, together with |
| 9278 |
$\delta$, $\varepsilon$, $T^+$, $T^-$, $\mu$, and $T$. |
| 9279 |
Connections for various |
| 9280 |
values of $(\nu_1,\nu_2)$ are shown in Figure \ref{fig:Demos_snh2}. |
| 9281 |
\end{enumerate} |
| 9282 |
|
| 9283 |
\begin{figure}[htb] |
| 9284 |
\begin{center} |
| 9285 |
\begin{picture}(550,190) |
| 9286 |
\put(-10,-20){\includegraphics[scale=0.48]{include/closegap_snh_par}} |
| 9287 |
\put(250,-15){\includegraphics[scale=0.48]{include/closegap_snh}} |
| 9288 |
\end{picture} |
| 9289 |
\caption{Closing the Lin-gap to obtain the point-to-cycle connection. |
| 9290 |
The left panel is a plot of $\nu_1$ versus the gap size $\eta$, |
| 9291 |
and the right panel shows the corresponding orbit segments. |
| 9292 |
To obtain these figures run \commandf{plot('closegap')} or |
| 9293 |
\commandf{@pp closegap}, and |
| 9294 |
\commandf{plot3('closegap')} or \commandf{@pl closegap}.} |
| 9295 |
\label{fig:Demos_snh1} |
| 9296 |
\end{center} |
| 9297 |
\end{figure} |
| 9298 |
|
| 9299 |
\begin{figure}[h!] |
| 9300 |
\begin{center} |
| 9301 |
\begin{picture}(550,190) |
| 9302 |
\put(-10,-20){\includegraphics[scale=0.48]{include/cb_snh_par}} |
| 9303 |
\put(250,-15){\includegraphics[scale=0.48]{include/cb_snh}} |
| 9304 |
\end{picture} |
| 9305 |
\caption{Parameter space diagram (left) and corresponding orbit |
| 9306 |
segments in phase space (right), |
| 9307 |
where the connection is continued in $\nu_1$ and $\nu_2$. |
| 9308 |
To obtain these figures run \commandf{plot('cb')} |
| 9309 |
or \commandf{@pp cb}, and \commandf{plot3('cb')} or |
| 9310 |
\commandf{@pl cb}. Label 13 denotes the largest connection, |
| 9311 |
at a saddle-node bifurcation of limit cycles, |
| 9312 |
and label 16 the smallest one, where the periodic orbit disappears in |
| 9313 |
a Hopf bifurcation.} |
| 9314 |
\label{fig:Demos_snh2} |
| 9315 |
\end{center} |
| 9316 |
\end{figure} |
| 9317 |
|
| 9318 |
\subsection{The codimension-zero point-to-cycle connection.} |
| 9319 |
Next we compute the codimension-zero connection back to the cycle |
| 9320 |
which must also exist near the accumulation of the parameter space |
| 9321 |
curve $h_1^b$. |
| 9322 |
This computation starts in the same way as the computation of the |
| 9323 |
codimension-one connection: steps 1 to 4 are the same except that in |
| 9324 |
step 3 we now find the negative Floquet exponent $\mu$, |
| 9325 |
instead of the positive exponent. Steps 5 to 8 proceed as follows: |
| 9326 |
\begin{enumerate} |
| 9327 |
\item[5.] |
| 9328 |
Similarly to step 5 before, we compute an orbit in the stable manifold |
| 9329 |
of the periodic orbit. However, Lin's method is not used, because it |
| 9330 |
is easier to use a homotopy method to connect directly to the unstable |
| 9331 |
eigenspace $E^u(b)$, which is given by the section where |
| 9332 |
$\varphi=\mathrm{arccos}(-\nu_2/2)$. |
| 9333 |
Because we compute an approximation to the stable rather than the |
| 9334 |
unstable manifold using almost the same boundary value problem, |
| 9335 |
we let $T^-$ be negative. Also the distance from the periodic orbit |
| 9336 |
to the connection is now given by $\delta=10^{-4}$, flipping its sign. |
| 9337 |
\item[6.] |
| 9338 |
Improve the connection computed in step 5, by decreasing |
| 9339 |
the negative value of $T^-$, fixing the starting point in $E^u(b)$ |
| 9340 |
and freeing $\delta$. |
| 9341 |
\item[7.] |
| 9342 |
Follow the codimension-zero connection in the system parameter |
| 9343 |
$\nu_1$, together with $\mu$, $T$, $\delta$, and $T^-$, also adding |
| 9344 |
an integral condition for the connection. \AUTO detects two fold |
| 9345 |
points (LP), corresponding to tangencies of $W^u(b)$ and $W^s(\Gamma)$. |
| 9346 |
\item[8.] |
| 9347 |
Continue the two folds forwards and backwards in two parameters, |
| 9348 |
by adding the system parameter $\nu_2$ and setting the \AUTO constant |
| 9349 |
\parf{ISW=2}. The folds terminate where $\Gamma$ disappears in a |
| 9350 |
Hopf bifurcations (small $\nu_1$) and disappears in a saddle-node bifurcation |
| 9351 |
of limit cycles (large $\nu_1$). In both cases the continued |
| 9352 |
connection and orbit stop converging, so \AUTO reports MX. |
| 9353 |
\end{enumerate} |
| 9354 |
|
| 9355 |
\begin{figure}[h!] |
| 9356 |
\begin{center} |
| 9357 |
\begin{picture}(550,190) |
| 9358 |
\put(-10,-20){\includegraphics[scale=0.48]{include/cont_snh_all_par}} |
| 9359 |
\put(251,-15){\includegraphics[scale=0.45]{include/cont_snh_all}} |
| 9360 |
\end{picture} |
| 9361 |
\caption{Parameter space diagram (left) and the corresponding homoclinic |
| 9362 |
orbit on the snaking curve $h_1^b$ for label 20 (right). The snaking |
| 9363 |
curve is in between the two tangencies for the codimension-zero EtoP |
| 9364 |
connection $t_b$ and terminates at a segment of the codimension-one |
| 9365 |
EtoP connection $c_b$. |
| 9366 |
To obtain these figures run \commandf{plot('all')} |
| 9367 |
or \commandf{@pp all}, and \commandf{plot3('all')} or |
| 9368 |
\commandf{@pl all}.} |
| 9369 |
\label{fig:Demos_snh3} |
| 9370 |
\end{center} |
| 9371 |
\end{figure} |
| 9372 |
|
| 9373 |
\newpage |
| 9374 |
%============================================================================== |
| 9375 |
%DEMO=fnc====================================================================== |
| 9376 |
%============================================================================== |
| 9377 |
\section{ fnc : Canards in the FitzHugh-Nagumo system.} \label{sec:Demos_fnc} |
| 9378 |
|
| 9379 |
This demo computes attracting and repelling slow manifolds |
| 9380 |
in the self-coupled FitzHugh-Nagumo system: |
| 9381 |
\begin{equation} \label{eq:Demos_fnc} \begin{array}{cl} |
| 9382 |
v' &= h - (v^3 - v + 1) / 2 - \gamma s v,\\ |
| 9383 |
h' &= -\varepsilon (2h + 2.6 v),\\ |
| 9384 |
s' &= -\varepsilon \delta s.\\ |
| 9385 |
\end{array} \end{equation} |
| 9386 |
Furthermore, this demo continues canard orbits in parameter space. |
| 9387 |
Typically, trajectories in slow-fast systems such as this one |
| 9388 |
consist of a slow part |
| 9389 |
that follows the attracting slow manifold, followed by a fast part |
| 9390 |
when the trajectory hits a fold with respect to the fast direction. |
| 9391 |
After this jump, the trajectory follows a slow segment again. |
| 9392 |
A canard orbit, on the other hand, does not jump at the fold but |
| 9393 |
follows the repelling slow manifold. A central role is played by the |
| 9394 |
two-dimensional critical manifold $S$ which is given by the nullcline |
| 9395 |
of the fast variable in the limit for $\varepsilon=0$. It consists of |
| 9396 |
attracting and repelling sheets $S^a$ and $S^r$, which generically |
| 9397 |
meet at fold curves $F$ with respect to the fast flow direction. |
| 9398 |
For details, see \citename{DeKrOs:08} \citeyear{DeKrOs:08,DeKrOs:09}. |
| 9399 |
|
| 9400 |
For system (\ref{eq:Demos_fnc}), where we fix $\gamma=0.5$ and |
| 9401 |
$\delta=0.565$, the critical manifold is given by |
| 9402 |
\begin{equation} \label{eq:Demos_fnc_S} |
| 9403 |
S=\{(v,h,s)\in \mathbb{R}^3| 2h-v^3+v-1-vs=0\}, |
| 9404 |
\end{equation} |
| 9405 |
which is folded with respect to the fast variable $v$ along the folded |
| 9406 |
node curve |
| 9407 |
\begin{equation} \label{eq:Demos_fnc_F} |
| 9408 |
F=\{(v,h,s)\in S| 1 - 3v^2=0\}. |
| 9409 |
\end{equation} |
| 9410 |
|
| 9411 |
The computation of the slow manifolds is performed in three steps. |
| 9412 |
They start with a constant-in-time solution at the folded node singularity |
| 9413 |
$(v,h,s)=(-0.49,0.6176,0.2797)$ for $\varepsilon=0.015$ on the scaled |
| 9414 |
time interval $[0,1]$ with time lengths $T^a=0$ and $T^r=0$, respectively. |
| 9415 |
Then, for the computation of the attracting manifold $(v^a,h^a,s^a)$, |
| 9416 |
via boundary conditions we always keep the starting point |
| 9417 |
$(v^a(0),h^a(0),s^a(0))$ on $S$ and $s^a(1)$ fixed to $0.2797$. |
| 9418 |
The steps are as follows: |
| 9419 |
\begin{enumerate} |
| 9420 |
\item |
| 9421 |
Homotopy step 1: grow the orbit segment in $T^a$, continuing also in |
| 9422 |
$v^a(0)$, $h^a(0)$, and $s^a(0)$, where the starting point |
| 9423 |
is kept on the folded node $F$ until $s^a(0)=0.6$. |
| 9424 |
\item |
| 9425 |
Homotopy step 2: the extra boundary condition for $F$ is dropped, |
| 9426 |
and we now instead fix $s^a(0)=0.6$. |
| 9427 |
We continue in $v^a(0)$, $h^a(0)$, and $T^a$ until $h^a(0)=-6.0$. |
| 9428 |
\item |
| 9429 |
Actual computation: we continue in $v^a(0)$, $s^a(0)$, and $T^a$, |
| 9430 |
fixing $h^a(0)=-6.0$. The end-point coordinates $v^a(1)$ and $h^a(1)$ |
| 9431 |
are monitored so they can be matched with starting points of the |
| 9432 |
repelling manifold. These matches were found manually and are |
| 9433 |
now indicated at specific values of $T^a$ as UZ labels. |
| 9434 |
\end{enumerate} |
| 9435 |
|
| 9436 |
For the repelling manifold $(v^r,h^r,s^r)$, |
| 9437 |
we always keep the end point $(v^r(1),h^r(1),s^r(1))$ on $S$ |
| 9438 |
and $s^r(0)$ fixed to $0.2797$. |
| 9439 |
The steps are now as follows: |
| 9440 |
\begin{enumerate} |
| 9441 |
\item |
| 9442 |
Homotopy step 1: grow the orbit segment in $T^r$ until $s^r(1)=0.05$. |
| 9443 |
\item |
| 9444 |
Homotopy step 2: the extra boundary condition for $F$ is dropped, |
| 9445 |
and we now instead fix $s^r(1)=0.05$. We continue until $v^r(1)=0$. |
| 9446 |
\item |
| 9447 |
Actual computation: we continue in $s^r(0)$ and $T^r$, |
| 9448 |
fixing $v^r(1)=0$. The starting point coordinates $v^r(0)$ and $h^r(0)$ |
| 9449 |
are now monitored for matches with the attracting manifold. |
| 9450 |
\end{enumerate} |
| 9451 |
|
| 9452 |
The demo contains one folder \filef{attr} |
| 9453 |
for the "attracting" slow manifold and one folder \filef{rep} for |
| 9454 |
the "repelling" slow manifold. In each of these two folders, the |
| 9455 |
manifolds can be computed by running the commands |
| 9456 |
\filef{auto attr.auto} and \filef{auto rep.auto}, respectively. |
| 9457 |
The alternative |
| 9458 |
script files \filef{attrc.auto} and \filef{repc.auto} use constants |
| 9459 |
files for every step instead of specifying the constants in the |
| 9460 |
script. |
| 9461 |
|
| 9462 |
The main folder contains AUTO files to continue in |
| 9463 |
parameter space six of the secondary canards of this systems. The |
| 9464 |
script \filef{fnc.auto} first computes the attracting and |
| 9465 |
repelling slow manifolds in their respective folders and next |
| 9466 |
concatenates matching manifolds in Python. Six of these canard |
| 9467 |
orbits are then continued in $\varepsilon$ in both decreasing and |
| 9468 |
increasing direction. |
| 9469 |
|
| 9470 |
If $T^a_j$ is the integration time for the canard segment $\xi^a_j$ on the |
| 9471 |
attracting slow manifold and $T^r_j$ is the integration time for the orbit |
| 9472 |
segment $\xi^r_j$ on the repelling slow manifold corresponding to the same |
| 9473 |
canard solution, then the concatenated orbit segment $\xi_j$ has |
| 9474 |
$T^c_j=T^a_j+T^r_j$ as integration time. |
| 9475 |
The orbit $\xi_j$ is obtained from $\xi^a_j$ and $\xi^r_j$ by, |
| 9476 |
concatenating $\xi^a_j$ and $\xi^r_j$, and rescaling the time |
| 9477 |
so that it runs monotonically from 0 to 1. |
| 9478 |
|
| 9479 |
Parameters are then also copied, where only those relating to the |
| 9480 |
start of the attracting manifold and the end of the repelling manifold |
| 9481 |
are kept, for these parameters are used for the boundary conditions of |
| 9482 |
the canard orbits. The new integration time $T^c_j$ is stored in |
| 9483 |
\parf{PAR(11)}. |
| 9484 |
|
| 9485 |
Two constant files are provided. They correspond to the continuation |
| 9486 |
in epsilon in both decreasing (\filef{c.fnc}) and |
| 9487 |
and increasing (\filef{c.fnc.epsplus}) direction. |
| 9488 |
Continuation in any other system parameter is |
| 9489 |
easily obtained by editing the \parf{ICP} entry. |
| 9490 |
|
| 9491 |
The script \filef{plot.auto} produces the plots |
| 9492 |
we show here, in Figures~\ref{fig:Demos_fnc1}, |
| 9493 |
\ref{fig:Demos_fnc2}, and \ref{fig:Demos_fnc3}. |
| 9494 |
|
| 9495 |
\begin{figure}[h!] |
| 9496 |
\begin{center} |
| 9497 |
\begin{picture}(550,190) |
| 9498 |
\put(-10,-20){\includegraphics[scale=0.48]{include/fnc_attrrep1}} |
| 9499 |
\put(251,-15){\includegraphics[scale=0.45]{include/fnc_attrrep2}} |
| 9500 |
\end{picture} |
| 9501 |
\caption{Repelling and attracting slow manifold curves |
| 9502 |
where they match up (left) and their intersection curves at $s=0.2797$ in |
| 9503 |
the $(h,v)$ plane (right).} |
| 9504 |
\label{fig:Demos_fnc1} |
| 9505 |
\end{center} |
| 9506 |
\end{figure} |
| 9507 |
|
| 9508 |
\begin{figure}[h!] |
| 9509 |
\begin{center} |
| 9510 |
\begin{picture}(550,190) |
| 9511 |
\put(-10,-20){\includegraphics[scale=0.48]{include/fnc_canards1}} |
| 9512 |
\put(240,-20){\includegraphics[scale=0.48]{include/fnc_canards2}} |
| 9513 |
\end{picture} |
| 9514 |
\caption{Continuation of canard orbits: the AUTO $L_2$ norm as |
| 9515 |
a function of $\varepsilon$ for all six orbits (left), and |
| 9516 |
a projection of labels 4, 8, 11, and 16 (black, red, blue, green) |
| 9517 |
of the orbit $\xi_3$ on the $(v,s)$ plane (right).} |
| 9518 |
\label{fig:Demos_fnc2} |
| 9519 |
\end{center} |
| 9520 |
\end{figure} |
| 9521 |
|
| 9522 |
\begin{figure}[h!] |
| 9523 |
\begin{center} |
| 9524 |
\begin{picture}(550,130) |
| 9525 |
\put(-17,-20){\includegraphics[scale=0.5]{include/fnc_canards3}} |
| 9526 |
\put(233,-20){\includegraphics[scale=0.5]{include/fnc_canards4}} |
| 9527 |
\put(359,-20){\includegraphics[scale=0.5]{include/fnc_canards5}} |
| 9528 |
\end{picture} |
| 9529 |
\caption{Continuation of canard orbits: projection of all canard |
| 9530 |
orbits on the $(v,s)$ plane for $\varepsilon=0.015$ (left), |
| 9531 |
$\varepsilon=10^{-4}$ (middle), and $\varepsilon=10^{-6}$ (right).} |
| 9532 |
\label{fig:Demos_fnc3} |
| 9533 |
\end{center} |
| 9534 |
\end{figure} |
| 9535 |
|
| 9536 |
%============================================================================== |
| 9537 |
%============================================================================== |
| 9538 |
\chapter{ \AUTO Demos : Parabolic PDEs.} \label{ch:Demos_PDE} |
| 9539 |
%============================================================================== |
| 9540 |
%============================================================================== |
| 9541 |
|
| 9542 |
\newpage |
| 9543 |
%============================================================================== |
| 9544 |
%DEMO=pd1====================================================================== |
| 9545 |
%============================================================================== |
| 9546 |
\section{ pd1 : Stationary States (1D Problem).} \label{sec:Demos_pd1} |
| 9547 |
This demo uses Euler's method to locate a stationary solution of |
| 9548 |
a nonlinear parabolic PDE, followed by continuation of this stationary |
| 9549 |
state in a free problem parameter. The equation is |
| 9550 |
$$ \frac{\partial u }{ \partial t} |
| 9551 |
= D~\frac{\partial^2 u }{ \partial x^2} ~+~ p_1~ u ~( 1-u) , $$ |
| 9552 |
on the space interval $[0,L]$, where $L=$~{\tt PAR(11)}~$=10$ is fixed throughout, |
| 9553 |
as is the diffusion constant $D=$~{\tt PAR(15)}~$=0.1$. |
| 9554 |
The boundary conditions are $u(0) = u(L) = 0$ for all time. |
| 9555 |
|
| 9556 |
In the first run the continuation parameter is the independent time variable, |
| 9557 |
namely \parf{PAR(14)}, while $p_1=1$ is fixed. |
| 9558 |
The \AUTO-constants \parf{DS}, \parf{DSMIN}, and \parf{DSMAX} then control the step size |
| 9559 |
in space-time, here consisting of \parf{PAR(14)} and $u(x)$. |
| 9560 |
Initial data are $u(x)=\sin(\pi x/L)$ at time zero. |
| 9561 |
Note that in the subroutine \funcf{ STPNT} the initial data must be scaled to |
| 9562 |
the unit interval, and that the scaled derivative must also be provided; |
| 9563 |
see the equations-file \filef{pv1.f90}. |
| 9564 |
In the second run the continuation parameter is $p_1$. |
| 9565 |
|
| 9566 |
Euler time integration is only first order accurate, so that |
| 9567 |
the time step must be sufficiently small to ensure correct results. |
| 9568 |
Indeed, this option has been added only as a convenience, and should |
| 9569 |
generally be used only to locate stationary states. |
| 9570 |
|
| 9571 |
\begin{table}[htbp] |
| 9572 |
\begin{center} |
| 9573 |
\begin{tabular}{| l | l |} |
| 9574 |
\hline |
| 9575 |
\AUTO-COMMAND & ACTION \\ |
| 9576 |
\hline |
| 9577 |
%============================================================================== |
| 9578 |
\commandf{mkdir pd1} & create an empty work directory \\ |
| 9579 |
\commandf{cd pd1} & change directory \\ |
| 9580 |
\commandf{demo('pd1') } & copy the demo files to the work directory \\ |
| 9581 |
\hline |
| 9582 |
%============================================================================== |
| 9583 |
\commandf{r1=run(e='pd1',c='pd1') } & time integration towards stationary state \\ |
| 9584 |
\commandf{save(r1,'1') } & save output-files as \filef{b.1, s.1, d.1} \\ |
| 9585 |
\hline |
| 9586 |
%============================================================================== |
| 9587 |
\parbox[t]{3.3in}{ |
| 9588 |
\commandf{r2=run(r1,IPS=17,ICP=[1],NTST=20, |
| 9589 |
NMX=100,RL1=50,NPR=25,DS=0.1,DSMAX=0.5)}} |
| 9590 |
& \parbox[t]{3in}{continuation of stationary states; read restart data |
| 9591 |
from the last label of \parf{r1} \vspace{0.2cm}} \\ |
| 9592 |
\commandf{save(r2,'2') } & save output-files as \filef{b.2, s.2, d.2} \\ |
| 9593 |
\hline |
| 9594 |
%============================================================================== |
| 9595 |
\end{tabular} |
| 9596 |
\caption{Commands for running demo \filef{pd1}.} |
| 9597 |
\label{tbl:demo_pd1} |
| 9598 |
\end{center} |
| 9599 |
\end{table} |
| 9600 |
|
| 9601 |
\newpage |
| 9602 |
%============================================================================== |
| 9603 |
%DEMO=pd2====================================================================== |
| 9604 |
%============================================================================== |
| 9605 |
\section{ pd2 : Stationary States (2D Problem).} \label{sec:Demos_pd2} |
| 9606 |
This demo uses Euler's method to locate a stationary solution of |
| 9607 |
a nonlinear parabolic PDE, followed by continuation of this stationary |
| 9608 |
state in a free problem parameter. The equations are |
| 9609 |
\begin{equation} \begin{array}{cl} |
| 9610 |
{\partial u_1 / \partial t} &= D_1~{\partial^2 u_1 / \partial x^2} |
| 9611 |
~+~ p_1~ u ~( 1-u) ~-~ u_1 u_2 , \\ |
| 9612 |
{\partial u_2 / \partial t} |
| 9613 |
&= D_2~{\partial^2 u_2 / \partial x^2} ~-~ u_2 ~+~ u_1 u_2 , \\ |
| 9614 |
\end{array} \end{equation} |
| 9615 |
on the space interval $[0,L]$, where $L=$~\parf{PAR(11)}~$=1$ is fixed throughout, |
| 9616 |
as are the diffusion constants $D_1=$~\parf{PAR(15)}~$=1$ and $D_2=$~\parf{PAR(16)}~$=1$. |
| 9617 |
The boundary conditions are $u_1(0) = u_1(L) = 0$ and $u_2(0) = u_2(L) = 1$, |
| 9618 |
for all time. |
| 9619 |
|
| 9620 |
In the first run the continuation parameter is the independent time variable, |
| 9621 |
namely \parf{PAR(14)}, while $p_1=12$ is fixed. |
| 9622 |
The \AUTO-constants \parf{DS}, \parf{DSMIN}, and \parf{DSMAX} then control the step size |
| 9623 |
in space-time, here consisting of \parf{PAR(14)} and $(u_1(x),u_2(x))$. |
| 9624 |
Initial data at time zero are $u_1(x)=\sin(\pi x/L)$ and $u_2(x)=1$. |
| 9625 |
Note that in the subroutine \funcf{ STPNT} the initial data must be scaled to |
| 9626 |
the unit interval, and that the scaled derivatives must also be provided; |
| 9627 |
see the equations-file \filef{pv2.f90}. |
| 9628 |
In the second run the continuation parameter is $p_1$. |
| 9629 |
A branch point is located during this run. |
| 9630 |
|
| 9631 |
Euler time integration is only first order accurate, so that |
| 9632 |
the time step must be sufficiently small to ensure correct results. |
| 9633 |
Indeed, this option has been added only as a convenience, and should |
| 9634 |
generally be used only to locate stationary states. |
| 9635 |
|
| 9636 |
|
| 9637 |
\begin{table}[htbp] |
| 9638 |
\begin{center} |
| 9639 |
\begin{tabular}{| l | l |} |
| 9640 |
\hline |
| 9641 |
\AUTO-COMMAND & ACTION \\ |
| 9642 |
\hline |
| 9643 |
%============================================================================== |
| 9644 |
\commandf{mkdir pd2} & create an empty work directory \\ |
| 9645 |
\commandf{cd pd2} & change directory \\ |
| 9646 |
\commandf{demo('pd2') } & copy the demo files to the work directory \\ |
| 9647 |
\hline |
| 9648 |
%============================================================================== |
| 9649 |
|
| 9650 |
\commandf{r1=run(e='pd2',c='pd2') } & time integration towards stationary state \\ |
| 9651 |
\commandf{save(r1,'1')} & save output-files as \filef{b.1, s.1, d.1} \\ |
| 9652 |
\hline |
| 9653 |
%============================================================================== |
| 9654 |
\parbox[t]{3.4in}{ |
| 9655 |
\commandf{r2 = run(r1,IPS=17,ICP=[1],ISP=2,NMX=15, |
| 9656 |
NPR=50,DS=-0.1,DSMAX=1.0,UZR=\{-1:0.0\})}} & \parbox[t]{3in}{continuation of stationary states; read restart data from \filef{s.1} \vspace{0.2cm}}\\ |
| 9657 |
\commandf{save(r2,'2') } & save output-files as \filef{b.2, s.2, d.2} \\ |
| 9658 |
\hline |
| 9659 |
%============================================================================== |
| 9660 |
\end{tabular} |
| 9661 |
\caption{Commands for running demo \filef{pd2}.} |
| 9662 |
\label{tbl:demo_pd2} |
| 9663 |
\end{center} |
| 9664 |
\end{table} |
| 9665 |
|
| 9666 |
\newpage |
| 9667 |
%============================================================================== |
| 9668 |
%DEMO=wav====================================================================== |
| 9669 |
%============================================================================== |
| 9670 |
\section{ wav : Periodic Waves.} \label{sec:Demos_wav} |
| 9671 |
This demo illustrates the computation of various periodic wave solutions |
| 9672 |
to a system of coupled parabolic partial differential equations |
| 9673 |
on the spatial interval $[0,1]$. |
| 9674 |
The equations, that model an enzyme catalyzed reaction |
| 9675 |
(\citename{DoKe:86a} \citeyear{DoKe:86a}) are~: |
| 9676 |
\begin{equation} \begin{array}{cl} |
| 9677 |
{\partial u_1 / \partial t} |
| 9678 |
&= |
| 9679 |
~{\partial^{2} u_1 / \partial x^{2}} |
| 9680 |
-p_1 \bigl[p_4 R(u_1,u_2) - (p_2 - u_1) \bigr] ,\\ |
| 9681 |
{\partial u_2 / \partial t} |
| 9682 |
&= |
| 9683 |
\beta {\partial^{2} u_2 / \partial x^{2}} |
| 9684 |
-p_1 \bigl[p_4 R(u_1,u_2) - p_7 (p_3 - u_2) \bigr].\\ |
| 9685 |
\end{array} \end{equation} |
| 9686 |
All equation parameters, except $p_3$, are fixed throughout. |
| 9687 |
|
| 9688 |
\begin{table}[htbp] |
| 9689 |
\begin{center} |
| 9690 |
\begin{tabular}{| l | l |} |
| 9691 |
\hline |
| 9692 |
\AUTO-COMMAND & ACTION \\ |
| 9693 |
\hline |
| 9694 |
%============================================================================== |
| 9695 |
\commandf{mkdir wav} & create an empty work directory \\ |
| 9696 |
\commandf{cd wav} & change directory \\ |
| 9697 |
\commandf{demo('wav')} & copy the demo files to the work directory \\ |
| 9698 |
\hline |
| 9699 |
%============================================================================== |
| 9700 |
\commandf{r1=run(e='wav',c='wav')} & |
| 9701 |
\parbox[t]{3in}{ |
| 9702 |
1st run; stationary solutions of the system without diffusion \vspace{0.2cm}} \\ |
| 9703 |
\commandf{save(r1,"ode")} & save output-files as \filef{b.ode, s.ode, d.ode} \\ |
| 9704 |
\hline |
| 9705 |
%============================================================================== |
| 9706 |
\commandf{r2=run(e='wav',c='wav',IPS=11)} & |
| 9707 |
\parbox[t]{3in}{2nd run; detect bifurcations to wave train solutions \vspace{0.2cm}}\\ |
| 9708 |
\hline |
| 9709 |
%============================================================================== |
| 9710 |
\parbox[t]{3.5in}{ |
| 9711 |
\commandf{r3=run(r2("HB1"),IPS=12,ICP=[3,11],ILP=0, |
| 9712 |
ISP=0,RL1=700,DS=0.1,DSMAX=1.0, |
| 9713 |
UZR=\{3:[610.0,638.0], -11:500.0\})}} |
| 9714 |
& \parbox[t]{3in}{3rd run; wave train solutions of fixed wave speed \vspace{0.2cm}}\\ |
| 9715 |
\commandf{save(r2+r3,'wav') } & save output to \filef{b.wav, s.wav, d.wav} \\ |
| 9716 |
\hline |
| 9717 |
%============================================================================== |
| 9718 |
\parbox[t]{3.5in}{ |
| 9719 |
\commandf{uz3=load(r3("UZ3"),RL1=1000, |
| 9720 |
DS=0.5,DSMAX=2.0,UZR=\{\})}}& |
| 9721 |
load restart label\\ |
| 9722 |
\commandf{r4=run(uz3,ICP=[3,10],NPR=50)} & \parbox[t]{3in}{4th run; wave train solutions of fixed wave length \vspace{0.2cm}}\\ |
| 9723 |
\commandf{save(r4,'rng') } & save output-files as \filef{b.rng, s.rng, d.rng} \\ |
| 9724 |
\hline |
| 9725 |
%============================================================================== |
| 9726 |
\commandf{r5=run(uz3,IPS=14,ICP=[14],NMX=230,NPR=5)} & \parbox[t]{3in}{5th run; time evolution computation \vspace{0.2cm}}\\ |
| 9727 |
\commandf{save(r5,'tim') } & save output-files as \filef{b.tim, s.tim, d.tim} \\ |
| 9728 |
% |
| 9729 |
%# |
| 9730 |
\hline |
| 9731 |
%============================================================================== |
| 9732 |
\end{tabular} |
| 9733 |
\caption{Commands for running demo \filef{wav}.} |
| 9734 |
\label{tbl:demo_wav} |
| 9735 |
\end{center} |
| 9736 |
\end{table} |
| 9737 |
|
| 9738 |
\newpage |
| 9739 |
%============================================================================== |
| 9740 |
%DEMO=brc====================================================================== |
| 9741 |
%============================================================================== |
| 9742 |
\section{ brc : Chebyshev Collocation in Space.} \label{sec:Demos_brc} |
| 9743 |
This demo illustrates the computation of stationary solutions and periodic |
| 9744 |
solutions to systems of parabolic PDEs in one space variable, |
| 9745 |
using Chebyshev collocation in space. |
| 9746 |
More precisely, the approximate solution is assumed of the form |
| 9747 |
$u(x,t) = \sum_{k=0}^{n+1} u_k(t) \ell_k(x)$. |
| 9748 |
Here $u_k(t)$ corresponds to $u(x_k,t)$ at the Chebyshev points |
| 9749 |
$\bigl\{ x_k \bigr\}_{k=1}^{n}$ with respect to the interval $[0,1]$. |
| 9750 |
The polynomials $\bigl\{ \ell_k(x) \bigr\}_{k=0}^{n+1}$ are the Lagrange |
| 9751 |
interpolating coefficients with respect to points |
| 9752 |
$\bigl\{ x_k \bigr\}_{k=0}^{n+1}$, where $x_0=0$ and $x_{n+1}=1$. |
| 9753 |
The number of Chebyshev points in $[0,1]$, |
| 9754 |
as well as the number of equations in the PDE system, |
| 9755 |
can be set by the user in the file \filef{brc.f90}. |
| 9756 |
|
| 9757 |
As an illustrative application we consider the Brusselator |
| 9758 |
(\citename{HoKnKu:87} \citeyear{HoKnKu:87}) |
| 9759 |
\begin{equation} \begin{array}{cl} |
| 9760 |
u_t &= {D_x / L^2} u_{xx} + u^2v - (B+1)u + A, \\ |
| 9761 |
v_t &= {D_y / L^2} v_{xx} - u^2v + Bu, \\ |
| 9762 |
\end{array} \end{equation} |
| 9763 |
with boundary conditions $u(0,t)=u(1,t)=A$ |
| 9764 |
and $v(0,t)=v(1,t)=B/A$. |
| 9765 |
|
| 9766 |
Note that, given the non-adaptive spatial discretization, |
| 9767 |
the computational procedure here is not appropriate for |
| 9768 |
PDEs with solutions that rapidly vary in space, and care must |
| 9769 |
be taken to recognize spurious solutions and bifurcations. |
| 9770 |
|
| 9771 |
\begin{table}[htbp] |
| 9772 |
\begin{center} |
| 9773 |
\begin{tabular}{| l | l |} |
| 9774 |
\hline |
| 9775 |
\AUTO-COMMAND & ACTION \\ |
| 9776 |
\hline |
| 9777 |
%============================================================================== |
| 9778 |
\commandf{mkdir brc} & create an empty work directory \\ |
| 9779 |
\commandf{cd brc} & change directory \\ |
| 9780 |
\commandf{demo('brc')} & copy the demo files to the work directory \\ |
| 9781 |
\hline |
| 9782 |
%============================================================================== |
| 9783 |
\commandf{r1=run(e='brc',c='brc') } & \parbox[t]{3in}{ |
| 9784 |
compute the stationary solution family with Hopf bifurcations. |
| 9785 |
\vspace{0.2cm}}\\ |
| 9786 |
\hline |
| 9787 |
%============================================================================== |
| 9788 |
\commandf{r2=run(r1("HB1"),IPS=2,ICP=[5,11]) } & \parbox[t]{3in}{compute a family of periodic solutions from the first Hopf point. \vspace{0.2cm}}\\ |
| 9789 |
\hline |
| 9790 |
%============================================================================== |
| 9791 |
\commandf{r3=run(r2("BP1"),ISW=-1) } & \parbox[t]{3in}{compute a solution family from a secondary periodic bifurcation. \vspace{0.2cm}}\\ |
| 9792 |
\commandf{save(r1+r2+r3,'brc') } & save all output to \filef{b.brc, s.brc, d.brc} \\ |
| 9793 |
\hline |
| 9794 |
%============================================================================== |
| 9795 |
\end{tabular} |
| 9796 |
\caption{Commands for running demo \filef{brc}.} |
| 9797 |
\label{tbl:demo_brc} |
| 9798 |
\end{center} |
| 9799 |
\end{table} |
| 9800 |
|
| 9801 |
|
| 9802 |
\newpage |
| 9803 |
%============================================================================== |
| 9804 |
%DEMO=brf====================================================================== |
| 9805 |
%============================================================================== |
| 9806 |
\section{ brf : Finite Differences in Space.} \label{sec:Demos_brf} |
| 9807 |
This demo illustrates the computation of stationary solutions and periodic |
| 9808 |
solutions to systems of parabolic PDEs in one space variable. |
| 9809 |
A fourth order accurate finite difference approximation is used to |
| 9810 |
approximate the second order space derivatives. |
| 9811 |
This reduces the PDE to an autonomous ODE of fixed dimension |
| 9812 |
which \AUTO is capable of treating. |
| 9813 |
The spatial mesh is uniform; the number of mesh intervals, |
| 9814 |
as well as the number of equations in the PDE system, |
| 9815 |
can be set by the user in the file \filef{brf.f90}. |
| 9816 |
|
| 9817 |
As an illustrative application we consider the Brusselator |
| 9818 |
(\citename{HoKnKu:87} \citeyear{HoKnKu:87}) |
| 9819 |
\begin{equation} \begin{array}{cl} |
| 9820 |
u_t &= {D_x / L^2} u_{xx} + u^2v - (B+1)u + A, \\ |
| 9821 |
v_t &= {D_y / L^2} v_{xx} - u^2v + Bu, \\ |
| 9822 |
\end{array} \end{equation} |
| 9823 |
with boundary conditions $u(0,t)=u(1,t)=A$ |
| 9824 |
and $v(0,t)=v(1,t)=B/A$. |
| 9825 |
|
| 9826 |
Note that, given the non-adaptive spatial discretization, |
| 9827 |
the computational procedure here is not appropriate for |
| 9828 |
PDEs with solutions that rapidly vary in space, and care must |
| 9829 |
be taken to recognize spurious solutions and bifurcations. |
| 9830 |
|
| 9831 |
|
| 9832 |
\begin{table}[htbp] |
| 9833 |
\begin{center} |
| 9834 |
\begin{tabular}{| l | l |} |
| 9835 |
\hline |
| 9836 |
\AUTO-COMMAND & ACTION \\ |
| 9837 |
\hline |
| 9838 |
%============================================================================== |
| 9839 |
\commandf{mkdir brf} & create an empty work directory \\ |
| 9840 |
\commandf{cd brf} & change directory \\ |
| 9841 |
\commandf{demo('brf') } & copy the demo files to the work directory \\ |
| 9842 |
\hline |
| 9843 |
%============================================================================== |
| 9844 |
\commandf{r1=run(e='brf',c='brf') } & \parbox[t]{3in}{compute the |
| 9845 |
stationary solution family with Hopf bifurcations \vspace{0.2cm}} \\ |
| 9846 |
\hline |
| 9847 |
%============================================================================== |
| 9848 |
\parbox[t]{3in}{ |
| 9849 |
\commandf{r2=run(r1("HB1"),IPS=2,ICP=[5,11], NMX=120,EPSL=1e-8) } |
| 9850 |
\vspace{0.2cm}} |
| 9851 |
& \parbox[t]{3in}{compute a family of periodic solutions from the first Hopf point. \vspace{0.2cm}}\\ |
| 9852 |
\hline |
| 9853 |
%============================================================================== |
| 9854 |
\parbox[t]{3in}{ |
| 9855 |
\commandf{r3=run(r2("BP1"),ISW=-1, NMX=100,EPSL=1e-7) } |
| 9856 |
\vspace{0.2cm}} |
| 9857 |
& \parbox[t]{3in}{compute a solution family from a secondary periodic bifurcation.\vspace{0.2cm}}\\ |
| 9858 |
\commandf{save(r1+r2+r3,'brf') } & save all output to \filef{b.brf, s.brf, d.brf} \\ |
| 9859 |
\hline |
| 9860 |
%============================================================================== |
| 9861 |
\end{tabular} |
| 9862 |
\caption{Commands for running demo \filef{brf}.} |
| 9863 |
\label{tbl:demo_brf} |
| 9864 |
\end{center} |
| 9865 |
\end{table} |
| 9866 |
|
| 9867 |
\newpage |
| 9868 |
%============================================================================== |
| 9869 |
%DEMO=bru====================================================================== |
| 9870 |
%============================================================================== |
| 9871 |
\section{ bru : Euler Time Integration (the Brusselator).} \label{sec:Demos_bru} |
| 9872 |
This demo illustrates the use of Euler's method for time integration |
| 9873 |
of a nonlinear parabolic PDE. |
| 9874 |
The example is the Brusselator |
| 9875 |
(\citename{HoKnKu:87} \citeyear{HoKnKu:87}), given by |
| 9876 |
\begin{equation} \begin{array}{cl} |
| 9877 |
u_t &= {D_x / L^2} u_{xx} + u^2v - (B+1)u + A, \\ |
| 9878 |
v_t &= {D_y / L^2} v_{xx} - u^2v + Bu, \\ |
| 9879 |
\end{array} \end{equation} |
| 9880 |
with boundary conditions $u(0,t)=u(1,t)=A$ |
| 9881 |
and $v(0,t)=v(1,t)=B/A$. All parameters are given fixed values |
| 9882 |
for which a stable periodic solution is known to exist. |
| 9883 |
|
| 9884 |
The continuation parameter is the independent time variable, |
| 9885 |
namely \parf{PAR(14)}. |
| 9886 |
The \AUTO-constants \parf{DS}, \parf{DSMIN}, and \parf{DSMAX} |
| 9887 |
then control the step size |
| 9888 |
in space-time, here consisting of \parf{PAR(14)} and $(u(x),v(x))$. |
| 9889 |
Initial data at time zero are |
| 9890 |
$u(x)=A - 0.5 \sin(\pi x)$ and |
| 9891 |
$v(x)=B/A + 0.7 \sin(\pi x)$. |
| 9892 |
Note that in the subroutine \funcf{ STPNT} the space derivatives of $u$ and $v$ |
| 9893 |
must also be provided; |
| 9894 |
see the equations-file \filef{bru.f90}. |
| 9895 |
|
| 9896 |
Euler time integration is only first order accurate, so that |
| 9897 |
the time step must be sufficiently small to ensure correct results. |
| 9898 |
This option has been added only as a convenience, and should |
| 9899 |
generally be used only to locate stationary states. |
| 9900 |
Indeed, in the case of the asymptotic periodic state of this demo, |
| 9901 |
the number of required steps is very large and use of a better time |
| 9902 |
integrator is advisable. |
| 9903 |
|
| 9904 |
|
| 9905 |
\begin{table}[htbp] |
| 9906 |
\begin{center} |
| 9907 |
\begin{tabular}{| l | l |} |
| 9908 |
\hline |
| 9909 |
\AUTO-COMMAND & ACTION \\ |
| 9910 |
\hline |
| 9911 |
%============================================================================== |
| 9912 |
\commandf{mkdir bru} & create an empty work directory \\ |
| 9913 |
\commandf{cd bru} & change directory \\ |
| 9914 |
\commandf{demo('bru') } & copy the demo files to the work directory \\ |
| 9915 |
\hline |
| 9916 |
%============================================================================== |
| 9917 |
\commandf{r1=run(e='bru',c='bru') } & time integration \\ |
| 9918 |
\commandf{save(r1,'bru') } & save output-files as \filef{b.bru, s.bru, d.bru} \\ |
| 9919 |
\hline |
| 9920 |
%============================================================================== |
| 9921 |
\end{tabular} |
| 9922 |
\caption{Commands for running demo \filef{bru}.} |
| 9923 |
\label{tbl:demo_bru} |
| 9924 |
\end{center} |
| 9925 |
\end{table} |
| 9926 |
|
| 9927 |
%============================================================================== |
| 9928 |
%============================================================================== |
| 9929 |
\chapter{ \AUTO Demos : Optimization.} \label{ch:Demos_Opt} |
| 9930 |
%============================================================================== |
| 9931 |
%============================================================================== |
| 9932 |
|
| 9933 |
\newpage |
| 9934 |
%============================================================================== |
| 9935 |
%DEMO=opt====================================================================== |
| 9936 |
%============================================================================== |
| 9937 |
\section{ opt : A Model Algebraic Optimization Problem.} \label{sec:Demos_opt} |
| 9938 |
This demo illustrates the method of successive continuation |
| 9939 |
for constrained optimization problems |
| 9940 |
by applying it to the following |
| 9941 |
simple problem~:~ |
| 9942 |
Find the |
| 9943 |
maximum sum of coordinates on the unit sphere in $R^{5}$. |
| 9944 |
Coordinate 1 is treated as the state variable. |
| 9945 |
Coordinates 2-5 are treated as control parameters. |
| 9946 |
For details on the successive continuation procedure |
| 9947 |
see \citename{DoKeKe:91a} \citeyear{DoKeKe:91a}, |
| 9948 |
\citename{DoKeKe:91b} \citeyear{DoKeKe:91b}. |
| 9949 |
|
| 9950 |
\begin{table}[htbp] |
| 9951 |
\begin{center} |
| 9952 |
\begin{tabular}{| l | l |} |
| 9953 |
\hline |
| 9954 |
\AUTO-COMMAND & ACTION \\ |
| 9955 |
\hline |
| 9956 |
%============================================================================== |
| 9957 |
\commandf{mkdir opt} & create an empty work directory \\ |
| 9958 |
\commandf{cd opt} & change directory \\ |
| 9959 |
\commandf{demo('opt')} & copy the demo files to the work directory \\ |
| 9960 |
\hline |
| 9961 |
%============================================================================== |
| 9962 |
\commandf{r1=run(e='opt',c='opt')} & one free equation parameter \\ |
| 9963 |
\commandf{save(r1,'1')} & save output-files as \filef{b.1, s.1, d.1} \\ |
| 9964 |
\hline |
| 9965 |
%============================================================================== |
| 9966 |
\commandf{r2=run(r1("LP1"))} & \parbox[t]{3in}{two free equation parameters; read restart data from \parf{r1} \vspace{0.2cm}}\\ |
| 9967 |
\commandf{save(r2,'2')} & save output-files as \filef{b.2, s.2, d.2} \\ |
| 9968 |
\hline |
| 9969 |
%============================================================================== |
| 9970 |
\commandf{r3=run(r2("LP1"))} & \parbox[t]{3in}{three free equation parameters; read restart data from \parf{r2} \vspace{0.2cm}}\\ |
| 9971 |
\commandf{save(r3,'3')} & save output-files as \filef{b.3, s.3, d.3} \\ |
| 9972 |
\hline |
| 9973 |
%============================================================================== |
| 9974 |
\commandf{run(r3("LP1"))} & \parbox[t]{3in}{four free equation parameters; read restart data from \parf{r3} \vspace{0.2cm}}\\ |
| 9975 |
\commandf{save(r4,'4')} & save output-files as \filef{b.4, s.4, d.4} \\ |
| 9976 |
\hline |
| 9977 |
%============================================================================== |
| 9978 |
\end{tabular} |
| 9979 |
\caption{Commands for running demo \filef{opt}.} |
| 9980 |
\label{tbl:demo_opt} |
| 9981 |
\end{center} |
| 9982 |
\end{table} |
| 9983 |
|
| 9984 |
\newpage |
| 9985 |
%============================================================================== |
| 9986 |
%DEMO=ops====================================================================== |
| 9987 |
%============================================================================== |
| 9988 |
\section{ ops : Optimization of Periodic Solutions.} \label{sec:Demos_ops} |
| 9989 |
This demo illustrates the method of successive continuation |
| 9990 |
for the optimization of periodic solutions. |
| 9991 |
For a detailed description of the basic method see |
| 9992 |
\citename{DoKeKe:91b} \citeyear{DoKeKe:91b}. |
| 9993 |
The illustrative system of autonomous ODEs, taken from |
| 9994 |
\citename{Alej:91} \citeyear{Alej:91}, is |
| 9995 |
\begin{equation} \begin{array}{cl} |
| 9996 |
x'(t) & = [-\lambda_4(x^3/3-x) + (z-x)/\lambda_2 - y]/\lambda_1, \\ |
| 9997 |
y'(t) &= x-\lambda_3, \\ |
| 9998 |
z'(t) &= -(z-x)/\lambda_2, |
| 9999 |
\end{array} \end{equation} |
| 10000 |
with objective functional |
| 10001 |
$$ \omega = |
| 10002 |
\int_0^{1} g(x,y,z;\lambda_1,\lambda_2,\lambda_3,\lambda_4) ~ dt, $$ |
| 10003 |
where $g(x,y,z;\lambda_1,\lambda_2,\lambda_3,\lambda_4) \equiv \lambda_3$. |
| 10004 |
Thus, in this application, a one-parameter extremum of $g$ corresponds |
| 10005 |
to a fold with respect to the problem parameter $\lambda_3$, |
| 10006 |
and multi-parameter extrema correspond to generalized folds. |
| 10007 |
Note that, in general, the objective functional is an integral along |
| 10008 |
the periodic orbit, so that a variety of optimization problems |
| 10009 |
can be addressed. |
| 10010 |
|
| 10011 |
For the case of periodic solutions, the extended optimality system |
| 10012 |
can be generated automatically, i.e., one need only define the vector field |
| 10013 |
and the objective functional, as in done in the file \filef{ops.f90}. |
| 10014 |
For reference purpose it is convenient here to write down |
| 10015 |
the full extended system in its general form~: |
| 10016 |
|
| 10017 |
\begin{equation} \begin{array}{cl} |
| 10018 |
&u'(t) = T f \bigl( u(t),\lambda \bigr) , |
| 10019 |
\qquad T\in \R {\rm ~(period)},~ u(\cdot),f(\cdot,\cdot) \in \Rn, |
| 10020 |
~ \lambda \in \R^{n_{\lambda}}, \\ |
| 10021 |
& \cr |
| 10022 |
&w'(t) = -Tf_u\bigl( u(t),\lambda \bigr)^{*} w(t) |
| 10023 |
+ \kappa u_0'(t) |
| 10024 |
+ \gamma g_u\bigl( u(t),\lambda \bigr)^{*}, |
| 10025 |
\qquad w(\cdot) \in \Rn,~ \kappa, \gamma \in \R, \\ |
| 10026 |
& \cr |
| 10027 |
&u(1) - u(0) = 0, \qquad w(1) - w(0) = 0, \\ |
| 10028 |
& \cr |
| 10029 |
&\int_{0}^{1} u(t)^{*} u_0'(t)~ dt = 0, \\ |
| 10030 |
& \cr |
| 10031 |
&\int_{0}^{1} \omega - g\bigl(u(t),\lambda\bigr) ~dt = 0, \\ |
| 10032 |
& \cr |
| 10033 |
&\int_0^{1} w(t)^{*}w(t) |
| 10034 |
+ \kappa^2 + \gamma^{2} - \alpha ~ dt = 0, |
| 10035 |
\qquad \alpha \in \R, \\ |
| 10036 |
& \cr |
| 10037 |
&\int_0^{1} f\bigl( u(t),\lambda \bigr)^{*}w(t) |
| 10038 |
- \gamma g_{T}\bigl( u(t),\lambda \bigr) |
| 10039 |
- \tau_0 ~ dt= 0, \qquad \tau_0 \in \R, \\ |
| 10040 |
& \cr |
| 10041 |
&\int_0^{1} T f_{\lambda_i}\bigl( u(t),\lambda \bigr)^{*}w(t) |
| 10042 |
- \gamma g_{\lambda_i}\bigl( u(t),\lambda \bigr) |
| 10043 |
- \tau_i ~dt= 0, |
| 10044 |
\qquad \tau_i \in \R, \quad i=1, \cdots, n_{\lambda}.\\ |
| 10045 |
\end{array} \end{equation} |
| 10046 |
Above $u_0$ is a reference solution, namely, the previous solution along |
| 10047 |
a solution family. |
| 10048 |
|
| 10049 |
\newpage |
| 10050 |
In the computations below, the two preliminary runs, with \parf{IPS}=1 and \parf{IPS}=2, |
| 10051 |
respectively, locate periodic solutions. |
| 10052 |
The subsequent runs are with \parf{IPS}=15 and hence use the automatically |
| 10053 |
generated extended system. |
| 10054 |
|
| 10055 |
\begin{itemize} |
| 10056 |
\item[-] |
| 10057 |
\commandf{Run 1.}~ Locate a Hopf bifurcation. |
| 10058 |
The free system parameter is $\lambda_3$. |
| 10059 |
\item[-]\commandf{Run 2.}~ |
| 10060 |
Compute a family of periodic solutions from the Hopf bifurcation. |
| 10061 |
\item[-]\commandf{Run 3.}~ |
| 10062 |
This run retraces part of the periodic solution family, |
| 10063 |
using the full optimality system, |
| 10064 |
but with all adjoint variables, $w(\cdot), \kappa, \gamma$, |
| 10065 |
and hence $\alpha$, equal to zero. |
| 10066 |
The optimality parameters $\tau_0$ and $\tau_3$ are zero throughout. |
| 10067 |
An extremum of the objective functional with respect to $\lambda_3$ |
| 10068 |
is located. |
| 10069 |
Such a point corresponds to a branch point of the extended system. |
| 10070 |
Given the choice of objective functional in this demo, |
| 10071 |
this extremum is also a fold with respect to $\lambda_3$. |
| 10072 |
\item[-]\commandf{Run 4.}~ |
| 10073 |
Branch switching at the above-found branch point yields nonzero |
| 10074 |
values of the adjoint variables. |
| 10075 |
Any point on the bifurcating family away from the branch point |
| 10076 |
can serve as starting solution for the next run. |
| 10077 |
In fact, the branch-switching can be viewed as generating |
| 10078 |
a nonzero eigenvector in an eigenvalue-eigenvector relation. |
| 10079 |
Apart from the adjoint variables, all other variables remain |
| 10080 |
unchanged along the bifurcating family. |
| 10081 |
\item[-]\commandf{Run 5.}~ |
| 10082 |
The above-found starting solution is continued in two system parameters, |
| 10083 |
here $\lambda_3$ and $\lambda_2$; i.e., a two-parameter family |
| 10084 |
of extrema with respect to $\lambda_3$ is computed. |
| 10085 |
Along this family the value of the optimality parameter $\tau_2$ |
| 10086 |
is monitored, i.e., the value of the functional that vanishes |
| 10087 |
at an extremum with respect to the system parameter $\lambda_2$. |
| 10088 |
Such a zero of $\tau_2$ is, in fact, located, and hence an extremum |
| 10089 |
of the objective functional with respect to both $\lambda_2$ and |
| 10090 |
$\lambda_3$ has been found. |
| 10091 |
Note that, in general, $\tau_i$ is the value of the |
| 10092 |
functional that vanishes at an extremum with respect to the system |
| 10093 |
parameter $\lambda_i$. |
| 10094 |
\item[-]\commandf{Run 6.}~ |
| 10095 |
In the final run, the above-found two-parameter extremum is continued |
| 10096 |
in three system parameters, here $\lambda_1$, $\lambda_2$, |
| 10097 |
and $\lambda_3$, toward $\lambda_1=0$. |
| 10098 |
Again, given the particular choice of objective functional, |
| 10099 |
this final continuation has an alternate significance here~: |
| 10100 |
it also represents a three-parameter family of transcritical |
| 10101 |
secondary periodic bifurcations points. |
| 10102 |
\end{itemize} |
| 10103 |
|
| 10104 |
Although not illustrated here, one can restart an ordinary |
| 10105 |
continuation of periodic solutions, using \parf{IPS}=2 or \parf{IPS}=3, |
| 10106 |
from a labeled solution point on a family computed with \parf{IPS}=15. |
| 10107 |
|
| 10108 |
\newpage |
| 10109 |
The free scalar variables specified in the \AUTO constants-files |
| 10110 |
for Run~3 and Run~4 are shown in Table~\ref{tbl:demo_ops_1}. |
| 10111 |
|
| 10112 |
\begin{table}[htbp] |
| 10113 |
\begin{center} |
| 10114 |
\begin{tabular}{| l | r | r | r | r | r | r | r |} |
| 10115 |
\hline |
| 10116 |
Index& 3 & 11 & 12 & 22 & -22 & -23 & -31 \\ |
| 10117 |
\hline |
| 10118 |
Variable& $\lambda_3$ & $T$ & $\alpha$ & $\tau_2$ |
| 10119 |
& $[\lambda_2]$ & $[\lambda_3]$ & $[T]$ \\ |
| 10120 |
\hline |
| 10121 |
\end{tabular} |
| 10122 |
\caption{\commandf{Runs 3 and 4}~ (files \filef{c.ops.3} and \filef{c.ops.4}).} |
| 10123 |
\label{tbl:demo_ops_1} |
| 10124 |
\end{center} |
| 10125 |
\end{table} |
| 10126 |
|
| 10127 |
The parameter $\alpha$, which is the norm of the adjoint variables, |
| 10128 |
becomes nonzero after branch switching in Run~4. |
| 10129 |
The negative indices (-22, -23, and -31) set the active optimality |
| 10130 |
functionals, namely for $\lambda_2$, $\lambda_3$, and $T$, respectively, |
| 10131 |
with corresponding variables $\tau_2$, $\tau_3$, and $\tau_0$, |
| 10132 |
respectively. |
| 10133 |
These should be set in the first run with \parf{IPS}=15 and remain unchanged |
| 10134 |
in all subsequent runs. |
| 10135 |
|
| 10136 |
|
| 10137 |
\begin{table}[htbp] |
| 10138 |
\begin{center} |
| 10139 |
\begin{tabular}{| l | r | r | r | r | r | r | r |} |
| 10140 |
\hline |
| 10141 |
Index& 3 & ~2 & 11 & 22 & -22 & -23 & -31 \\ |
| 10142 |
\hline |
| 10143 |
Variable& $\lambda_3$ & $\lambda_2$ & $T$ & $\tau_2$ |
| 10144 |
& $[\lambda_2]$ & $[\lambda_3]$ & $[T]$ \\ |
| 10145 |
\hline |
| 10146 |
\end{tabular} |
| 10147 |
\caption{\commandf{Run 5}~ (file \filef{c.ops.5}).} |
| 10148 |
\label{tbl:demo_ops_2} |
| 10149 |
\end{center} |
| 10150 |
\end{table} |
| 10151 |
|
| 10152 |
In Run~5 the parameter $\alpha$, which has been replaced by $\lambda_2$, |
| 10153 |
remains fixed and nonzero. |
| 10154 |
The variable $\tau_2$ monitors the value of the optimality functional |
| 10155 |
associated with $\lambda_2$. |
| 10156 |
The zero of $\tau_2$ located in this run signals an extremum |
| 10157 |
with respect to $\lambda_2$. |
| 10158 |
|
| 10159 |
|
| 10160 |
\begin{table}[htbp] |
| 10161 |
\begin{center} |
| 10162 |
\begin{tabular}{| l | r | r | r | r | r | r | r |} |
| 10163 |
\hline |
| 10164 |
Index& 3 & ~2 & ~1 & 11 & -22 & -23 & -31 \\ |
| 10165 |
\hline |
| 10166 |
Variable& $\lambda_3$ & $\lambda_2$ & $\lambda_1$ & $T$ |
| 10167 |
& $[\lambda_2]$ & $[\lambda_3]$ & $[T]$ \\ |
| 10168 |
\hline |
| 10169 |
\end{tabular} |
| 10170 |
\caption{\commandf{Run 6}~ (file \filef{c.ops.6}).} |
| 10171 |
\label{tbl:demo_ops_3} |
| 10172 |
\end{center} |
| 10173 |
\end{table} |
| 10174 |
|
| 10175 |
|
| 10176 |
In Run~6 $\tau_2$, which has been replaced by $\lambda_1$, remains zero. |
| 10177 |
|
| 10178 |
|
| 10179 |
Note that $\tau_0$ and $\tau_3$ are not used as variables in any |
| 10180 |
of the runs; in fact, their values remain zero throughout. |
| 10181 |
Also note that the optimality functionals corresponding to |
| 10182 |
$\tau_0$ and $\tau_3$ (or, equivalently, to $T$ and $\lambda_3$) |
| 10183 |
\emp{ are} active in all runs. |
| 10184 |
This set-up allows the detection of the extremum of the objective functional, |
| 10185 |
with $T$ and $\lambda_3$ as scalar equation parameters, |
| 10186 |
as a bifurcation in the third run. |
| 10187 |
|
| 10188 |
The parameter $\lambda_4$, and its corresponding optimality variable $\tau_4$, |
| 10189 |
are not used in this demo. |
| 10190 |
Also, $\lambda_1$ is used in the last run only, and its corresponding |
| 10191 |
optimality variable $\tau_1$ is never used. |
| 10192 |
|
| 10193 |
\begin{table}[htbp] |
| 10194 |
\begin{center} |
| 10195 |
\begin{tabular}{| l | l |} |
| 10196 |
\hline |
| 10197 |
\AUTO-COMMAND & ACTION \\ |
| 10198 |
\hline |
| 10199 |
%============================================================================== |
| 10200 |
\commandf{mkdir ops} & create an empty work directory \\ |
| 10201 |
\commandf{cd ops} & change directory \\ |
| 10202 |
\commandf{demo('ops')} & copy the demo files to the work directory \\ |
| 10203 |
\hline |
| 10204 |
%============================================================================== |
| 10205 |
\commandf{r1=run(e='ops',c='ops')} & locate a Hopf bifurcation \\ |
| 10206 |
\hline |
| 10207 |
%============================================================================== |
| 10208 |
\commandf{uzr=\{3:[0.92,0.93]\}} & set variable for \parf{UZR} \\ |
| 10209 |
\parbox[t]{3.2in}{\commandf{ |
| 10210 |
r2=run(r1("HB1"),IPS=2,ICP=[3,11], NMX=150,RL0=0.9,UZR=uzr)}} & |
| 10211 |
\parbox[t]{3in}{compute a family of periodic solutions; restart |
| 10212 |
from \parf{r1} \vspace{0.2cm}}\\ |
| 10213 |
\commandf{save(r1+r2,'0')} & save output to \filef{b.0, s.0, d.0} \\ |
| 10214 |
\hline |
| 10215 |
%============================================================================== |
| 10216 |
\commandf{icp=[3,11,12,22,-22,-23,-31]} & set variable for \parf{ICP} \\ |
| 10217 |
\parbox[t]{3.2in}{\commandf{ |
| 10218 |
r3=run(r2("UZ1"),IPS=15,ILP=0, ICP=icp,ISP=2,NMX=25,ITNW=7,DS=-0.05)}} |
| 10219 |
& \parbox[t]{3in}{locate a 1-parameter extremum as a bifurcation; restart from \parf{r2} \vspace{0.2cm}}\\ |
| 10220 |
\hline |
| 10221 |
%============================================================================== |
| 10222 |
\commandf{r4=run(r3("BP1"),ISW=-1,ISP=0,NMX=5)} & \parbox[t]{3in}{switch branches to generate optimality starting data; restart from \parf{r3} \vspace{0.2cm}}\\ |
| 10223 |
\commandf{save(r3+r4,'1')} & save output to \filef{b.1, s.1, d.1} \\ |
| 10224 |
\hline |
| 10225 |
%============================================================================== |
| 10226 |
\commandf{icp[1:3]=[2,11]} & set variable for \parf{ICP} \\ |
| 10227 |
\commandf{uzr[22]=0.0} & set variable for \parf{UZR} \\ |
| 10228 |
\parbox[t]{3.2in}{ |
| 10229 |
\commandf{r5=run(r4,ICP=icp,ISW=1,NMX=150, RL0=0.8,RL1=1.9,DS='-',UZR=uzr)}} |
| 10230 |
& \parbox[t]{3in}{compute 2-parameter family of 1-parameter extrema; |
| 10231 |
restart from \parf{r4} \vspace{0.2cm}}\\ |
| 10232 |
\commandf{save(r5,'2')} & save the output-files as \filef{b.2, s.2, d.2} \\ |
| 10233 |
\hline |
| 10234 |
%============================================================================== |
| 10235 |
\commandf{icp[2:4]=[1,11]} & set variable for \parf{ICP} \\ |
| 10236 |
\parbox[t]{3.4in}{\commandf{r6=run(r5("UZ4"),IRS=15,ICP=icp,NTST=50, |
| 10237 |
UZR=\{1:[0.1,0.05,0.01,0.005,0.001]\})}} & |
| 10238 |
\parbox[t]{3in}{compute 3-parameter family of 2-parameter extrema; restart from \parf{r5} \vspace{0.2cm}}\\ |
| 10239 |
\commandf{save(r6,'3')} & save the output-files as \filef{b.3, s.3, d.3} \\ |
| 10240 |
\hline |
| 10241 |
%============================================================================== |
| 10242 |
\end{tabular} |
| 10243 |
\caption{Commands for running demo \filef{ops}.} |
| 10244 |
\label{tbl:demo_ops_4} |
| 10245 |
\end{center} |
| 10246 |
\end{table} |
| 10247 |
|
| 10248 |
\newpage |
| 10249 |
%============================================================================== |
| 10250 |
%DEMO=obv====================================================================== |
| 10251 |
%============================================================================== |
| 10252 |
\section{ obv : Optimization for a BVP.} \label{sec:Demos_obv} |
| 10253 |
This demo illustrates use of the method of successive continuation |
| 10254 |
for a boundary value optimization problem. |
| 10255 |
A detailed description of the basic method, as well as a discussion |
| 10256 |
of the specific application considered here, is given in |
| 10257 |
\citename{DoKeKe:91b} \citeyear{DoKeKe:91b}. |
| 10258 |
The required extended system is fully programmed here in the user-supplied |
| 10259 |
routines in \filef{obv.f90}. |
| 10260 |
For the case of periodic solutions the optimality system can be generated |
| 10261 |
automatically; see the demo \filef{ops}. |
| 10262 |
|
| 10263 |
Consider the system |
| 10264 |
\begin{equation} \begin{array}{cl} |
| 10265 |
u_1'(t) & = u_2(t), \\ |
| 10266 |
u_2'(t) &= |
| 10267 |
-\lambda_1 e^{p(u_1,\lambda_2,\lambda_3)}, |
| 10268 |
\end{array} \end{equation} |
| 10269 |
where |
| 10270 |
$ p(u_1,\lambda_2,\lambda_3) \equiv |
| 10271 |
u_1 + \lambda_2 u_1^{2} + \lambda_3 u_1^{4},$ |
| 10272 |
with boundary conditions |
| 10273 |
\begin{equation} \begin{array}{cl} |
| 10274 |
u_1(0) &= 0, \\ |
| 10275 |
u_1(1) &= 0. \\ |
| 10276 |
\end{array} \end{equation} |
| 10277 |
The objective functional is |
| 10278 |
$$ \omega = \int_0^{1} (u_1(t)-1)^{2}~ dt |
| 10279 |
+ \frac{1}{10} \sum_{k=1}^{3} \lambda_{k}^{2}. $$ |
| 10280 |
The successive continuation equations are given by |
| 10281 |
\begin{equation} \begin{array}{cl} |
| 10282 |
u_1'(t) &= u_2(t), \\ |
| 10283 |
u_2'(t) &= |
| 10284 |
-\lambda_1 e^{p(u_1,\lambda_2,\lambda_3)}, \\ |
| 10285 |
w_1'(t) &= |
| 10286 |
\lambda_1 e^{p(u_1,\lambda_2,\lambda_3)} p_{u_1} w_2(t) |
| 10287 |
+ 2 \gamma(u_1(t)-1), \\ |
| 10288 |
w_2'(t) &= -w_1(t), \\ |
| 10289 |
\end{array} \end{equation} |
| 10290 |
where |
| 10291 |
$$ p_{u_1} \equiv |
| 10292 |
\frac{{\partial p} }{ {\partial u_1}} = |
| 10293 |
1 + 2\lambda_2 u_1 + 4\lambda_3 u_1^{3},$$ |
| 10294 |
with |
| 10295 |
\begin{equation} \begin{array}{cl} |
| 10296 |
u_1(0) = 0,\qquad &w_1(0) - \beta_1 = 0,\qquad w_2(0) = 0, \\ |
| 10297 |
u_1(1) = 0,\qquad &w_1(1) + \beta_2 = 0,\qquad w_2(1) = 0, \\\end{array} \end{equation} |
| 10298 |
|
| 10299 |
$$ \int_0^{1} \bigl[ \omega - (u_1(t)-1)^{2} |
| 10300 |
- \frac{1}{10} \sum_{k=1}^{3} \lambda_{k}^{2} \bigr]~ dt = 0, $$ |
| 10301 |
|
| 10302 |
$$ \int_0^{1} \bigl[w_1^{2}(t) - \alpha_0 \bigr]~ dt = 0, $$ |
| 10303 |
|
| 10304 |
\begin{equation} \begin{array}{cl} |
| 10305 |
&\int_0^{1} \bigl[ |
| 10306 |
-e^{p(u_1,\lambda_2,\lambda_3)} w_2(t) |
| 10307 |
- \frac{1}{5}\gamma \lambda_1 |
| 10308 |
\bigr]~ dt = 0, \\ |
| 10309 |
&\int_0^{1} \bigl[ |
| 10310 |
-\lambda_1 e^{p(u_1,\lambda_2,\lambda_3)} u_1(t)^{2} w_2(t) |
| 10311 |
- \frac{1}{5}\gamma \lambda_2 |
| 10312 |
- \tau_2 \bigr]~ dt = 0, \\ |
| 10313 |
&\int_0^{1} \bigl[ |
| 10314 |
-\lambda_1 e^{p(u_1,\lambda_2,\lambda_3)} u_1(t)^{4} w_2(t) |
| 10315 |
- \frac{1}{5}\gamma \lambda_3 |
| 10316 |
- \tau_3 \bigr]~ dt = 0. \\\end{array} \end{equation} |
| 10317 |
|
| 10318 |
In the first run the free equation parameter is $\lambda_1$. |
| 10319 |
All adjoint variables are zero. |
| 10320 |
Three extrema of the objective function are located. |
| 10321 |
These correspond to branch points and, in the second run, |
| 10322 |
branch switching is done at one of these. |
| 10323 |
Along the bifurcating family the adjoint variables become nonzero, |
| 10324 |
while state variables and $\lambda_1$ remain constant. |
| 10325 |
Any such non-trivial solution point can be used for continuation |
| 10326 |
in two equation parameters, after fixing the $L_2$-norm of one of |
| 10327 |
the adjoint variables. This is done in the third run. |
| 10328 |
Along the resulting family several two-parameter extrema are located |
| 10329 |
by monotoring certain inner products. |
| 10330 |
One of these is further continued in three equation parameters in the final run, |
| 10331 |
where a three-parameter extremum is located. |
| 10332 |
|
| 10333 |
|
| 10334 |
\begin{table}[htbp] |
| 10335 |
\begin{center} |
| 10336 |
\begin{tabular}{| l | l |} |
| 10337 |
\hline |
| 10338 |
\AUTO-COMMAND & ACTION \\ |
| 10339 |
\hline |
| 10340 |
%============================================================================== |
| 10341 |
\commandf{mkdir obv} & create an empty work directory \\ |
| 10342 |
\commandf{cd obv} & change directory \\ |
| 10343 |
\commandf{demo('obv')} & copy the demo files to the work directory \\ |
| 10344 |
\hline |
| 10345 |
%============================================================================== |
| 10346 |
\commandf{r1=run(e='obv',c='obv')} & locate 1-parameter extrema as branch points \\ |
| 10347 |
\commandf{save(r1,'obv')} & save output-files as \filef{b.obv, s.obv, d.obv} \\ |
| 10348 |
\hline |
| 10349 |
%============================================================================== |
| 10350 |
\commandf{r2=run(r1("BP1"),ISW=-1,NMX=5)} & \parbox[t]{3in}{compute a few step on the first bifurcating family \vspace{0.2cm}}\\ |
| 10351 |
\commandf{save(r2,'1')} & save the output-files as \filef{b.1, s.1, d.1} \\ |
| 10352 |
\hline |
| 10353 |
%============================================================================== |
| 10354 |
\parbox[t]{3.2in}{ |
| 10355 |
\commandf{r3=run(r2,ICP=[10,1,2,17,18,13,14,15], ISW=1,NMX=100)}} & \parbox[t]{3in}{locate 2-parameter extremum; restart from \parf{r2} \vspace{0.2cm}}\\ |
| 10356 |
\commandf{save(r3,'2')} & save the output-files as \filef{b.2, s.2, d.2} \\ |
| 10357 |
\hline |
| 10358 |
%============================================================================== |
| 10359 |
\parbox[t]{3.2in}{ |
| 10360 |
\commandf{r4=run(r3("UZ2"), ICP=[10,1,2,3,18,13,14,15],NMX=25)}} & \parbox[t]{3in}{locate 3-parameter extremum; restart from \parf{r3} \vspace{0.2cm}}\\ |
| 10361 |
\commandf{save(r4,'3')} & save the output-files as \filef{b.3, s.3, d.3} \\ |
| 10362 |
\hline |
| 10363 |
%============================================================================== |
| 10364 |
\end{tabular} |
| 10365 |
\caption{Commands for running demo \filef{obv}.} |
| 10366 |
\label{tbl:demo_obv} |
| 10367 |
\end{center} |
| 10368 |
\end{table} |
| 10369 |
|
| 10370 |
%============================================================================== |
| 10371 |
%============================================================================== |
| 10372 |
\chapter{ \AUTO Demos : Connecting orbits.} \label{ch:Demos_Heteroclinics} |
| 10373 |
%============================================================================== |
| 10374 |
%============================================================================== |
| 10375 |
|
| 10376 |
\newpage |
| 10377 |
%============================================================================== |
| 10378 |
%DEMO=fsh====================================================================== |
| 10379 |
%============================================================================== |
| 10380 |
\section{ fsh : A Saddle-Node Connection.} \label{sec:Demos_fsh} |
| 10381 |
This demo illustrates the computation of travelling wave front solutions |
| 10382 |
to the Fisher equation, |
| 10383 |
\begin{equation} \begin{array}{cl} |
| 10384 |
& w_t = w_{xx} + f(w), |
| 10385 |
\qquad -\infty < x < \infty, |
| 10386 |
\quad t > 0, \\ |
| 10387 |
& f(w) \equiv w(1-w) . \\ |
| 10388 |
\end{array} \end{equation} |
| 10389 |
We look for solutions of the form $w(x,t)=u(x+ct)$, where |
| 10390 |
$c$ is the wave speed. |
| 10391 |
This gives the first order system |
| 10392 |
\begin{equation} \begin{array}{cl} |
| 10393 |
& u_1'(z) = u_2(z), \\ |
| 10394 |
& u_2'(z) = c u_2(z) - f\bigl(u_1(z)\bigr). \\ |
| 10395 |
\end{array} \end{equation} |
| 10396 |
Its fixed point $(0,0)$ has two positive eigenvalues when $c>2$. |
| 10397 |
The other fixed point, $(1,0)$, is a saddle point. |
| 10398 |
A family of orbits connecting the two fixed points |
| 10399 |
requires one free parameter; see |
| 10400 |
\citename{FrDo:91} \citeyear{FrDo:91}. |
| 10401 |
Here we take this parameter to be the wave speed $c$. |
| 10402 |
|
| 10403 |
In the first run a starting connecting orbit is computed |
| 10404 |
by continuation in the period $T$. |
| 10405 |
This procedure can be used generally for time integration of an ODE with \AUTO. |
| 10406 |
Starting data in \funcf{STPNT} correspond to a point on the approximate stable manifold |
| 10407 |
of $(1,0)$, with $T$ small. |
| 10408 |
In this demo the ``free'' end point of the orbit necessary approaches the |
| 10409 |
unstable fixed point $(0,0)$. |
| 10410 |
A computed orbit with sufficiently large $T$ is then chosen as restart orbit |
| 10411 |
in the second run, where, typically, one replaces $T$ by $c$ as continuation |
| 10412 |
parameter. |
| 10413 |
However, in the second run below, we also add a phase condition, |
| 10414 |
and both $c$ and $T$ remain free. |
| 10415 |
|
| 10416 |
|
| 10417 |
|
| 10418 |
\begin{table}[htbp] |
| 10419 |
\begin{center} |
| 10420 |
\begin{tabular}{| l | l |} |
| 10421 |
\hline |
| 10422 |
\AUTO-COMMAND & ACTION \\ |
| 10423 |
\hline |
| 10424 |
%============================================================================== |
| 10425 |
\commandf{mkdir fsh} & create an empty work directory \\ |
| 10426 |
\commandf{cd fsh} & change directory \\ |
| 10427 |
\commandf{demo('fsh')} & copy the demo files to the work directory \\ |
| 10428 |
\hline |
| 10429 |
%============================================================================== |
| 10430 |
\commandf{r1=run(e='fsh',c='fsh')} & continuation in the period $T$, with $c$ fixed; no phase condition \\ |
| 10431 |
\commandf{save(r1,'0')} & save output-files as \filef{b.0, s.0, d.0} \\ |
| 10432 |
\hline |
| 10433 |
%============================================================================== |
| 10434 |
\parbox[t]{2in}{ |
| 10435 |
\commandf{r2 = run(r1("EP2"), ICP=[2,11,12,13,14], NINT=1, |
| 10436 |
DS='-', UZR=\{2:[1,2,3,5,10]\})} \vspace{0.2cm}} & |
| 10437 |
\parbox[t]{3in}{continuation in $c$ and $T$, with active phase |
| 10438 |
condition. \vspace{0.2cm}} \\ |
| 10439 |
\commandf{save(r2,'fsh')} & save output-files as \filef{b.fsh, s.fsh, d.fsh} \\ |
| 10440 |
\hline |
| 10441 |
%============================================================================== |
| 10442 |
\end{tabular} |
| 10443 |
\caption{Commands for running demo \filef{fsh}.} |
| 10444 |
\label{tbl:demo_fsh} |
| 10445 |
\end{center} |
| 10446 |
\end{table} |
| 10447 |
|
| 10448 |
\newpage |
| 10449 |
%============================================================================== |
| 10450 |
%DEMO=nag====================================================================== |
| 10451 |
%============================================================================== |
| 10452 |
\section{ nag : A Saddle-Saddle Connection.} \label{sec:Demos_nag} |
| 10453 |
This demo illustrates the computation of traveling wave front solutions |
| 10454 |
to Nagumo's equation, |
| 10455 |
\begin{equation} \begin{array}{cl} |
| 10456 |
& w_t = w_{xx} + f(w,a), |
| 10457 |
\qquad -\infty < x < \infty, |
| 10458 |
\quad t > 0, \\ |
| 10459 |
& f(w,a) \equiv w(1-w)(w-a), \qquad 0<a<1. \\ |
| 10460 |
\end{array} \end{equation} |
| 10461 |
We look for solutions of the form $w(x,t)=u(x+ct)$, where |
| 10462 |
$c$ is the wave speed. |
| 10463 |
This gives the first order system |
| 10464 |
\begin{equation} \begin{array}{cl} |
| 10465 |
& u_1'(z) = u_2(z), \\ |
| 10466 |
& u_2'(z) = c u_2(z) - f\bigl(u_1(z),a\bigr), \\ |
| 10467 |
\end{array} \end{equation} |
| 10468 |
where $z=x+ct$, and $' = d/dz$. |
| 10469 |
If $a=1/2$ and $c=0$ then there are two analytically known |
| 10470 |
heteroclinic connections, one of which is given by |
| 10471 |
$$ u_1(z) = \frac{ |
| 10472 |
{e^{\frac{1}{2} \sqrt{2} z}} |
| 10473 |
}{ |
| 10474 |
{1 + e^{\frac{1 }{ 2} \sqrt{2} z}} }, |
| 10475 |
\qquad u_2(z) = u_1'(z), \qquad -\infty < z < \infty. |
| 10476 |
$$ |
| 10477 |
The second heteroclinic connection is obtained by reflecting the |
| 10478 |
phase plane representation of the first with respect to the |
| 10479 |
$u_1$-axis. |
| 10480 |
In fact, the two connections together constitute a heteroclinic cycle. |
| 10481 |
One of the exact solutions is used below as starting orbit. |
| 10482 |
To start from the second exact solution, change SIGN=-1 in the |
| 10483 |
routine \funcf{STPNT} in \filef{nag.f90} and repeat the computations below; |
| 10484 |
see also |
| 10485 |
\citename{FrDo:91} \citeyear{FrDo:91}. |
| 10486 |
|
| 10487 |
\begin{table}[htbp] |
| 10488 |
\begin{center} |
| 10489 |
\begin{tabular}{| l | l |} |
| 10490 |
\hline |
| 10491 |
\AUTO-COMMAND & ACTION \\ |
| 10492 |
\hline |
| 10493 |
%============================================================================== |
| 10494 |
\commandf{mkdir nag} & create an empty work directory \\ |
| 10495 |
\commandf{cd nag} & change directory \\ |
| 10496 |
\commandf{demo('nag')} & copy the demo files to the work directory \\ |
| 10497 |
\hline |
| 10498 |
%============================================================================== |
| 10499 |
\commandf{r1=run(e='nag',c='nag')} & compute part of first family of heteroclinic orbits \\ |
| 10500 |
\hline |
| 10501 |
%============================================================================== |
| 10502 |
\commandf{r2=run(e='nag',c='nag',DS='-')} & compute first family in opposite direction\\ |
| 10503 |
\commandf{save(r1+r2,'nag')} & save all output to \filef{b.nag, s.nag, d.nag} \\ |
| 10504 |
\hline |
| 10505 |
%============================================================================== |
| 10506 |
\end{tabular} |
| 10507 |
\caption{Commands for running demo \filef{nag}.} |
| 10508 |
\label{tbl:demo_nag} |
| 10509 |
\end{center} |
| 10510 |
\end{table} |
| 10511 |
|
| 10512 |
\newpage |
| 10513 |
%============================================================================== |
| 10514 |
%DEMO=stw====================================================================== |
| 10515 |
%============================================================================== |
| 10516 |
\section{ stw : Continuation of Sharp Traveling Waves.} \label{sec:Demos_stw} |
| 10517 |
This demo illustrates the computation of sharp traveling wave front solutions |
| 10518 |
to nonlinear diffusion problems of the form |
| 10519 |
$$ w_t = A(w) w_{xx} + B(w) w_x^{2} + C(w), $$ |
| 10520 |
with |
| 10521 |
$A(w) = a_1 w + a_2 w^{2}$, |
| 10522 |
$B(w) = b_0 + b_1 w + b_2 w^{2}$, |
| 10523 |
and |
| 10524 |
$C(w) = c_0 + c_1 w + c_2 w^{2}$. |
| 10525 |
Such equations can have \commandf{sharp traveling wave fronts} as solutions, i.e., solutions of the form |
| 10526 |
$w(x,t)=u(x+ct)$ for which there is a $z_0$ such that |
| 10527 |
$u(z)=0$ for $z \ge z_0$, |
| 10528 |
$u(z) \not= 0$ for $z < z_0$, and |
| 10529 |
$u(z) \rightarrow constant$ as $z \rightarrow -\infty$. |
| 10530 |
These solutions are actually generalized solutions, since they need |
| 10531 |
not be differentiable at $z_0$. |
| 10532 |
|
| 10533 |
Specifically, in this demo a homotopy path will be computed |
| 10534 |
from an analytically known exact sharp traveling wave solution of |
| 10535 |
$$ w_t = 2w w_{xx} + 2 w_x^{2} + w(1-w), \leqno(1) $$ |
| 10536 |
to a corresponding sharp traveling wave of |
| 10537 |
$$ w_t = (2w+w^{2}) w_{xx} + w w_x^{2} + w(1-w). \leqno(2) $$ |
| 10538 |
This problem is also considered in |
| 10539 |
\citename{DoKeKe:91b} \citeyear{DoKeKe:91b}. |
| 10540 |
For these two special cases the functions $A,B,C$ are defined |
| 10541 |
by the coefficients in Table~\ref{tbl:demo_stw_1}. |
| 10542 |
|
| 10543 |
\begin{table}[htbp] |
| 10544 |
\begin{center} |
| 10545 |
\begin{tabular}{| l | l | l | l | l | l | l | l | l |} |
| 10546 |
\hline |
| 10547 |
& $a_1$ & $a_2$ & $b_0$ &$b_1$ &$b_2$ &$c_0$ &$c_1$ &$c_2$ \\ |
| 10548 |
\hline |
| 10549 |
Case (1) & 2 & 0 & 2 & 0 & 0 & 0 & 1 & -1 \\ |
| 10550 |
\hline |
| 10551 |
Case (2) & 2 & 1 & 0 & 1 & 0 & 0 & 1 & -1 \\ |
| 10552 |
\hline |
| 10553 |
\end{tabular} |
| 10554 |
\caption{Problem coefficients in demo \filef{stw}.} |
| 10555 |
\label{tbl:demo_stw_1} |
| 10556 |
\end{center} |
| 10557 |
\end{table} |
| 10558 |
|
| 10559 |
With $w(x,t)=u(x+ct)$, $z=x+ct$, one obtains the reduced system |
| 10560 |
\begin{equation} \begin{array}{cl} |
| 10561 |
& u_1'(z) = u_2, \\ |
| 10562 |
& u_2'(z) = \bigl[c u_2 - B(u_1) u_2^{2} - C(u_1) \bigr]/A(u_1). \\ |
| 10563 |
\end{array} \end{equation} |
| 10564 |
To remove the singularity when $u_1=0$, we apply a |
| 10565 |
nonlinear transformation of the independent variable |
| 10566 |
(see \citename{Ar:80} \citeyear{Ar:80}), viz., |
| 10567 |
${d / d \tilde z} = A(u_1) {d / dz}$, |
| 10568 |
which changes the above equation into |
| 10569 |
\begin{equation} \begin{array}{cl} |
| 10570 |
& u_1'(\tilde z) = A(u_1) u_2, \\ |
| 10571 |
& u_2'(\tilde z) = c u_2 - B(u_1) u_2^{2} - C(u_1). \\ |
| 10572 |
\end{array} \end{equation} |
| 10573 |
Sharp traveling waves then correspond to heteroclinic connections |
| 10574 |
in this transformed system. |
| 10575 |
|
| 10576 |
\newpage |
| 10577 |
Finally, we map $ [0,T] \rightarrow [0,1] $ |
| 10578 |
by the transformation $\xi = \tilde z / T$. |
| 10579 |
With this scaling of the independent variable, the reduced system |
| 10580 |
becomes |
| 10581 |
\begin{equation} \begin{array}{cl} |
| 10582 |
& u_1'(\xi) = T A(u_1) u_2, \\ |
| 10583 |
& u_2'(\xi) = T \bigl[ c u_2 - B(u_1) u_2^{2} - C(u_1)\bigr]. \\ |
| 10584 |
\end{array} \end{equation} |
| 10585 |
For Case~1 this equation has a known exact solution, namely, |
| 10586 |
$$ u(\xi) = \frac{1 }{ 1 + \exp(T\xi) }, \qquad |
| 10587 |
v(\xi) = \frac{ -\frac{1 }{ 2} }{ 1 + \exp(-T\xi) }. $$ |
| 10588 |
This solution has wave speed $c=1$. |
| 10589 |
In the limit as $T \rightarrow \infty$ its phase plane trajectory |
| 10590 |
connects the stationary points $(1,0)$ and $(0,-\frac{1 }{ 2})$. |
| 10591 |
|
| 10592 |
The sharp traveling wave in Case~2 |
| 10593 |
can now be obtained using the following homotopy. |
| 10594 |
Let |
| 10595 |
$(a_1,a_2,b_0,b_1,b_2) = |
| 10596 |
(1-\lambda) (2,0,2,0,0) + \lambda (2,1,0,1,0)$. |
| 10597 |
Then as $\lambda$ varies continuously from 0 to 1, the parameters |
| 10598 |
$(a_1,a_2,b_0,b_1,b_2)$ |
| 10599 |
vary continously from the values for Case~1 |
| 10600 |
to the values for Case~2. |
| 10601 |
|
| 10602 |
|
| 10603 |
\begin{table}[htbp] |
| 10604 |
\begin{center} |
| 10605 |
\begin{tabular}{| l | l |} |
| 10606 |
\hline |
| 10607 |
\AUTO-COMMAND & ACTION \\ |
| 10608 |
\hline |
| 10609 |
%============================================================================== |
| 10610 |
\commandf{mkdir stw} & create an empty work directory \\ |
| 10611 |
\commandf{cd stw} & change directory \\ |
| 10612 |
\commandf{demo('stw')} & copy the demo files to the work directory \\ |
| 10613 |
\hline |
| 10614 |
%============================================================================== |
| 10615 |
\commandf{r1=run(e='stw',c='stw')} & continuation of the sharp traveling wave \\ |
| 10616 |
\commandf{save(r1,'stw')} & save output-files as \filef{b.stw, s.stw, d.stw} \\ |
| 10617 |
\hline |
| 10618 |
%============================================================================== |
| 10619 |
\end{tabular} |
| 10620 |
\caption{Commands for running demo \filef{stw}.} |
| 10621 |
\label{tbl:demo_stw_2} |
| 10622 |
\end{center} |
| 10623 |
\end{table} |
| 10624 |
|
| 10625 |
|
| 10626 |
%============================================================================== |
| 10627 |
%============================================================================== |
| 10628 |
\chapter{ \AUTO Demos : Miscellaneous.} \label{ch:Demos_Misc} |
| 10629 |
%============================================================================== |
| 10630 |
%============================================================================== |
| 10631 |
|
| 10632 |
\newpage |
| 10633 |
%============================================================================== |
| 10634 |
%DEMO=pvl====================================================================== |
| 10635 |
%============================================================================== |
| 10636 |
\section{ pvl : Use of the Routine \funcf{ PVLS}.} \label{sec:Demos_pvl} |
| 10637 |
|
| 10638 |
Consider Bratu's equation |
| 10639 |
\begin{equation} \begin{array}{cl} |
| 10640 |
u_1 ' &= u_2 , \\ |
| 10641 |
u_2 ' &= -p_1 e^{u_1} , \\ |
| 10642 |
\end{array} \end{equation} |
| 10643 |
with boundary conditions $ u_1(0)=0$, $u_1(1)=0.$ |
| 10644 |
As in demo \filef{exp}, a solution curve requires one free parameter; |
| 10645 |
here $p_1$. |
| 10646 |
|
| 10647 |
Note that additional parameters are specified in the user-supplied subroutine |
| 10648 |
\funcf{ PVLS} in file \filef{pvl.f90}, namely, |
| 10649 |
$p_2$ (the $L_2$-norm of $u_1$), |
| 10650 |
$p_3$ (the minimum of $u_2$ on the space-interval $[0,1]$~), |
| 10651 |
$p_4$ (the boundary value $u_2(0)$~), |
| 10652 |
$p_5$ (the same boundary value $u_2(0)$~). |
| 10653 |
These additional parameters should be considered as ``solution measures'' |
| 10654 |
for output purposes; they should not be treated as true |
| 10655 |
continuation parameters. |
| 10656 |
|
| 10657 |
Note also that four free parameters are specified in the \AUTO-constants file |
| 10658 |
\filef{c.pvl}, namely, $p_1$, $p_2$, $p_3$, $p_4$, and $p_5$. |
| 10659 |
The first one in this list, $p_1$, is the true continuation parameter. |
| 10660 |
The parameters $p_2$, $p_3$, $p_4$, and $p_5$ are \emp{ overspecified} |
| 10661 |
so that their values will appear in the output. |
| 10662 |
However, |
| 10663 |
\emp{ it is essential that the true continuation parameter appear first.} |
| 10664 |
For example, it would be an error to specify the parameters |
| 10665 |
in the following order~: $p_2$, $p_1$, $p_3$, $p_4$, $p_5$. |
| 10666 |
|
| 10667 |
In general, true continuation parameters must appear first in the |
| 10668 |
parameter-specification in the \AUTO constants-file. |
| 10669 |
Overspecified parameters will be printed, and can be |
| 10670 |
defined in \funcf{ PVLS}, but they are not part of the intrinsic continuation |
| 10671 |
procedure. |
| 10672 |
|
| 10673 |
As this demo also illustrates (see the \parf{UZR} values in \filef{c.pvl}), |
| 10674 |
labeled solutions can also be output at selected values |
| 10675 |
of the overspecified parameters. |
| 10676 |
|
| 10677 |
\begin{table}[htbp] |
| 10678 |
\begin{center} |
| 10679 |
\begin{tabular}{| l | l |} |
| 10680 |
\hline |
| 10681 |
\AUTO-COMMAND & ACTION \\ |
| 10682 |
\hline |
| 10683 |
%============================================================================== |
| 10684 |
\commandf{mkdir pvl} & create an empty work directory \\ |
| 10685 |
\commandf{cd pvl} & change directory \\ |
| 10686 |
\commandf{demo('pvl')} & copy the demo files to the work directory \\ |
| 10687 |
\hline |
| 10688 |
%============================================================================== |
| 10689 |
\commandf{r1=run(e='pvl',c='pvl')} & compute a solution family \\ |
| 10690 |
\commandf{save(r1,'pvl')} & save output-files as \filef{b.pvl, s.pvl, d.pvl} \\ |
| 10691 |
\hline |
| 10692 |
%============================================================================== |
| 10693 |
\end{tabular} |
| 10694 |
\caption{Commands for running demo \filef{pvl}.} |
| 10695 |
\label{tbl:demo_pvl} |
| 10696 |
\end{center} |
| 10697 |
\end{table} |
| 10698 |
|
| 10699 |
\newpage |
| 10700 |
%============================================================================== |
| 10701 |
%DEMO=ext====================================================================== |
| 10702 |
%============================================================================== |
| 10703 |
\section{ ext : Spurious Solutions to BVP.} \label{sec:Demos_ext} |
| 10704 |
|
| 10705 |
This demo illustrates the computation of spurious solutions |
| 10706 |
to the boundary value problem |
| 10707 |
\begin{equation} \begin{array}{cl} |
| 10708 |
& u_1' - u_2 = 0 , \\ |
| 10709 |
& u_2' + \lambda^2 \pi^2 \sin( u_1 + u_1^2 + u_1^3 ) = 0, |
| 10710 |
\qquad t \in [0,1], \\ |
| 10711 |
& u_1(0) = 0, \quad u_1(1) = 0. \\ |
| 10712 |
\end{array} \end{equation} |
| 10713 |
Here the differential equation is discretized using a fixed uniform mesh. |
| 10714 |
This results in spurious solutions that disappear when an adaptive mesh is used. |
| 10715 |
See the \AUTO-constant \parf{IAD} in Section~\ref{sec:Discretization_constants}. |
| 10716 |
This example is also considered in |
| 10717 |
\citename{BeDo:81} \citeyear{BeDo:81} |
| 10718 |
and |
| 10719 |
\citename{DoKeKe:91b} \citeyear{DoKeKe:91b}. |
| 10720 |
|
| 10721 |
\begin{table}[htbp] |
| 10722 |
\begin{center} |
| 10723 |
\begin{tabular}{| l | l |} |
| 10724 |
\hline |
| 10725 |
\AUTO-COMMAND & ACTION \\ |
| 10726 |
\hline |
| 10727 |
%============================================================================== |
| 10728 |
\commandf{mkdir ext} & create an empty work directory \\ |
| 10729 |
\commandf{cd ext} & change directory \\ |
| 10730 |
\commandf{demo('ext')} & copy the demo files to the work directory \\ |
| 10731 |
\hline |
| 10732 |
%============================================================================== |
| 10733 |
\commandf{r1=run(e='ext',c='ext')} & detect bifurcations from the trivial solution family \\ |
| 10734 |
\hline |
| 10735 |
%============================================================================== |
| 10736 |
\commandf{r2=run(r1("BP3"),ISW=-1,NCOL=3)} & \parbox[t]{3in}{compute a bifurcating family containing spurious bifurcations. \vspace{0.2cm}}\\ |
| 10737 |
\commandf{save(r1+r2,'ext')} & save all output to \filef{b.ext, s.ext, d.ext} \\ |
| 10738 |
\hline |
| 10739 |
%============================================================================== |
| 10740 |
\end{tabular} |
| 10741 |
\caption{Commands for running demo \filef{ext}.} |
| 10742 |
\label{tbl:demo_ext} |
| 10743 |
\end{center} |
| 10744 |
\end{table} |
| 10745 |
|
| 10746 |
\newpage |
| 10747 |
%============================================================================== |
| 10748 |
%DEMO=tim====================================================================== |
| 10749 |
%============================================================================== |
| 10750 |
\section{ tim : A Test Problem for Timing \AUTO.} \label{sec:Demos_tim} |
| 10751 |
This demo is a boundary value problem with variable dimension \parf{NDIM}. |
| 10752 |
It can be used to time the performance of \AUTO |
| 10753 |
for various choices of \parf{NDIM} (which must be even), \parf{NTST}, and \parf{NCOL}. |
| 10754 |
The equations are |
| 10755 |
\begin{equation} \begin{array}{cl} |
| 10756 |
u_i ' &= u_i , \\ |
| 10757 |
v_i ' &= -p_1 ~ e(u_i) , \\ |
| 10758 |
\end{array} \end{equation} |
| 10759 |
$i=1,\cdots$,\parf{NDIM}/2, |
| 10760 |
with boundary conditions $ u_i(0)=0$, $u_i(1)=0.$ |
| 10761 |
Here |
| 10762 |
$$ e(u) = \sum_{k=0}^{n} ~ \frac{u^k }{ k!} ~ , $$ |
| 10763 |
with $n=25$. |
| 10764 |
The computation requires 10 full $LU$-decompositions of the linearized system |
| 10765 |
that arises from Newton's method for solving the collocation equations. |
| 10766 |
The commands for running the timing problem for a particular choice |
| 10767 |
of \parf{NDIM}, \parf{NTST}, and \parf{NCOL} are given below. |
| 10768 |
(Note that if \parf{NDIM} is changed then \parf{NBC} must be changed accordingly.) |
| 10769 |
|
| 10770 |
\begin{table}[htbp] |
| 10771 |
\begin{center} |
| 10772 |
\begin{tabular}{| l | l |} |
| 10773 |
\hline |
| 10774 |
\AUTO-COMMAND & ACTION \\ |
| 10775 |
\hline |
| 10776 |
%============================================================================== |
| 10777 |
\commandf{mkdir tim} & create an empty work directory \\ |
| 10778 |
\commandf{cd tim} & change directory \\ |
| 10779 |
\commandf{demo('tim')} & copy the demo files to the work directory \\ |
| 10780 |
\hline |
| 10781 |
%============================================================================== |
| 10782 |
\commandf{r1=run(e='tim',c='tim')} & Timing run \\ |
| 10783 |
\commandf{save(r1,'tim')} & save output-files as \filef{b.tim, s.tim, d.tim} \\ |
| 10784 |
\hline |
| 10785 |
%============================================================================== |
| 10786 |
\end{tabular} |
| 10787 |
\caption{Commands for running demo \filef{tim}.} |
| 10788 |
\label{tbl:demo_tim} |
| 10789 |
\end{center} |
| 10790 |
\end{table} |
| 10791 |
|
| 10792 |
|
| 10793 |
%============================================================================== |
| 10794 |
%============================================================================== |
| 10795 |
\chapter{ {\cal HomCont}.} \label{ch:HomCont} |
| 10796 |
%============================================================================== |
| 10797 |
%============================================================================== |
| 10798 |
\section{ Introduction.} \label{sec:HomCont_Intro} |
| 10799 |
{\cal HomCont} is a collection of routines for the continuation |
| 10800 |
of homoclinic solutions to ODEs in two or more parameters. |
| 10801 |
The accurate detection and multi-parameter continuation of certain |
| 10802 |
codimension-two singularities is allowed for, including all known |
| 10803 |
cases that involve a unique homoclinic orbit at the singular point. |
| 10804 |
Homoclinic connections to hyperbolic and non-hyperbolic equilibria are |
| 10805 |
allowed as are certain heteroclinic orbits. |
| 10806 |
Homoclinic orbits in reversible systems can also be computed. |
| 10807 |
The theory behind the methods used is |
| 10808 |
explained in \citeasnoun{ChKu:94}, \citeasnoun{BaCh:94}, |
| 10809 |
\citename{Sa:95} \citeyear{Sa:95,Sa:95a}, \citeasnoun{ChKuSa:95} and |
| 10810 |
references therein. The final cited paper contains a concise |
| 10811 |
description of the present version. |
| 10812 |
|
| 10813 |
The current implementation of {\cal HomCont} must be considered as experimental, |
| 10814 |
and updates are anticipated. |
| 10815 |
The {\cal HomCont} routines are in the file {\tt auto/07p/src/autlib5.f}. |
| 10816 |
Expert users wishing to modify the routines may look there. |
| 10817 |
Note also that at present, {\cal HomCont} can be run only in |
| 10818 |
{\cal AUTO} Command Mode and not with the GUI. |
| 10819 |
|
| 10820 |
|
| 10821 |
\section{{\cal HomCont} Files and Routines.} \label{sec:HomCont_files} |
| 10822 |
|
| 10823 |
In order to run {\cal HomCont} one must prepare an equations file \filef{xxx.f90}, |
| 10824 |
where \filef{xxx} is the name of the example, |
| 10825 |
and constants-file \filef{c.xxx}. |
| 10826 |
These files are in the standard {\cal AUTO} format, but |
| 10827 |
the \filef{c.xxx} file almost always also must |
| 10828 |
contain constants that are specific to homoclinic continuation. |
| 10829 |
The choice \parf{IPS}=9 in \filef{c.xxx} specifies the problem as |
| 10830 |
being homoclinic continuation. |
| 10831 |
|
| 10832 |
The equation-file \filef{kpr.f90} serves as a sample for new equation |
| 10833 |
files. It contains the Fortran routines |
| 10834 |
\funcf{ FUNC}, \funcf{ STPNT}, \funcf{ PVLS}, \funcf{ BCND}, \funcf{ ICND} |
| 10835 |
and \funcf{ FOPT}. The final three are |
| 10836 |
dummy routines which are never needed for homoclinic continuation. |
| 10837 |
Note a minor difference in \funcf{ STPNT} and \funcf{ PVLS} with other |
| 10838 |
{\cal AUTO} equation-files, in that the common block |
| 10839 |
\parf{/BLHOM/} is required. |
| 10840 |
|
| 10841 |
The constants-file \filef{c.xxx} is identical in format to other |
| 10842 |
{\cal AUTO} constants-files, except for the added constants. |
| 10843 |
Note that the values of the constants |
| 10844 |
\parf{NBC} and \parf{NINT} are irrelevant, as these are set |
| 10845 |
automatically by the choice \parf{IPS}=9. Also, the choice \parf{JAC=1} |
| 10846 |
is strongly recommended, because the Jacobian is used extensively for |
| 10847 |
calculating the linearization at the equilibria and hence for |
| 10848 |
evaluating boundary conditions and certain test functions. However, |
| 10849 |
note that \parf{JAC=1} does not necessarily mean that {\cal auto} will |
| 10850 |
use the analytically specified Jacobian for continuation. |
| 10851 |
|
| 10852 |
The earlier HomCont files \filef{h.xxx} are obsolete but still |
| 10853 |
supported. You can convert from the old to the new format by running |
| 10854 |
the command \commandf{@cnvc xxx yyy} where \commandf{xxx} refers to either |
| 10855 |
or both of the files \filef{c.xxx} and \filef{h.xxx}. A new-style |
| 10856 |
constants file, \filef{c.yyy} is written. The command |
| 10857 |
\commandf{@cnvc xxx} overwrites \filef{c.xxx} and deletes \filef{h.xxx}. |
| 10858 |
|
| 10859 |
\section{ {\cal HomCont}-Constants.} \label{sec:HomCont_Constants} |
| 10860 |
An example for the HomCont-specific constants in \filef{c.xxx} is listed below: |
| 10861 |
\begin{verbatim} |
| 10862 |
NUNSTAB=1, NSTAB=2, IEQUIB=1, ITWIST=1, ISTART=5 |
| 10863 |
IREV = [] |
| 10864 |
IFIXED = [13] |
| 10865 |
IPSI = [9,10] |
| 10866 |
\end{verbatim} |
| 10867 |
These constants have the following meaning. |
| 10868 |
|
| 10869 |
\subsection{\parf{NUNSTAB}} \label{sec:NUNSTAB} |
| 10870 |
|
| 10871 |
Number of unstable eigenvalues of the left-hand equilibrium (the equilibrium |
| 10872 |
approached by the orbit as $t \to -\infty$). The default value is -1, |
| 10873 |
which means autodetection. In almost all cases autodetection is |
| 10874 |
possible. The exception is when starting from a homoclinic to a |
| 10875 |
saddle-node equilibrium when \parf{IEQUIB$\ne$1}. Examples for this |
| 10876 |
exception are in runs 9, 12, and 13 of the |
| 10877 |
demo \texttt{kpr} (see Chapter~\ref{ch:HomCont_kpr}). |
| 10878 |
Even in this case |
| 10879 |
only one of \parf{NUNSTAB} and \parf{NSTAB} needs to be specified, the |
| 10880 |
other one being computed as \parf{NDIM} minus the specified constant. |
| 10881 |
|
| 10882 |
\subsection{\parf{NSTAB}} \label{sec:NSTAB} |
| 10883 |
Number of stable eigenvalues of the right-hand equilibrium (the equilibrium |
| 10884 |
approached by the orbit as $t \to +\infty$). The same default as for |
| 10885 |
\parf{NUNSTAB} applies here. |
| 10886 |
|
| 10887 |
\subsection{\parf{IEQUIB}} \label{sec:IEQUIB} |
| 10888 |
\begin{itemize} |
| 10889 |
\item[-] \parf{IEQUIB=0}~: |
| 10890 |
Homoclinic orbits to hyperbolic equilibria; |
| 10891 |
the equilibrium is specified explicitly in \funcf{PVLS} and stored in |
| 10892 |
\parf{PAR(11+I)}, \parf{I=1,NDIM}. |
| 10893 |
\item[-] \parf{IEQUIB=1}~(default): |
| 10894 |
Homoclinic orbits to hyperbolic equilibria; |
| 10895 |
the equilibrium is solved for during continuation. Initial values for |
| 10896 |
the equilibrium are stored in \parf{PAR(11+I)}, \parf{I=1,NDIM} in \funcf{ STPNT}. |
| 10897 |
\item[-] \parf{IEQUIB=2}~: |
| 10898 |
Homoclinic orbits to a saddle-node; initial values for |
| 10899 |
the equilibrium are stored in \parf{PAR(11+I)}, \parf{I=1,NDIM} in \funcf{ STPNT}. |
| 10900 |
\item[-] \parf{IEQUIB=-1}~: |
| 10901 |
Heteroclinic orbits to hyperbolic equilibria; |
| 10902 |
the equilibria are specified explicitly in \funcf{ PVLS} and stored in |
| 10903 |
\parf{PAR(11+I)}, |
| 10904 |
\parf{I=1,NDIM} (left-hand equilibrium) and \parf{PAR(11+I)}, |
| 10905 |
\parf{I=NDIM+1,2*NDIM} (right-hand equilibrium). |
| 10906 |
\item[-] \parf{IEQUIB=-2}~: |
| 10907 |
Heteroclinic orbits to hyperbolic equilibria; |
| 10908 |
the equilibria are solved for during continuation. Initial values are |
| 10909 |
specified in \funcf{ STPNT} and stored in \parf{PAR(11+I)}, \parf{I=1,NDIM} (left-hand equilibrium), |
| 10910 |
\parf{PAR(11+I)}, \parf{I=NDIM+1,2*NDIM} (right-hand equilibrium). |
| 10911 |
\end{itemize} |
| 10912 |
|
| 10913 |
\subsection{\parf{ITWIST}} \label{sec:ITWIST} |
| 10914 |
\begin{itemize} |
| 10915 |
\item[-] \parf{ITWIST=0}~(default): |
| 10916 |
the orientation of the homoclinic orbit is not computed. |
| 10917 |
\item[-] \parf{ITWIST=1}~: |
| 10918 |
the orientation of the homoclinic orbit is computed. For this purpose, the |
| 10919 |
adjoint variational equation is solved for the unique bounded |
| 10920 |
solution. If \parf{IRS = 0}, an initial solution to the adjoint equation |
| 10921 |
must be specified as well. However, if \parf{IRS>0} and \parf{ITWIST} |
| 10922 |
has just been increased from zero, then {\cal AUTO} will |
| 10923 |
automatically generate the initial solution to the adjoint. |
| 10924 |
In this case, a dummy Newton-step should be performed, see |
| 10925 |
Section~\ref{sec:Starting_strategies} for more details. |
| 10926 |
\end{itemize} |
| 10927 |
|
| 10928 |
\subsection{\parf{ISTART}} \label{sec:ISTART} |
| 10929 |
\begin{itemize} |
| 10930 |
\item[-] \parf{ISTART=1}~: |
| 10931 |
No special action is taken. |
| 10932 |
\item[-] \parf{ISTART=2}~: |
| 10933 |
If \parf{IRS=0}, an explicit solution must be specified in the |
| 10934 |
subroutine \funcf{ STPNT} in the usual format. |
| 10935 |
\item[-] \parf{ISTART=3}~: |
| 10936 |
The ``homotopy'' approach is used for starting, see |
| 10937 |
Section~\ref{sec:Starting_strategies} |
| 10938 |
for more details. Note that this is not available with the choice |
| 10939 |
\parf{IEQUIB=2}. |
| 10940 |
\item[-] \parf{ISTART=4}~: |
| 10941 |
A phase-shift is performed for homoclinic orbits to let the |
| 10942 |
equilibrium (either fixed or non-fixed, depending on IEQUIB) |
| 10943 |
correspond to $t=0$ and $t=1$. This is necessary if a periodic |
| 10944 |
orbit that is close to a homoclinic orbit is continued into |
| 10945 |
a homoclinic orbit. |
| 10946 |
\item[-] \parf{ISTART=5}~(default): |
| 10947 |
If \parf{IRS=0}, the restart solution comes from a data file, or |
| 10948 |
the restart solution is a homoclinic orbit with problem |
| 10949 |
type \parf{IPS=9}, no special action is taken, as for \parf{ISTART=1}. |
| 10950 |
For other problem types, use a phase-shift, as for \parf{ISTART=4}. |
| 10951 |
\item[-] \parf{ISTART=-N, $N=1,2,3,\ldots$}~: |
| 10952 |
Homoclinic branch switching: this description is for reference only. |
| 10953 |
We refer to the demo in Chapter~\ref{ch:HomCont_hbs} to see how this |
| 10954 |
can be used in actual practice and to \citeasnoun{OlChKr:03} for |
| 10955 |
theory and background. |
| 10956 |
|
| 10957 |
The orbit is split into $N+1$ parts and |
| 10958 |
{\cal AUTO} sees it as an $(N+1)\times$\parf{NDIM}-dimensional object. |
| 10959 |
The first part $u_0$ goes from the equilibrium to the point $x_0$ that is |
| 10960 |
furthest from the equilibrium. |
| 10961 |
Then follow $N-1$ shifted copies of the orbit, which travel |
| 10962 |
from the point $x_0$ back to the point $x_0$. The last part $U_N$ |
| 10963 |
goes from the point $x_0$ back to the equilibrium. |
| 10964 |
The derivatives $\dot{x}_0$ with respect to time |
| 10965 |
of the point that is furthest from the equilibrium are stored at the |
| 10966 |
parameters \parf{PAR(NP-NDIM+1...NP)}, where \parf{NP=max(NPARX,NPAR)}. |
| 10967 |
|
| 10968 |
If \parf{ITWIST=1}, and this was also the case in the preceding run, |
| 10969 |
then a copy of the adjoint vector $\Psi$ at $x_0$ is stored at the parameters |
| 10970 |
\parf{PAR(NP-NDIM*2+1...NP-NDIM)} and Lin's method can be used |
| 10971 |
to do homoclinic branch switching. To be more precise, the individual parts |
| 10972 |
$u_i$ and $u_{i+1}$ are at distances $\varepsilon_i$ away from each |
| 10973 |
other, along the Lin vector $Psi$, at the left- and right-hand end |
| 10974 |
points. These gaps $\varepsilon_i$ are at parameters |
| 10975 |
\parf{PAR(20+2*i)}. Moreover, each part (except $u_{N+1}$) ends at |
| 10976 |
at a Poincar\'e section which goes through $x_0$ and is perpendicular |
| 10977 |
to $\dot{x}_0$. |
| 10978 |
|
| 10979 |
The times $T_i$ that each part $u_i$ takes are stored as follows: |
| 10980 |
$T_0=$\parf{PAR(10)}, $T_N=$\parf{PAR(11)} and $T_i=$\parf{PAR(19+2*i)} |
| 10981 |
for $i=1\ldots N-1$. Through a continuation in problem parameters, |
| 10982 |
gaps $\varepsilon_i$, and times $T_i$ |
| 10983 |
it is possible to switch from a $1$-homoclinic to |
| 10984 |
an $N$-homoclinic orbit. |
| 10985 |
|
| 10986 |
If \parf{ITWIST=0}, the adjoint vector is not computed and Lin's |
| 10987 |
method is not used. Instead, AUTO produces a gap |
| 10988 |
$\varepsilon$=\parf{PAR(22)} at the right-hand end point $p$ of |
| 10989 |
$u_{N+1}$, measuring the distance between the stable manifold of the |
| 10990 |
equilibrium and $p$. This technique can also be used to find 2-homoclinic |
| 10991 |
orbits, by varying in $\varepsilon$ and $T_1$, similar to the method |
| 10992 |
described before, but only if the unstable manifold in |
| 10993 |
one-dimensional. Because this method is more limited than the method |
| 10994 |
using Lin vectors, we do not recommend it for normal usage. |
| 10995 |
|
| 10996 |
To switch back to a normal homoclinic orbit, set \parf{ISTART} back to |
| 10997 |
a positive value such as 1. Now HomCont has lost all the information |
| 10998 |
about the adjoint, so if \parf{ITWIST} is set to 0, HomCont |
| 10999 |
does a normal continuation without the adjoint, and |
| 11000 |
if \parf{ITWIST} is set to 1, one needs to do a Newton dummy step |
| 11001 |
first to recalculate the adhoint. |
| 11002 |
\end{itemize} |
| 11003 |
|
| 11004 |
\subsection{\parf{IREV}} \label{sec:IREV} |
| 11005 |
If \parf{IREV$\ne$[]} then it is assumed that |
| 11006 |
the system is reversible under the transformation |
| 11007 |
$t \to -t$ and $U(i) \to -U(i)$ for all $i$ with |
| 11008 |
\parf{IREV(i)>0}. Then only half the homoclinic solution is |
| 11009 |
solved for with right-hand boundary conditions specifying |
| 11010 |
that the solution is symmetric under the reversibility |
| 11011 |
(see \citeasnoun{ChSp:93}). The number of free parameters |
| 11012 |
is then reduced by one. Otherwise the default applies, \parf{IREV=[]}. |
| 11013 |
|
| 11014 |
\subsection{\parf{IFIXED}} \label{sec:IFIXED} |
| 11015 |
Labels of test functions that are held fixed. |
| 11016 |
E.g., with \parf{IFIXED=[n]} one can compute a locus in |
| 11017 |
one extra parameter of a singularity defined by |
| 11018 |
test function \parf{PSI(n)=0}. The default is \parf{IFIXED=[]}. |
| 11019 |
|
| 11020 |
\subsection{\parf{IPSI}} \label{sec:IPSI} |
| 11021 |
Labels of activated test functions for detecting homoclinic |
| 11022 |
bifurcations, see Section~\ref{sec:HomCont_Test_functions} |
| 11023 |
for a list. If a test function is activated then the |
| 11024 |
corresponding parameter (\parf{IPSI(I)+20}) |
| 11025 |
must be added to the list of continuation parameters \parf{ICP} |
| 11026 |
and zero of this parameter added to the list of user-defined |
| 11027 |
output points \parf{UZR,} in \filef{c.xxx}. |
| 11028 |
The default is \parf{IPSI=[]}. |
| 11029 |
|
| 11030 |
\section{ Restrictions on {\cal HomCont} Constants.} |
| 11031 |
Note that certain combinations of these constants are not allowed |
| 11032 |
in the present implementation. In particular, |
| 11033 |
\begin{itemize} |
| 11034 |
\item[-] |
| 11035 |
The computation of orientation \parf{ITWIST=1} is not |
| 11036 |
implemented for \parf{IEQUIB<0} (heteroclinic orbits), |
| 11037 |
\parf{IEQUIB=2} (saddle-node homoclinics), |
| 11038 |
\parf{IREV$\ne$[]} (reversible systems), \parf{ISTART=3} (homotopy |
| 11039 |
method for starting), or if the equilibrium contains complex |
| 11040 |
eigenvalues in its linearization. |
| 11041 |
\item[-] The homotopy method \parf{ISTART=3} is not fully implemented |
| 11042 |
for heteroclinic connections \parf{IEQUIB<0}, saddle-node homoclinic |
| 11043 |
orbits \parf{IEQUIB=2} or reversible systems \parf{IREV$\ne$[]}. |
| 11044 |
\item[-] Certain test functions are not valid for certain forms |
| 11045 |
of continuation |
| 11046 |
(see Section~\ref{sec:HomCont_Test_functions} below); |
| 11047 |
for example |
| 11048 |
\parf{PSI(13)} and \parf{PSI(14)} only make sense if |
| 11049 |
\parf{ITWIST=1} and \parf{PSI(15)} and \parf{PSI(16)} only apply |
| 11050 |
to \parf{IEQUIB=2}. |
| 11051 |
\end{itemize} |
| 11052 |
|
| 11053 |
\section{ Restrictions on the Use of \parf{PAR}.} |
| 11054 |
The parameters \parf{PAR(1)} -- \parf{PAR(9)} can be used freely by |
| 11055 |
the user. The other parameters are used as follows~: |
| 11056 |
|
| 11057 |
\begin{itemize} |
| 11058 |
|
| 11059 |
\item[-] \parf{PAR(11)}~: |
| 11060 |
The value of \parf{PAR(11)} equals the length of the time interval over |
| 11061 |
which a homoclinic solution is computed. Also referred to as ``period''. |
| 11062 |
This must be specified in \funcf{ STPNT}. |
| 11063 |
|
| 11064 |
\item[-] \parf{PAR(10)}~: |
| 11065 |
If \parf{ITWIST=1} then \parf{PAR(10)} is used internally as a |
| 11066 |
dummy parameter so that the adjoint equation is well-posed. |
| 11067 |
|
| 11068 |
\item[-] \parf{PAR(12)-PAR(20)}~: |
| 11069 |
These are used for specifying the |
| 11070 |
equilibria and (if \parf{ISTART=3}) the artificial parameters of |
| 11071 |
the homotopy method (see Section~\ref{sec:Starting_strategies} below). |
| 11072 |
|
| 11073 |
\item[-] \parf{PAR(21)-PAR(36)}~: |
| 11074 |
These parameters are used for storing the test functions |
| 11075 |
(see Section~\ref{sec:HomCont_Test_functions}). |
| 11076 |
\end{itemize} |
| 11077 |
|
| 11078 |
The output is in an identical format to {\cal AUTO} except that |
| 11079 |
additional information at each computed point is written |
| 11080 |
in \parf{fort.9}. This information comprises the eigenvalues of |
| 11081 |
the (left-hand) equilibrium, the values of each activated test |
| 11082 |
function and, if \parf{ITWIST=1}, |
| 11083 |
whether the saddle homoclinic loop is orientable |
| 11084 |
or not. |
| 11085 |
Note that the statement about orientability is only meaningful if the |
| 11086 |
leading eigenvalues are not complex and the homoclinic solution is not |
| 11087 |
in a flip configuration, that is, none of the test functions |
| 11088 |
$\psi_i$ for $i=11,12,13,14$ is zero (or close to zero), |
| 11089 |
see Section~\ref{sec:HomCont_Test_functions}. |
| 11090 |
Finally, the values of the \parf{IPSI} activated test functions are written. |
| 11091 |
|
| 11092 |
\section{ Test Functions.} \label{sec:HomCont_Test_functions} |
| 11093 |
Codimension-two homoclinic orbits are detected along branches of codim |
| 11094 |
1 homoclinics by locating zeroes of certain test functions |
| 11095 |
$\psi_i$. The test functions that are ``switched on'' during any |
| 11096 |
continuation are given by the choice of the labels $i$, and are |
| 11097 |
specified by the parameters \parf{IPSI)} in \filef{ |
| 11098 |
c.xxx}. Here \parf{IPSI=[IPSI(1),$\ldots$,IPSI(NPSI)]} gives the labels of |
| 11099 |
the test functions (numbers between 1 and 16). A zero of |
| 11100 |
each labeled test function defines a certain codimension-two |
| 11101 |
homoclinic singularity, specified as follows. |
| 11102 |
The notation used for eigenvalues is the same as that in |
| 11103 |
\citeasnoun{ChKu:94} or \citeasnoun{ChKuSa:95}. |
| 11104 |
|
| 11105 |
\begin{itemize} |
| 11106 |
\item[-] $ i=1$: |
| 11107 |
Resonant eigenvalues (neutral saddle); $\mu_1=-\lambda_1$. |
| 11108 |
\item[-] $ i=2$: |
| 11109 |
Double real leading stable eigenvalues (saddle to saddle-focus |
| 11110 |
transition); $\mu_1=\mu_2$. |
| 11111 |
\item[-] $ i=3$: |
| 11112 |
Double real leading unstable eigenvalues (saddle to saddle-focus |
| 11113 |
transition);\\ |
| 11114 |
$\lambda_1=\lambda_2$. |
| 11115 |
\item[-] $ i=4$: |
| 11116 |
Neutral saddle, saddle-focus or bi-focus (includes $ i=1$); |
| 11117 |
$\mbox{Re}(\mu_1) = - \mbox{Re}(\lambda_1)$. |
| 11118 |
\item[-] $ i=5$: |
| 11119 |
Neutrally-divergent saddle-focus (stable eigenvalues complex);\\ |
| 11120 |
$\mbox{Re}(\lambda_1) = - \mbox{Re}(\mu_1) - \mbox{Re}(\mu_2)$. |
| 11121 |
\item[-] $ i=6$: |
| 11122 |
Neutrally-divergent saddle-focus (unstable eigenvalues complex);\\ |
| 11123 |
$\mbox{Re}(\mu_1) = - \mbox{Re}(\lambda_1) - \mbox{Re}(\lambda_2)$. |
| 11124 |
\item[-] $ i=7$: |
| 11125 |
Three leading eigenvalues (stable); |
| 11126 |
$\mbox{Re}(\lambda_1) = - \mbox{Re}(\mu_1) - \mbox{Re}(\mu_2)$. |
| 11127 |
\item[-] $ i=8$: |
| 11128 |
Three leading eigenvalues (unstable); |
| 11129 |
$\mbox{Re}(\mu_1) = - \mbox{Re}(\lambda_1) - \mbox{Re}(\lambda_2)$. |
| 11130 |
\item[-] $ i=9$: |
| 11131 |
Local bifurcation (zero eigenvalue or Hopf): |
| 11132 |
number of stable eigenvalues decreases; $\mbox{Re}(\mu_1)=0$. |
| 11133 |
\item[-] $ i=10$: |
| 11134 |
Local bifurcation (zero eigenvalue or Hopf): |
| 11135 |
number of unstable eigenvalues decreases; $\mbox{Re}(\lambda_1)=0$. |
| 11136 |
\item[-] $ i=11$: |
| 11137 |
Orbit flip with respect to leading stable direction |
| 11138 |
(e.g., 1D unstable manifold). |
| 11139 |
\item[-] $ i=12$: |
| 11140 |
Orbit flip with respect to leading unstable direction, |
| 11141 |
(e.g., 1D stable manifold). |
| 11142 |
\item[-] $ i=13$: |
| 11143 |
Inclination flip with respect to stable manifold |
| 11144 |
(e.g., 1D unstable manifold). |
| 11145 |
\item[-] $ i=14$: |
| 11146 |
Inclination flip with respect to unstable manifold |
| 11147 |
(e.g., 1D stable manifold). |
| 11148 |
\item[-] $ i=15$: |
| 11149 |
Non-central homoclinic to saddle-node (in stable manifold). |
| 11150 |
\item[-] $ i=16$: |
| 11151 |
Non-central homoclinic to saddle-node (in unstable manifold). |
| 11152 |
\end{itemize} |
| 11153 |
|
| 11154 |
Expert users may wish to add their own test functions by editing |
| 11155 |
the function \funcf{ PSIHO} in \filef{autlib5.f}. |
| 11156 |
|
| 11157 |
{\it It is important to remember that, in order to specify activated |
| 11158 |
test functions, it is required to also |
| 11159 |
add the corresponding label $+20$ to the list of continuation |
| 11160 |
parameters and a zero of this parameter to the list of user-defined |
| 11161 |
output points. Having done this, the corresponding parameters |
| 11162 |
are output to the screen and zeros are accurately located.} |
| 11163 |
|
| 11164 |
\section{ Starting Strategies.} \label{sec:Starting_strategies} |
| 11165 |
There are four possible starting procedures for continuation. |
| 11166 |
|
| 11167 |
\begin{itemize} |
| 11168 |
|
| 11169 |
\item[{\bf(i)}] |
| 11170 |
Data can be read from a previously-obtained output point from {\cal AUTO} |
| 11171 |
(e.g., from continuation of a periodic orbit up to large period; |
| 11172 |
note that if the end-point of the data stored is not close to the |
| 11173 |
equilibrium, a phase shift must be performed by setting |
| 11174 |
\parf{ISTART=4}). These data can be read from fort.8 (saved to \filef{ |
| 11175 |
s.xxx}) by making \parf{IRS} correspond to the label of the data |
| 11176 |
point in question. |
| 11177 |
|
| 11178 |
\item[{\bf(ii)}] |
| 11179 |
Data from numerical integration (e.g.,\ computation of a stable |
| 11180 |
periodic orbit, or an approximate homoclinic obtained by shooting) |
| 11181 |
can be read in from a data file using the \AUTO constant \parf{dat} |
| 11182 |
(see Section~\ref{sec:dat}). |
| 11183 |
The numerical data should be stored in |
| 11184 |
a file \filef{xxx.dat}, in multi-column format according to the read statement |
| 11185 |
\begin{verbatim} |
| 11186 |
READ(...,*) T(J),(U(I,J),I=1,NDIM) |
| 11187 |
\end{verbatim} |
| 11188 |
where $T$ runs in the interval \parf{[0,1]}. |
| 11189 |
When starting from this solution \parf{IRS} should be set to 0 and |
| 11190 |
the value of \parf{ISTART} is irrelevant. |
| 11191 |
|
| 11192 |
\item[{\bf(iii)}] |
| 11193 |
By setting \parf{ISTART=2}, |
| 11194 |
an explicit homoclinic solution can be specified in the routine \funcf{ STPNT} |
| 11195 |
in the usual {\cal AUTO} format, that is |
| 11196 |
$U=...(T)$ where $T$ is scaled to lie in the |
| 11197 |
interval $[0,1]$. |
| 11198 |
|
| 11199 |
\item[{\bf(iv)}] |
| 11200 |
The choice \parf{ISTART=3}, allows for |
| 11201 |
a homotopy method to be used to approach a homoclinic orbit |
| 11202 |
starting from a small approximation to a solution to the |
| 11203 |
linear problem in the unstable manifold \cite{DoFrMo:93}. For |
| 11204 |
details of implementation, the reader is referred to |
| 11205 |
Section~5.1.2.\ of \citeasnoun{ChKu:94}, under the simplification |
| 11206 |
that we do not solve for the adjoint $u(t)$ here. The basic idea |
| 11207 |
is to start with a small solution in the unstable manifold, and perform |
| 11208 |
continuation in \parf{PAR(11)=}$2T$ and dummy initial-condition |
| 11209 |
parameters $\xi_i$ in order to satisfy the correct right-hand boundary |
| 11210 |
conditions, which are defined by zeros of other dummy parameters |
| 11211 |
$\omega_i$. More precisely, the left-hand end point is placed in the |
| 11212 |
tangent space to the unstable manifold of the saddle and is characterized by |
| 11213 |
\parf{NUNSTAB} coordinates $\xi_i$ satisfying the condition |
| 11214 |
$$ |
| 11215 |
\xi_1^2 + \xi_2^2 + \ldots +\xi_\parf{NUNSTAB}^2 = \eps_0^2, |
| 11216 |
$$ |
| 11217 |
where $\eps_0$ is a user-defined small number. |
| 11218 |
At the right-hand end point, \parf{NUNSTUB} values $\omega_i$ |
| 11219 |
measure the deviation of this point from the tangent |
| 11220 |
space to the stable manifold of the saddle. |
| 11221 |
\par |
| 11222 |
Suppose that \parf{IEQUIB=0,1} and set \parf{IP=12+IEQUIB*NDIM}. Then |
| 11223 |
\par |
| 11224 |
\medskip |
| 11225 |
\begin{center} |
| 11226 |
\begin{tabular}{ll} |
| 11227 |
\parf{PAR(IP)} & :$\ \ \eps_0$\\ |
| 11228 |
\parf{PAR(IP+i)} & :$\ \ \xi_\parf{i}$, \parf{i=1,2,...,NUNSTAB}\\ |
| 11229 |
\parf{PAR(IP+NUNSTAB+i)} & :$\ \ \omega_\parf{i}$, \parf{i=1,2,...,NUNSTAB} |
| 11230 |
\end{tabular} |
| 11231 |
\end{center} |
| 11232 |
\par |
| 11233 |
\medskip |
| 11234 |
{\it Note that to avoid interference with the test functions |
| 11235 |
(i.e. \parf{PAR(21)-PAR(36)}), one must have \parf{IP+2*NUNSTAB < 21}.} |
| 11236 |
\par |
| 11237 |
If an $\omega_i$ is vanished, it can be frozen while another dummy or system parameter is allowed to |
| 11238 |
vary in order to make consequently all $\omega_i=0$. The resulting final solution |
| 11239 |
gives the initial homoclinic orbit provided the right-hand end point |
| 11240 |
is sufficiently close to the saddle. |
| 11241 |
See Chapter~\ref{ch:HomCont_kpr} for an example, |
| 11242 |
however, we recommend the homotopy method only for ``expert users''. |
| 11243 |
\end{itemize} |
| 11244 |
|
| 11245 |
To compute the orientation of a homoclinic orbit (in order to detect |
| 11246 |
inclination-flip bifurcations) it is necessary to compute, in tandem, |
| 11247 |
a solution to the modified adjoint variational equation, by setting |
| 11248 |
\parf{ITWIST=1}. In order to obtain starting data for such a |
| 11249 |
computation when restarting from a point where just the homoclinic |
| 11250 |
is computed, upon increasing \parf{ITWIST} to 1, {\cal AUTO} generates |
| 11251 |
trivial data for the adjoint. Because the adjoint equations are |
| 11252 |
linear, only a single step of Newton's method is required to |
| 11253 |
enable these trivial data to converge to the correct unique bounded |
| 11254 |
solution. This can be achieved by making a single continuation step in a |
| 11255 |
trivial parameter (i.e. a parameter that does not appear |
| 11256 |
in the problem). |
| 11257 |
|
| 11258 |
Decreasing \parf{ITWIST} to 0 automatically deletes the data for the adjoint |
| 11259 |
from the continuation problem. |
| 11260 |
|
| 11261 |
|
| 11262 |
\section{ Notes on Running {\cal HomCont} Demos.} \label{sec:HomCont_Tutorial_examples} |
| 11263 |
{\cal HomCont} demos are given in the following chapters. |
| 11264 |
To copy all files of a demo \filef{xxx} (for example, \filef{san}), |
| 11265 |
move to a clean directory and type \commandf{demo('xxx')}. |
| 11266 |
Simply typing \commandf{auto xxx.auto} will then automatically |
| 11267 |
execute all runs of the demo. |
| 11268 |
%To automatically run a demo in ``step-by-step'' mode, |
| 11269 |
%type \commandf{make first}, \commandf{make second}, etc., |
| 11270 |
%to run each separate computation of the demo. |
| 11271 |
At each step, the user is encouraged to plot the data |
| 11272 |
saved by using the command \commandf{plot} (e.g., \commandf{plot(r)} |
| 11273 |
plots the data saved in the \python variable \parf{r}). |
| 11274 |
|
| 11275 |
Of course, in a real application, the runs will not have been prepared |
| 11276 |
in advance, and {\cal AUTO}-commands must be used. |
| 11277 |
Such commands can be found in a table at the end of each chapter. |
| 11278 |
A sequence of detailed \AUTO-commands will be given in these tables |
| 11279 |
as illustrated in Table~\ref{tbl:HomCont_demos_1} |
| 11280 |
and Table~\ref{tbl:HomCont_demos_2} for two representative runs of |
| 11281 |
{\cal HomCont} demo \filef{san}. |
| 11282 |
|
| 11283 |
The user is encouraged to copy the format of one of these demos |
| 11284 |
when constructing new examples. |
| 11285 |
|
| 11286 |
The output of the {\cal HomCont} demos reproduced in the following chapters |
| 11287 |
is somewhat machine dependent, as already noted |
| 11288 |
in Section~\ref{sec:Tutorial_all_runs}. |
| 11289 |
In exceptional circumstances, {\cal AUTO} may reach its maximum number of |
| 11290 |
steps \parf{NMX} before a certain output point, or the label of |
| 11291 |
an output point may change. In such case the user may have |
| 11292 |
to make appropriate changes in the {\cal AUTO} constants-files. |
| 11293 |
|
| 11294 |
|
| 11295 |
\begin{table}[htbp] |
| 11296 |
\begin{center} |
| 11297 |
\begin{tabular}{| l | l |} |
| 11298 |
\hline |
| 11299 |
COMMAND & ACTION \\ |
| 11300 |
\hline |
| 11301 |
%============================================================================== |
| 11302 |
\commandf{san=load('san',IPS=9,NDIM=3,ISP=0,ILP=0,} &\\ |
| 11303 |
\commandf{ ITNW=7,JAC=1,NTST=35,IEQUIB=0,DS=0.05)} |
| 11304 |
& set common \AUTO constants\\ |
| 11305 |
\commandf{r1=run(san,ICP=[1,8],UZR=\{-1:0.25\})} & run AUTO using the |
| 11306 |
specified constants\\ |
| 11307 |
\commandf{save(r1,'6')} & save output-files as \filef{b.6, s.6, d.6} \\ |
| 11308 |
\hline |
| 11309 |
%============================================================================== |
| 11310 |
\commandf{@R san 1} & use the constants file \filef{c.san.1} \\ |
| 11311 |
\commandf{@sv 6} & \\ |
| 11312 |
\hline |
| 11313 |
%============================================================================== |
| 11314 |
\end{tabular} |
| 11315 |
\caption{ These two sets of {\cal AUTO}-Commands are equivalent.} |
| 11316 |
\label{tbl:HomCont_demos_1} |
| 11317 |
\end{center} |
| 11318 |
\end{table} |
| 11319 |
|
| 11320 |
\begin{table}[htbp] |
| 11321 |
\begin{center} |
| 11322 |
\begin{tabular}{| l | l |} |
| 11323 |
\hline |
| 11324 |
COMMAND & ACTION \\ |
| 11325 |
\hline |
| 11326 |
%============================================================================== |
| 11327 |
\commandf{r9=run(r8,ICP=[2,8],UZR=\{-2:3.0\})} & \parbox[t]{3in}{get |
| 11328 |
the \AUTO constants-file and run \AUTO/{\cal HomCont}; restart |
| 11329 |
from the last label in \parf{r8}\vspace{0.2cm}}\\ |
| 11330 |
\commandf{r6=r6+r9} & append output to the |
| 11331 |
\python variable \parf{r6} \\ |
| 11332 |
\commandf{save(r6,'6')} & save output to the |
| 11333 |
files \filef{b.6, s.6, d.6} \\ |
| 11334 |
\hline |
| 11335 |
%============================================================================== |
| 11336 |
\commandf{@R san 9 6} & use the constants file |
| 11337 |
\filef{c.san.9}, start from the file \filef{s.6} \\ |
| 11338 |
\commandf{@ap 6} & append output to the |
| 11339 |
files \filef{b.6, s.6, d.6} \\ |
| 11340 |
\hline |
| 11341 |
%============================================================================== |
| 11342 |
\end{tabular} |
| 11343 |
\caption{ These two sets of {\cal AUTO}-Commands behave similarly.} |
| 11344 |
\label{tbl:HomCont_demos_2} |
| 11345 |
\end{center} |
| 11346 |
\end{table} |
| 11347 |
|
| 11348 |
|
| 11349 |
|
| 11350 |
%============================================================================== |
| 11351 |
%============================================================================== |
| 11352 |
\chapter{ {\cal HomCont} Demo : san.} \label{ch:HomCont_san} |
| 11353 |
%============================================================================== |
| 11354 |
%============================================================================== |
| 11355 |
|
| 11356 |
%============================================================================== |
| 11357 |
%DEMO=san====================================================================== |
| 11358 |
%============================================================================== |
| 11359 |
\section{ Sandstede's Model.} |
| 11360 |
\newcommand{\ti}{\tilde} |
| 11361 |
Consider the system \cite{Sa:95b} |
| 11362 |
\begin{equation} \label{bs1} \begin{array}{rcl} |
| 11363 |
\dot{x} & = & a \, x + b \, y - a \, x^2 + (\ti \mu - \alpha \, z) \, x |
| 11364 |
\, (2-3x) \\ |
| 11365 |
\dot{y} & = & b \, x + a \, y - \frac{3}{2} \, b \, x^2 - |
| 11366 |
\frac{3}{2} \, a \, x \, y - (\ti \mu - \alpha \, z) \, 2 \, y \\ |
| 11367 |
\dot{z} & = & c \, z + \mu \, x + \gamma\, x\, y + \alpha \, |
| 11368 |
\beta \, (x^2 \, (1-x) - y^2) |
| 11369 |
|
| 11370 |
\end{array} \end{equation} |
| 11371 |
as given in the file \filef{san.f90}. |
| 11372 |
Choosing the constants appearing |
| 11373 |
in (\ref{bs1}) appropriately allows for computing inclination and |
| 11374 |
orbit flips as well as non-orientable resonant bifurcations, see |
| 11375 |
\cite{Sa:95b} for details and proofs. The starting point for all |
| 11376 |
calculations is $a=0$, $b=1$ where there exists an explicit solution |
| 11377 |
given by |
| 11378 |
$$ |
| 11379 |
(x(t),y(t),z(t)) = |
| 11380 |
\left( 1 - \left(\frac{1-e^t}{1+e^t}\right)^2 , 4 \, e^t \, |
| 11381 |
\frac{1-e^t}{(1+e^t)^3} , 0 \right). |
| 11382 |
$$ |
| 11383 |
This solution is specified in the routine \funcf{ STPNT}. |
| 11384 |
|
| 11385 |
\section{Inclination Flip.} |
| 11386 |
We start by copying the demo to the current work directory |
| 11387 |
and running the first step |
| 11388 |
\begin{center} |
| 11389 |
\commandf{demo('san')}\\ |
| 11390 |
\commandf{san=load('san',IPS=9,NDIM=3,ISP=0,ILP=0,ITNW=7,JAC=1,NTST=35,IEQUIB=0,DS=0.05)} |
| 11391 |
\commandf{r1=run(san,ICP=[1,8],UZR=\{-1:0.25\})} |
| 11392 |
\end{center} |
| 11393 |
This computation starts from the analytic solution above with |
| 11394 |
$a=0$, $b=1$, $c=-2$, $\alpha=0$, $\beta=1$ and |
| 11395 |
$\gamma = \mu=\ti \mu =0$. The homoclinic solution is followed in the |
| 11396 |
parameters $(a,\ti \mu)$ \parf{=(PAR(1), PAR(8))} up to $a=0.25$. |
| 11397 |
The output is summarised on the screen as |
| 11398 |
\begin{verbatim} |
| 11399 |
BR PT TY LAB PAR(1) L2-NORM PAR(8) |
| 11400 |
1 1 EP 1 0.00000E+00 4.00000E-01 ... 0.00000E+00 |
| 11401 |
1 5 UZ 2 2.50000E-01 4.03054E-01 ... -1.85981E-11 |
| 11402 |
\end{verbatim} |
| 11403 |
and saved in more detail in the \python variable \parf{r1}. |
| 11404 |
|
| 11405 |
Next we want to add a solution to the adjoint equation to the |
| 11406 |
solution obtained at $a=0.25$. This is |
| 11407 |
achieved by starting from the last label, and making the changes |
| 11408 |
\parf{ITWIST = 1}, \parf{NMX = 2} and \parf{ICP(1) = 9}. We also disable any |
| 11409 |
user-defined functions \parf{UZR=\{\}}. The computation so-defined |
| 11410 |
is a single step in a trivial parameter \parf{PAR(9)} (namely a parameter |
| 11411 |
that does not appear in the problem). The effect is to perform a Newton |
| 11412 |
step to enable \AUTO to converge to a solution of the adjoint equation. |
| 11413 |
\begin{center} |
| 11414 |
\commandf{r2=run(r1,ICP=[9,8],ITWIST=1,NMX=2,UZR=\{\})} |
| 11415 |
\end{center} |
| 11416 |
The output is stored in the \python variable \parf{r2}. |
| 11417 |
|
| 11418 |
We can now continue the homoclinic plus |
| 11419 |
adjoint in $(\alpha,\ti \mu)$ \parf{=(PAR(4), PAR(8))} by |
| 11420 |
changing the constants to read |
| 11421 |
\parf{NMX = 50} and \parf{ICP(1) = 4}. |
| 11422 |
We also add \parf{PAR(10)} to the list of continuation parameters |
| 11423 |
\parf{ICP}. Here \parf{PAR(10)} is a dummy parameter used in |
| 11424 |
order to make the continuation of the adjoint well posed. Theoretically, |
| 11425 |
it should be zero if the computation of the adjoint is successful |
| 11426 |
\cite{Sa:95b}. |
| 11427 |
The test functions for detecting resonant bifurcations |
| 11428 |
(\parf{ISPI(1)=1}) and inclination flips (\parf{ISPI(1)=13}) are |
| 11429 |
also activated. Recall that this should be specified in |
| 11430 |
three ways. First we add \parf{PAR(21)} and \parf{PAR(33)} |
| 11431 |
to the list of continuation parameters, second we set up user defined |
| 11432 |
output at zeros of these parameters, and finally we set \parf{IPSI=[1,13]} |
| 11433 |
We also add another user zero for detecting when \parf{PAR(4)=1.0}. |
| 11434 |
Running |
| 11435 |
\begin{center} |
| 11436 |
\commandf{r3=run(r2,ICP=[4,8,10,21,33],IPSI=[1,13],NMX=50,NPR=20,UZR=\{4:1.0,21:0,33:0\})}\\ |
| 11437 |
\commandf{save(r3,'r3')} |
| 11438 |
\end{center} |
| 11439 |
starts from the last, and in this case, only, labelled solution in \parf{r2} |
| 11440 |
and outputs to the screen |
| 11441 |
\begin{verbatim} |
| 11442 |
BR PT TY LAB PAR(4) ... PAR(8) PAR(10) ... PAR(33) |
| 11443 |
1 20 4 7.84722E-01 ... -2.72146E-11 -4.21812E-09 ... 1.44112E+01 |
| 11444 |
1 27 UZ 5 1.00000E+00 ... -3.91152E-11 -4.38659E-09 ... 5.70167E+00 |
| 11445 |
1 35 UZ 6 1.23086E+00 ... -6.18304E-11 -4.62672E-09 ... -9.48584E-06 |
| 11446 |
1 40 7 1.38397E+00 ... -8.41993E-11 -4.63701E-09 ... -1.34882E+00 |
| 11447 |
1 50 EP 8 1.69521E+00 ... -1.36449E-10 -5.35972E-09 ... -5.31105E-01 |
| 11448 |
\end{verbatim} |
| 11449 |
Full output is stored in \filef{b.3}, \filef{s.3} and \filef{d.3}. |
| 11450 |
\begin{figure}[b] |
| 11451 |
\epsfysize 9.0cm |
| 11452 |
\centerline{\epsffile{include/san1}} |
| 11453 |
\caption{Second versus third component of the solution to the adjoint |
| 11454 |
equation at labels 4, 6 and 8} |
| 11455 |
\label{Ftest1} |
| 11456 |
\end{figure} |
| 11457 |
Note that the artificial parameter $\epsilon=$\parf{PAR(10)} is zero within |
| 11458 |
the allowed tolerance. At label \parf{6}, a zero of test function $\psi_{13}$ has |
| 11459 |
been detected which corresponds to an inclination flip with respect to |
| 11460 |
the stable manifold. That the orientation of the homoclinic loop |
| 11461 |
changes as the family passes through this point can be read from |
| 11462 |
the information in \filef{d.3}. |
| 11463 |
However in \filef{d.3}, the line |
| 11464 |
\begin{verbatim} |
| 11465 |
ORIENTABLE ( 0.2982090775E-03) |
| 11466 |
\end{verbatim} |
| 11467 |
at \parf{PT=35} would seems to contradict the |
| 11468 |
detection of the inclination flip at this point. Nonetheless, the |
| 11469 |
important fact is the zero of the test function; and note that |
| 11470 |
the value of the variable indicating the orientation is |
| 11471 |
small compared to its value at the other regular points. |
| 11472 |
Data for the adjoint equation at \parf{LAB= 4, 6} and \parf{8} at |
| 11473 |
and on either side of the inclination flip are presented in |
| 11474 |
Fig.\ \ref{Ftest1}. The switching of the solution between components |
| 11475 |
of the leading unstable left eigenvector is apparent. |
| 11476 |
Finally, we remark that the Newton step in the dummy |
| 11477 |
parameter \parf{PAR(20)} performed above is crucial |
| 11478 |
to obtain convergence. Indeed, if instead we try to continue the |
| 11479 |
homoclinic orbit and the solution of the adjoint equation directly by |
| 11480 |
setting |
| 11481 |
\begin{verbatim} |
| 11482 |
ITWIST = 1 IRS = 2 NMX = 50 ICP(1) = 4 |
| 11483 |
\end{verbatim} |
| 11484 |
and running |
| 11485 |
\begin{center} |
| 11486 |
\commandf{r4=run(r1,ICP=[4,8,10,21,33],ITWIST=1,IPSI=[1,13],NMX=50,UZR=\{33:0\})} |
| 11487 |
\end{center} |
| 11488 |
we obtain a no convergence error. |
| 11489 |
|
| 11490 |
\section{Non-orientable Resonant Eigenvalues.} |
| 11491 |
Inspecting the output saved in the third run, |
| 11492 |
we observe the existence of a non-orientable homoclinic orbit at the |
| 11493 |
second \parf{UZ} label |
| 11494 |
\parf{6}. We restart at this label, with |
| 11495 |
the first continuation parameter being once again $a=$\parf{PAR(1)}, |
| 11496 |
by changing constants according to |
| 11497 |
\begin{verbatim} |
| 11498 |
DS = -0.05 NMX = 20 ICP(1) = 1 |
| 11499 |
\end{verbatim} |
| 11500 |
Running, |
| 11501 |
\begin{center} |
| 11502 |
\commandf{r5=run(r3('UZ2'),ICP=[1,8,10,21,33],NMX=20,DS='-',sv='5')}\\ |
| 11503 |
\end{center} |
| 11504 |
the output at label \parf{9} |
| 11505 |
\begin{verbatim} |
| 11506 |
BR PT TY LAB PAR(1) PAR(8) PAR(10) PAR(21) |
| 11507 |
1 8 UZ 9 -1.30447E-07 ... 3.41490E-12 -1.63406E-09 -2.60894E-07 |
| 11508 |
\end{verbatim} |
| 11509 |
indicates that \AUTO has detected a zero of |
| 11510 |
\parf{PAR(21)}, implying that a non-orientable resonant bifurcation |
| 11511 |
occurred at that point. |
| 11512 |
|
| 11513 |
\section{Orbit Flip.} |
| 11514 |
In this section we compute an orbit flip. To this end we restart |
| 11515 |
from the original explicit solution, without computing the orientation. We |
| 11516 |
begin by separately performing continuation in $(\alpha,\ti \mu)$, |
| 11517 |
$(\beta,\ti \mu)$, $(a,\ti \mu)$, $(b,\ti \mu)$ and $(\mu, \ti \mu)$ |
| 11518 |
in order to reach the parameter values |
| 11519 |
$(a,b,\alpha,\beta, \mu)=(0.5,3,1,0,0.25)$. |
| 11520 |
The sequence of continuations up to the desired parameter values |
| 11521 |
are run via |
| 11522 |
\begin{center} |
| 11523 |
\commandf{r6=run(san,ICP=[4,8],UZR=\{-4:1\})\\ |
| 11524 |
r7=run(r6,ICP=[5,8],UZR=\{-5:0\},DS='-')\\ |
| 11525 |
r8=run(r7,ICP=[1,8],UZR=\{-1:0.5\},DS='-')\\ |
| 11526 |
r9=run(r8,ICP=[2,8],UZR=\{-2:3.0\})\\ |
| 11527 |
r10=run(r9,ICP=[7,8],UZR=\{-7:0.25\})\\} |
| 11528 |
\end{center} |
| 11529 |
with appropriate continuation parameters and user output values |
| 11530 |
set. The desired output is stored in \parf{r10}. |
| 11531 |
|
| 11532 |
The final saved point \parf{LAB=6} contains a homoclinic solution at |
| 11533 |
the desired parameter values. From here we perform continuation in |
| 11534 |
the negative direction of $(\mu,\ti \mu)=$ (\parf{PAR(7),PAR(8)}) with |
| 11535 |
the test function $\psi_{11}$ for orbit flips with respect to the |
| 11536 |
stable manifold activated. |
| 11537 |
\begin{center} |
| 11538 |
\commandf{r11=run(r10,ICP=[7,8,31],IPSI=[11],UZR=\{31:0.0,-7:-0.5\},DS='-')\\ |
| 11539 |
save(r11,'11')} |
| 11540 |
\end{center} |
| 11541 |
The output detects an inclination flip (by a zero of \parf{PAR(31)}) |
| 11542 |
at \parf{PAR(7)=0} |
| 11543 |
\begin{verbatim} |
| 11544 |
BR PT TY LAB PAR(7) ... PAR(8) PAR(31) |
| 11545 |
1 5 UZ 7 6.33545E-06 ... 1.70968E-06 -8.70508E-05 |
| 11546 |
\end{verbatim} |
| 11547 |
at which parameter value the homoclinic orbit is contained in the $(x,y)$-plane |
| 11548 |
(see Fig.\ \ref{Ftest2}). |
| 11549 |
|
| 11550 |
\begin{figure}[t] |
| 11551 |
\epsfysize 9.0cm |
| 11552 |
\centerline{\epsffile{include/san2}} |
| 11553 |
\caption{Orbits on either side of the orbit flip bifurcation. The critical |
| 11554 |
orbit is contained in the $(x,y)$-plane} |
| 11555 |
\label{Ftest2} |
| 11556 |
\end{figure} |
| 11557 |
|
| 11558 |
Finally, we demonstrate that the orbit flip can be continued as |
| 11559 |
three parameters (\parf{PAR(6), PAR(7), PAR(8)}) are varied. |
| 11560 |
\begin{center} |
| 11561 |
\commandf{of = r11('UZ1')\\ |
| 11562 |
r12=run(of,ICP=[7,8,6],IPSI=[],NPR=5,NMX=20,IFIXED=[11],UZR=\{\},DS='-') |
| 11563 |
save(r12,'12')} |
| 11564 |
\end{center} |
| 11565 |
\begin{verbatim} |
| 11566 |
BR PT TY LAB PAR(7) ... PAR(8) PAR(6) |
| 11567 |
1 5 9 -7.38787E-19 ... -2.91178E-10 -3.25000E-01 |
| 11568 |
1 10 10 -5.27166E-19 ... -2.23972E-10 -8.25000E-01 |
| 11569 |
1 15 11 -6.15227E-19 ... -2.91908E-10 -1.32500E+00 |
| 11570 |
1 20 EP 12 -5.96426E-19 ... -3.20088E-10 -1.82500E+00 |
| 11571 |
\end{verbatim} |
| 11572 |
The orbit flip continues to be defined by a planar homoclinic orbit |
| 11573 |
at \parf{PAR(7)=PAR(8)=0}. |
| 11574 |
|
| 11575 |
\section{ Detailed \AUTO-Commands.} |
| 11576 |
|
| 11577 |
\begin{table}[htbp] |
| 11578 |
\begin{center} |
| 11579 |
\begin{tabular}{| l | l |} |
| 11580 |
\hline |
| 11581 |
\AUTO-COMMAND & ACTION \\ |
| 11582 |
\hline |
| 11583 |
%============================================================================== |
| 11584 |
\commandf{mkdir san} & create an empty work directory \\ |
| 11585 |
\commandf{cd san} & change directory \\ |
| 11586 |
\commandf{demo('san')} & copy the demo files to the work directory\\ |
| 11587 |
\commandf{san=load('san',IPS=9,NDIM=3,ISP=0,ILP=0,} & \\ |
| 11588 |
\commandf{ ITNW=7,JAC=1,NTST=35,IEQUIB=0,DS=0.05)} & configure |
| 11589 |
common constants\\ |
| 11590 |
\hline |
| 11591 |
%============================================================================== |
| 11592 |
\commandf{r1=run(san,ICP=[1,8],UZR=\{-1:0.25\})}& continuation in \parf{PAR(1)} \\ |
| 11593 |
\hline |
| 11594 |
%============================================================================== |
| 11595 |
\commandf{r2=run(r1,ICP=[9,8],ITWIST=1,NMX=2,UZR=\{\})} & generate adjoint variables \\ |
| 11596 |
\hline |
| 11597 |
%============================================================================= |
| 11598 |
\commandf{r3=run(r2,ICP=[4,8,10,21,33],IPSI=[1,13],} & \\ |
| 11599 |
\commandf{ NMX=50,NPR=20,UZR=\{4:1.0,21:0,33:0\}) } & continue homoclinic orbit and adjoint\\ |
| 11600 |
\commandf{save(r3,'3') } & save output-files as \filef{b.3, s.3, d.3} \\ |
| 11601 |
\hline |
| 11602 |
%============================================================================== |
| 11603 |
\commandf{r4=run(r1,ICP=[4,8,10,21,33],ITWIST=1,} & \\ |
| 11604 |
\commandf{ IPSI=[1,13],NMX=50,UZR=\{33:0\}) } & no convergence without dummy step \\ |
| 11605 |
\commandf{sv('4') } & save output-files as \filef{b.4, s.4, d.4} \\ |
| 11606 |
\hline |
| 11607 |
%============================================================================= |
| 11608 |
\commandf{r5=run(r3('UZ2'),ICP=[1,8,10,21,33],NMX=20,} & continue non-orientable orbit\\ |
| 11609 |
\commandf{ DS='-',sv='5') }& save output-files as \filef{b.5, s.5, d.5} \\ |
| 11610 |
\hline |
| 11611 |
%============================================================================== |
| 11612 |
\end{tabular} |
| 11613 |
\caption{Detailed \AUTO-Commands for running demo \filef{san}.} |
| 11614 |
\label{tbl:demo_san_1} |
| 11615 |
\end{center} |
| 11616 |
\end{table} |
| 11617 |
|
| 11618 |
|
| 11619 |
\begin{table}[htbp] |
| 11620 |
\begin{center} |
| 11621 |
\begin{tabular}{| l | l |} |
| 11622 |
\hline |
| 11623 |
\AUTO-COMMAND & ACTION \\ |
| 11624 |
\hline |
| 11625 |
%============================================================================== |
| 11626 |
\commandf{r6=run(san,ICP=[4,8],UZR=\{-4:1\})} & restart and homotopy to \parf{PAR(4)}=1.0 \\ |
| 11627 |
\hline |
| 11628 |
%============================================================================== |
| 11629 |
\commandf{r7=run(r6,ICP=[5,8],UZR=\{-5:0\},DS='-')} & homotopy |
| 11630 |
to \parf{PAR(5)}=0.0 \\ |
| 11631 |
\hline |
| 11632 |
%============================================================================== |
| 11633 |
\commandf{r8=run(r7,ICP=[1,8],UZR=\{-1:0.5\},DS='-')} & homotopy to \parf{PAR(1)}=0.5 \\ |
| 11634 |
\hline |
| 11635 |
\commandf{r9=run(r8,ICP=[2,8],UZR=\{-2:3.0\})} & homotopy to \parf{PAR(2)}=3.0\\ |
| 11636 |
\hline |
| 11637 |
%============================================================================== |
| 11638 |
\commandf{r10=run(r9,ICP=[7,8],UZR=\{-7:0.25\})} & homotopy to \parf{PAR(7)}=0.25\\ |
| 11639 |
\hline |
| 11640 |
%============================================================================== |
| 11641 |
\commandf{r11=run(r10,ICP=[7,8,31],IPSI=[11],} & \\ |
| 11642 |
\commandf{ UZR=\{31:0.0,-7:-0.5\},DS='-')} & continue in \parf{PAR(7)} to detect orbit flip \\ |
| 11643 |
\commandf{save(r11,'11') } & save output-files as \filef{b.11, s.11, d.11} \\ |
| 11644 |
\hline |
| 11645 |
%============================================================================== |
| 11646 |
\commandf{of=r11('UZ1')} & select first UZ-labelled point |
| 11647 |
of \parf{r11} to start from\\ |
| 11648 |
\commandf{r12=run(of,ICP=[7,8,6],IPSI=[],NPR=5,} & \\ |
| 11649 |
\commandf{ NMX=20,IFIXED=[11],UZR=\{\},DS='-') } & three-parameter continuation of orbit flip \\ |
| 11650 |
\commandf{save(r12,'12') } & save output-files as \filef{b.12, s.12, d.12} \\ |
| 11651 |
\hline |
| 11652 |
%============================================================================== |
| 11653 |
\end{tabular} |
| 11654 |
\caption{Detailed \AUTO-Commands for running demo \filef{san}.} |
| 11655 |
\label{tbl:demo_san_2} |
| 11656 |
\end{center} |
| 11657 |
\end{table} |
| 11658 |
|
| 11659 |
|
| 11660 |
|
| 11661 |
|
| 11662 |
%============================================================================== |
| 11663 |
%============================================================================== |
| 11664 |
\chapter{ {\cal HomCont} Demo : mtn.} \label{ch:HomCont_mtn} |
| 11665 |
%============================================================================== |
| 11666 |
%============================================================================== |
| 11667 |
|
| 11668 |
%============================================================================== |
| 11669 |
%DEMO=mtn====================================================================== |
| 11670 |
%============================================================================== |
| 11671 |
\section{ A Predator-Prey Model with Immigration.} |
| 11672 |
Consider the following system of two equations \cite{Sc:95} |
| 11673 |
\begin{equation} \label{sn.1} \begin{array}{rcl} |
| 11674 |
\dot{X} & = & RX\left(1-{\ds \frac{X}{K}}\right) - |
| 11675 |
{\ds \frac{A_1XY}{B_1+X}} + D_0K \\ |
| 11676 |
\dot{Y} & = & E_1 {\ds \frac{A_1XY}{B_1+X}} - D_1Y - |
| 11677 |
{\ds\frac{A_2ZY^2}{B_2^2+Y^2}}. |
| 11678 |
\end{array} \end{equation} |
| 11679 |
\begin{figure}[b] |
| 11680 |
\epsfysize 10.0cm |
| 11681 |
\centerline{\epsffile{include/mtn1}} |
| 11682 |
\caption{Parametric portrait of the predator-prey system } |
| 11683 |
\label{SNF.1} |
| 11684 |
\end{figure} |
| 11685 |
The values of all parameters except $(K,Z)$ are set as follows~: |
| 11686 |
$$ |
| 11687 |
R=0.5,\ A_1=0.4,\ B_1=0.6,\ D_0=0.01,\ E_1=0.6,\ A_2=1.0,\ B_2=0.5,\ D_1=0.15. |
| 11688 |
$$ |
| 11689 |
\par |
| 11690 |
\noindent |
| 11691 |
The parametric portrait of the system (\ref{sn.1}) on the |
| 11692 |
$(Z,K)$-plane is presented in Figure \ref{SNF.1}. It contains fold |
| 11693 |
($t_{1,2}$) and Hopf ($H$) bifurcation curves, as well as a homoclinic |
| 11694 |
bifurcation curve $P$. The fold curves meet at a cusp singular point |
| 11695 |
$C$, while the Hopf and the homoclinic curves originate at a |
| 11696 |
Bogdanov-Takens point $BT$. Only the homoclinic curve $P$ will be |
| 11697 |
considered here, the other bifurcation curves can be computed using |
| 11698 |
\AUTO or, |
| 11699 |
for example, {\cal locbif} \cite{KhKuLeNi:93}. |
| 11700 |
|
| 11701 |
\section{Continuation of Central Saddle-Node Homoclinics.} |
| 11702 |
Local bifurcation analysis shows that at $K=6.0,\ Z=0.06729762\ldots$, |
| 11703 |
the system has a saddle-node equilibrium |
| 11704 |
$$ |
| 11705 |
(X^0,Y^0) = (5.738626\ldots,0.5108401\ldots), |
| 11706 |
$$ |
| 11707 |
with one zero and one negative eigenvalue. Direct simulations reveal a |
| 11708 |
homoclinic |
| 11709 |
orbit to this saddle-node, departing and returning along its central |
| 11710 |
direction (i.e., tangent to the null-vector). |
| 11711 |
\par |
| 11712 |
Starting from this solution, stored in the file \filef{mtn.dat}, we |
| 11713 |
continue the saddle-node central homoclinic orbit |
| 11714 |
with respect to the parameters $K$ and $Z$ by copying the |
| 11715 |
demo and running it |
| 11716 |
\begin{center} |
| 11717 |
\commandf{dm('mtn')}\\ |
| 11718 |
\commandf{r1=run('mtn',c='mtn.1',sv='1')} |
| 11719 |
\end{center} |
| 11720 |
The file \filef{mtn.f90} contains approximate |
| 11721 |
parameter values |
| 11722 |
$$ |
| 11723 |
K=\parf{PAR(1)}=6.0,\ Z=\parf{PAR(2)}=0.06729762, |
| 11724 |
$$ |
| 11725 |
as well as the coordinates of the saddle-node |
| 11726 |
$$ |
| 11727 |
X^0=\parf{PAR(12)}=5.738626,\ Y^0=\parf{PAR(13)}=0.5108401, |
| 11728 |
$$ |
| 11729 |
and the length of the truncated time-interval |
| 11730 |
$$ |
| 11731 |
T_0=\parf{PAR(11)} = 1046.178 \: . |
| 11732 |
$$ |
| 11733 |
Since a homoclinic orbit to a saddle-node is being followed, we have also |
| 11734 |
made the choice |
| 11735 |
$$ |
| 11736 |
\parf{IEQUIB = 2} |
| 11737 |
$$ |
| 11738 |
in \filef{c.mtn.1}. The two test-functions, $\psi_{15}$ and $\psi_{16}$, |
| 11739 |
to detect non-central saddle-node homoclinic |
| 11740 |
orbits are also activated, which must be specified in three ways. |
| 11741 |
Firstly, in \filef{c.mtn.1}, \parf{IPSI} is |
| 11742 |
set to \parf{[15,16]} so the active test functions |
| 11743 |
are chosen as 15 and 16. This sets up the monitoring of these |
| 11744 |
test functions. Secondly, in \filef{c.mtn.1} user-defined functions |
| 11745 |
(\parf{UZR}) are set up to look for zeros of the parameters |
| 11746 |
corresponding to these test functions. Recall that the |
| 11747 |
parameters to be zeroed are always the test functions plus 20. |
| 11748 |
Finally, these parameters are included in the list of continuation |
| 11749 |
parameters (\parf{ICP}). |
| 11750 |
|
| 11751 |
Among the output there is a line |
| 11752 |
\begin{verbatim} |
| 11753 |
BR PT TY LAB PAR(1) ... PAR(2) PAR(35) PAR(36) |
| 11754 |
1 26 UZ 4 6.61046E+00 ... 6.93248E-02 5.23950E-09 -6.42344E-02 |
| 11755 |
\end{verbatim} |
| 11756 |
indicating that a zero of the test function \parf{IPSI(1)=15} |
| 11757 |
This means that at |
| 11758 |
$$ |
| 11759 |
D_1=(K^1,Z^1)=(6.6105\ldots, 0.069325\ldots) |
| 11760 |
$$ |
| 11761 |
the homoclinic orbit to the saddle-node becomes {\it non-central}, namely, |
| 11762 |
it returns to the equilibrium along the stable eigenvector, forming a |
| 11763 |
non-smooth loop. The output is saved in \filef{b.1}, \filef{s.1} and |
| 11764 |
\filef{d.1}. |
| 11765 |
Repeating computations in the opposite direction along the curve, |
| 11766 |
\parf{IRS=1, DS=-0.01} in \filef{c.mtn.2}, |
| 11767 |
\begin{center} |
| 11768 |
\commandf{r1=r1+run(r1(1),c='mtn.2',ap='1')} |
| 11769 |
\end{center} |
| 11770 |
one obtains |
| 11771 |
\begin{verbatim} |
| 11772 |
BR PT TY LAB PAR(1) ... PAR(2) PAR(35) PAR(36) |
| 11773 |
1 34 UZ 10 5.18039E+00 ... 6.38554E-02 8.86654E-10 -7.28132E-02 |
| 11774 |
\end{verbatim} |
| 11775 |
which means another non-central saddle-node homoclinic bifurcation occurs |
| 11776 |
at |
| 11777 |
$$ |
| 11778 |
D_2=(K^2,Z^2)=(5.1803\ldots,0.063855\ldots). |
| 11779 |
$$ |
| 11780 |
Note that these data were obtained using a smaller value of \parf{NTST} than |
| 11781 |
the original computation (compare \filef{c.mtn.1} with \filef{c.mtn.2}). The |
| 11782 |
high original value of \parf{NTST} was only necessary for the first few steps |
| 11783 |
because the original solution is specified on a uniform mesh. |
| 11784 |
|
| 11785 |
\section{Switching between Saddle-Node and Saddle Homoclinic Orbits.} |
| 11786 |
Now we can switch to continuation of saddle homoclinic orbits at the |
| 11787 |
located codim 2 points $D_1$ and $D_2$. |
| 11788 |
\begin{center} |
| 11789 |
\commandf{r1=r1+run(r1('UZ1'),c='mtn.3',ap='1')} |
| 11790 |
\end{center} |
| 11791 |
starts from $D_1$. Note that now |
| 11792 |
\begin{center} |
| 11793 |
\parf{IEQUIB = 1} |
| 11794 |
\end{center} |
| 11795 |
has been specified in \filef{c.mtn.3}. Also, test functions $\psi_9$ |
| 11796 |
and $\psi_{10}$ have been activated in order |
| 11797 |
to monitor for non-hyperbolic equilibria along the homoclinic locus. |
| 11798 |
We get the following output |
| 11799 |
\begin{verbatim} |
| 11800 |
BR PT TY LAB PAR(1) ... PAR(2) PAR(29) PAR(30) |
| 11801 |
1 10 12 7.11454E+00 ... 7.08176E-02 -4.64986E-01 3.18355E-03 |
| 11802 |
1 20 13 9.17683E+00 ... 7.67874E-02 -4.68491E-01 1.60931E-02 |
| 11803 |
1 30 14 1.21084E+01 ... 8.54348E-02 -4.71887E-01 3.06966E-02 |
| 11804 |
1 40 EP 15 1.50379E+01 ... 9.42805E-02 -4.74379E-01 4.14457E-02 |
| 11805 |
\end{verbatim} |
| 11806 |
The fact that \parf{PAR(29)} and \parf{PAR(30)} do not change sign indicates |
| 11807 |
that there are no further non-hyperbolic equilibria |
| 11808 |
along this family. Note that restarting in the opposite direction with |
| 11809 |
\parf{IRS=15,DS=-0.02} |
| 11810 |
\begin{center} |
| 11811 |
\commandf{r4=run(r1,c='mtn.4',sv='4')} |
| 11812 |
\end{center} |
| 11813 |
will detect the same codim 2 point $D_1$ but now as a zero |
| 11814 |
of the test-function $\psi_{10}$ |
| 11815 |
\begin{verbatim} |
| 11816 |
BR PT TY LAB PAR(1) ... PAR(2) PAR(29) PAR(30) |
| 11817 |
1 38 UZ 11 6.61046E+00 ... 6.93248E-02 -4.63660E-01 3.13439E-08 |
| 11818 |
\end{verbatim} |
| 11819 |
Note that the values of \parf{PAR(1)} and \parf{PAR(2)} are equal to those |
| 11820 |
at label \parf{4} up to at least six significant figures. |
| 11821 |
|
| 11822 |
Actually, the program runs further and |
| 11823 |
eventually computes the point $D_2$ and the whole lower family of $P$ |
| 11824 |
emanating from it, however, the solutions between $D_1$ and $D_2$ |
| 11825 |
should be considered as spurious\footnote{\label{ft1} The program actually |
| 11826 |
computes the saddle-saddle heteroclinic orbit bifurcating from the |
| 11827 |
non-central saddle-node homoclinic at the point $D_1$, see |
| 11828 |
\citeasnoun[Fig. 2]{ChKuSa:95}, and continues it to the one emanating from |
| 11829 |
$D_2$.}, therefore we do not save these data. |
| 11830 |
The reliable way to compute the lower family of $P$ is to restart computation |
| 11831 |
of saddle homoclinic orbits in the other direction from the point $D_2$ |
| 11832 |
\begin{center} |
| 11833 |
\commandf{r1=r1+run(r1('UZ3'),c='mtn.5',ap='1')} |
| 11834 |
\end{center} |
| 11835 |
This gives the lower family of $P$ approaching the BT point |
| 11836 |
(see Figure \ref{SNF.1}) |
| 11837 |
\begin{verbatim} |
| 11838 |
BR PT TY LAB PAR(1) ... PAR(2) PAR(29) PAR(30) |
| 11839 |
1 10 16 4.96649E+00 ... 6.29843E-02 -4.38247E-01 4.94481E-03 |
| 11840 |
1 20 17 4.92531E+00 ... 7.96087E-02 -3.39922E-01 3.28829E-02 |
| 11841 |
1 30 18 7.09217E+00 ... 1.58708E-01 -1.69289E-01 3.87631E-02 |
| 11842 |
1 40 EP 19 1.10181E+01 ... 2.80980E-01 -3.48294E-02 2.10449E-02 |
| 11843 |
\end{verbatim} |
| 11844 |
The data are appended to the stored results in \filef{b.1}, \filef{s.1} and |
| 11845 |
\filef{d.1}. One could now display all data using the \AUTO |
| 11846 |
command \commandf{@pp 1} to reproduce the curve $P$ shown in Figure |
| 11847 |
\ref{SNF.1}. |
| 11848 |
\par |
| 11849 |
%------------------------------------------------------ |
| 11850 |
\begin{figure}[p] |
| 11851 |
\epsfysize 10.0cm |
| 11852 |
\centerline{\epsffile{include/mtn2}} |
| 11853 |
\caption{Approximation by a large-period cycle} |
| 11854 |
\label{SNF.2} |
| 11855 |
\end{figure} |
| 11856 |
%------------------------------------------------------ |
| 11857 |
%------------------------------------------------------ |
| 11858 |
\begin{figure}[p] |
| 11859 |
\epsfysize 9.0cm |
| 11860 |
\centerline{\epsffile{include/mtn3}} |
| 11861 |
\caption{Projection onto the ($K,D_0$)-plane of the |
| 11862 |
three-parameter curve of non-central saddle-node homoclinic orbit} |
| 11863 |
\label{SNF.3} |
| 11864 |
\end{figure} |
| 11865 |
%------------------------------------------------------ |
| 11866 |
% |
| 11867 |
It is worthwhile to compare the homoclinic curves computed above with |
| 11868 |
a curve $T_0=const$ along which the system has a limit cycle of constant large |
| 11869 |
period $T_0=1046.178$, which can easily be computed using \AUTO or |
| 11870 |
{\cal locbif}. Such a curve is plotted in Figure \ref{SNF.2}. |
| 11871 |
It obviously approximates well the saddle homoclinic loci of $P$, but |
| 11872 |
demonstrates much bigger |
| 11873 |
deviation from the saddle-node homoclinic segment $D_1D_2$. This happens |
| 11874 |
because the period of the limit cycle grows to infinity while approaching both |
| 11875 |
types of homoclinic orbit, but with {\it different asymptotics}: |
| 11876 |
as $-\ln\|\alpha-\alpha^*\|$, in the saddle homoclinic case, and |
| 11877 |
as $\|\alpha-\alpha^*\|^{-1}$ in the saddle-node case. |
| 11878 |
|
| 11879 |
\section{Three-Parameter Continuation.} |
| 11880 |
Finally, we can follow the curve of non-central saddle-node homoclinic |
| 11881 |
orbits in three parameters. The extra continuation parameter is |
| 11882 |
$D_0$=\parf{PAR(3)}. To achieve this we restart at label \parf{4}, |
| 11883 |
corresponding to the codim 2 point $D_1$. We return to continuation of |
| 11884 |
saddle-node homoclinics, \parf{NUNSTAB=0},\parf{IEQUIB=2}, but append the |
| 11885 |
defining equation $\psi_{15}=0$ to the continuation problem |
| 11886 |
(via \parf{IFIXED=[15]}). The new |
| 11887 |
continuation problem is specified in \filef{c.mtn.6}. |
| 11888 |
\begin{center} |
| 11889 |
\commandf{r6=run(r1('UZ1'),c='mtn.6',sv='6')} |
| 11890 |
\end{center} |
| 11891 |
Notice that we set \parf{ILP=1} and choose \parf{PAR(3)} as the first |
| 11892 |
continuation parameter so that \AUTO can detect limit points |
| 11893 |
with respect to this parameter. We also make a user-defined function |
| 11894 |
(\parf{UZR}) |
| 11895 |
to detect intersections with the plane $D_0=0.01$. |
| 11896 |
We get among other output |
| 11897 |
\begin{verbatim} |
| 11898 |
BR PT TY LAB PAR(3) L2-NORM ... PAR(1) PAR(2) |
| 11899 |
1 22 LP 20 1.08120E-02 5.32589E+00 ... 5.67363E+00 6.60818E-02 |
| 11900 |
1 31 UZ 21 1.00000E-02 4.81969E+00 ... 5.18032E+00 6.38551E-02 |
| 11901 |
\end{verbatim} |
| 11902 |
the first line of which represents the $D_0$ value at which |
| 11903 |
the homoclinic curve $P$ has a tangency with the family $t_2$ |
| 11904 |
of fold bifurcations. Beyond this value of $D_0$, |
| 11905 |
$P$ consists entirely of saddle homoclinic orbits. The data at label \parf{20} |
| 11906 |
reproduce the coordinates of the point $D_2$. The results of this |
| 11907 |
computation and a similar one starting from $D_1$ in the opposite direction |
| 11908 |
(with \parf{DS=-0.01}) are displayed in Figure \ref{SNF.3}. |
| 11909 |
% |
| 11910 |
|
| 11911 |
\section{ Detailed \AUTO-Commands.} |
| 11912 |
\begin{table}[htbp] |
| 11913 |
\begin{center} |
| 11914 |
\begin{tabular}{| l | l |} |
| 11915 |
\hline |
| 11916 |
\AUTO-COMMAND & ACTION \\ |
| 11917 |
\hline |
| 11918 |
%============================================================================== |
| 11919 |
\commandf{mkdir mtn} & create an empty work directory \\ |
| 11920 |
\commandf{cd mtn} & change directory \\ |
| 11921 |
\commandf{demo('mtn')} & copy the demo files to the work directory \\ |
| 11922 |
\hline |
| 11923 |
%============================================================================== |
| 11924 |
\commandf{r1=run('mtn',c='mtn.1',sv='1')} & continue saddle-node |
| 11925 |
homoclinic orbit from \filef{mnt.dat}\\ |
| 11926 |
& save output-files as \filef{b.1, s.1, d.1} \\ |
| 11927 |
\hline |
| 11928 |
%============================================================================== |
| 11929 |
\commandf{r1=r1+run(r1(1),c='mtn.2',ap='1')} & continue in opposite |
| 11930 |
direction; restart from label 1 \\ |
| 11931 |
& append output-files to \filef{b.1, s.1, d.1} \\ |
| 11932 |
\hline |
| 11933 |
%============================================================================= |
| 11934 |
\commandf{r1=r1+run(r1('UZ1'),c='mtn.3',ap='1')} & switch to saddle |
| 11935 |
homoclinic orbit ; restart: 1st \parf{UZ} \\ |
| 11936 |
& append output-files to \filef{b.1, s.1, d.1} \\ |
| 11937 |
\hline |
| 11938 |
%============================================================================== |
| 11939 |
\commandf{r4=run(r1,c='mtn.4',sv='4')} & continue in reverse |
| 11940 |
direction; restart from last label \\ |
| 11941 |
& save output-files as \filef{b.4, s.4, d.4} \\ |
| 11942 |
\hline |
| 11943 |
%============================================================================= |
| 11944 |
\commandf{r1=r1+run(r1('UZ3'),c='mtn.5',ap='1')} & other saddle |
| 11945 |
homoclinic orbit family; restart: 3rd \parf{UZ} \\ |
| 11946 |
& append output-files to \filef{b., s.1, d.1} \\ |
| 11947 |
\hline |
| 11948 |
%============================================================================== |
| 11949 |
\commandf{r6=run(r1('UZ1'),c='mtn.6',sv='6')} & 3-parameter non-central saddle-node homoclinic. \\ |
| 11950 |
& save output-files as \filef{b.6, s.6, d.6} \\ |
| 11951 |
\hline |
| 11952 |
%============================================================================== |
| 11953 |
\end{tabular} |
| 11954 |
\caption{Detailed \AUTO-Commands for running demo \filef{mtn}.} |
| 11955 |
\label{tbl:demo_mtn_1} |
| 11956 |
\end{center} |
| 11957 |
\end{table} |
| 11958 |
|
| 11959 |
|
| 11960 |
|
| 11961 |
%============================================================================== |
| 11962 |
%============================================================================== |
| 11963 |
\chapter{ {\cal HomCont} Demo : kpr.} \label{ch:HomCont_kpr} |
| 11964 |
%============================================================================== |
| 11965 |
%============================================================================== |
| 11966 |
|
| 11967 |
%============================================================================== |
| 11968 |
%DEMO=kpr====================================================================== |
| 11969 |
%============================================================================== |
| 11970 |
\section{ Koper's Extended Van der Pol Model.} |
| 11971 |
% |
| 11972 |
The equation-file \filef{kpr.f90} contains the equations |
| 11973 |
\begin{equation} \label{ko} \begin{array}{rcl} |
| 11974 |
\dot{x} & = & \eps_1^{-1}\:(k\: y - x^3 +3\:x - \lambda) \\ |
| 11975 |
\dot{y} & = & x - 2\: y + z \\ |
| 11976 |
\dot{z} & = & \eps_2(y-z), |
| 11977 |
\end{array} \end{equation} |
| 11978 |
with $\eps_1 =0.1$ and $\eps_2=1$ \cite{Ko:95}. |
| 11979 |
|
| 11980 |
To copy across the demo \filef{kpr} and compile we type |
| 11981 |
\begin{center} |
| 11982 |
\commandf{demo('kpr')} \\ |
| 11983 |
\end{center} |
| 11984 |
|
| 11985 |
\section{The Primary Branch of Homoclinics.} |
| 11986 |
First, we locate a homoclinic orbit using |
| 11987 |
the homotopy method. The file \filef{kpr.f90} |
| 11988 |
already contains |
| 11989 |
approximate parameter values for a homoclinic orbit, |
| 11990 |
namely $\lambda=$\parf{PAR(1)=-1.851185}, $k=$\parf{PAR(2)=-0.15}. |
| 11991 |
The file \filef{c.kpr.1} specifies the appropriate |
| 11992 |
constants for continuation in $2T$\parf{=PAR(11)} (also referred |
| 11993 |
to as \parf{PERIOD}) and the dummy parameter $\omega_1$=\parf{PAR(17)} |
| 11994 |
starting |
| 11995 |
from a small solution in the local unstable manifold; |
| 11996 |
\begin{center} |
| 11997 |
\commandf{r1=run('kpr',c='kpr.1',sv='1')} |
| 11998 |
\end{center} |
| 11999 |
Among the output there is the line |
| 12000 |
\begin{verbatim} |
| 12001 |
BR PT TY LAB PERIOD L2-NORM ... PAR(17) ... |
| 12002 |
1 29 UZ 2 1.90018E+01 1.69382E+00 ... 4.46147E-09 ... |
| 12003 |
\end{verbatim} |
| 12004 |
which indicates that a zero of the artificial parameter $\omega_1$ |
| 12005 |
has been located. This means that the right-hand end point of the solution |
| 12006 |
belongs to the plane that is tangent to the stable manifold at the saddle. |
| 12007 |
The output is stored in files \filef{b.1, s.1, d.1}. |
| 12008 |
Upon plotting the data at label \parf{2} (see Figure \ref{kf.1a}) |
| 12009 |
it can be noted that although the right-hand projection boundary |
| 12010 |
condition is satisfied, the solution is still quite away from the |
| 12011 |
equilibrium. |
| 12012 |
|
| 12013 |
The right-hand endpoint can be made to approach the |
| 12014 |
equilibrium by performing a further continuation in $T$ with the |
| 12015 |
right-hand projection condition satisfied (\parf{PAR(17)} fixed) but |
| 12016 |
with $\lambda$ allowed to vary. |
| 12017 |
% |
| 12018 |
\begin{figure}[p] |
| 12019 |
\epsfysize 9.0cm |
| 12020 |
\centerline{\epsffile{include/kpr1}} |
| 12021 |
\caption{Projection on the $(x,y)$-plane of solutions |
| 12022 |
of the boundary value |
| 12023 |
problem with $2T=19.08778$.} |
| 12024 |
\label{kf.1a} |
| 12025 |
\end{figure} |
| 12026 |
\begin{figure}[p] |
| 12027 |
\epsfysize 9.0cm |
| 12028 |
\centerline{\epsffile{include/kpr2}} |
| 12029 |
\caption{Projection on the $(x,y)$-plane of solutions of the |
| 12030 |
boundary value problem with $2T = 60.0$.} |
| 12031 |
\label{kf.1b} |
| 12032 |
\end{figure} |
| 12033 |
% |
| 12034 |
\begin{center} |
| 12035 |
\commandf{r2=run(r1('UZ1'),c='kpr.2',sv='2')} |
| 12036 |
\end{center} |
| 12037 |
the output at label \parf{4}, stored in \filef{s.2}, |
| 12038 |
\begin{verbatim} |
| 12039 |
BR PT TY LAB PERIOD L2-NORM ... PAR(1) ... |
| 12040 |
1 35 UZ 4 6.00000E+01 1.67281E+00 ... -1.85119E+00 ... |
| 12041 |
\end{verbatim} |
| 12042 |
provides a good approximation to a homoclinic solution (see Figure |
| 12043 |
\ref{kf.1b}). |
| 12044 |
|
| 12045 |
The second stage to obtain a starting solution |
| 12046 |
is to add a solution to the modified adjoint |
| 12047 |
variational equation. This is achieved by setting both |
| 12048 |
\parf{ITWIST} and \parf{ISTART} to 1 (in \filef{c.kpr.3}), which generates |
| 12049 |
a trivial guess for the adjoint equations. Because the adjoint |
| 12050 |
equations are linear, only a single |
| 12051 |
Newton step (by continuation in a trivial parameter) |
| 12052 |
is required to provide a solution. |
| 12053 |
Rather than choose a parameter that might be used internally |
| 12054 |
by \AUTO, in \filef{c.kpr.3} we take the continuation parameter |
| 12055 |
to be \parf{PAR(11)}, which is not quite a trivial parameter |
| 12056 |
but whose affect upon the solution is mild. |
| 12057 |
\begin{center} |
| 12058 |
\commandf{r3=run(r2('UZ1'),c='kpr.3',sv='3')} |
| 12059 |
\end{center} |
| 12060 |
The output at the second point (label \parf{6}) |
| 12061 |
contains the converged homoclinic |
| 12062 |
solution (variables (\parf{U(1), U(2), U(3)}) and the adjoint (\parf{ |
| 12063 |
U(4), U(5), U(6)})). We now have a starting solution |
| 12064 |
and are ready to perform two-parameter continuation. |
| 12065 |
|
| 12066 |
The fourth run |
| 12067 |
\begin{center} |
| 12068 |
\commandf{r3=r3+run(r3,c='kpr.4',ap='3')} |
| 12069 |
\end{center} |
| 12070 |
continues the homoclinic orbit in \parf{PAR(1)} and \parf{PAR(2)}. |
| 12071 |
% |
| 12072 |
%------------------------------------------------------ |
| 12073 |
\begin{figure}[p] |
| 12074 |
\epsfysize 9.0cm |
| 12075 |
\centerline{\epsffile{include/kpr4}} |
| 12076 |
\caption{Projection on the $(x,y)$-plane of solutions $\phi(t)$ |
| 12077 |
at \parf{1} ($\lambda=-1.825470, k=-0.1760749$) and |
| 12078 |
\parf{2} ($\lambda=-1.686154, k=-0.3183548$).} |
| 12079 |
\label{kf.2a} |
| 12080 |
\end{figure} |
| 12081 |
%------------------------------------------------------ |
| 12082 |
%------------------------------------------------------ |
| 12083 |
\begin{figure}[p] |
| 12084 |
\epsfysize 8.0cm |
| 12085 |
\centerline{\epsffile{include/kpr5}} |
| 12086 |
\caption{Three-dimensional blow-up of the solution curves |
| 12087 |
$\phi(t)$ |
| 12088 |
at labels \parf{1} (dotted) and \parf{2} (solid line) from Figure 3.8.} |
| 12089 |
\label{kf.2b} |
| 12090 |
\end{figure} |
| 12091 |
%------------------------------------------------------ |
| 12092 |
% |
| 12093 |
Note that several other parameters appear in |
| 12094 |
the output. \parf{PAR(10)} is a dummy parameter |
| 12095 |
that should be zero when the adjoint is being computed correctly; |
| 12096 |
\parf{PAR(29)}, \parf{PAR(30)}, \parf{PAR(33)} correspond to the |
| 12097 |
test functions $\psi_9$,$\psi_{10}$ and $\psi_{13}$. |
| 12098 |
That these test functions were activated is specified |
| 12099 |
in three places in \filef{c.kpr.4} |
| 12100 |
as described in Section~\ref{sec:HomCont_Test_functions}. |
| 12101 |
|
| 12102 |
Note that at the end-point of |
| 12103 |
the family (reached when after \parf{NMX=50} steps) \parf{PAR(29)} is |
| 12104 |
approximately zero which corresponds to a zero of $\psi_9$, a |
| 12105 |
non-central saddle-node homoclinic orbit. We shall return to the computation of |
| 12106 |
this codimension-two point later. Before reaching this point, |
| 12107 |
among the output we find two zeroes of \parf{PAR(33)} |
| 12108 |
(test function $\psi_{13}$) which gives the accurate |
| 12109 |
location of two inclination-flip bifurcations, |
| 12110 |
\begin{verbatim} |
| 12111 |
BR PT TY LAB PAR(1) ... PAR(2) PAR(10) ... PAR(33) |
| 12112 |
1 6 UZ 7 -1.80166E+00 ... -2.00266E-01 -7.25140E-07 ... 1.14077E-04 |
| 12113 |
1 12 UZ 8 -1.56876E+00 ... -4.39547E-01 -2.15617E-07 ... -1.48740E-07 |
| 12114 |
\end{verbatim} |
| 12115 |
That the test function really does have a regular zero at this point can |
| 12116 |
be checked from the data saved in \filef{b.3}, plotting \parf{PAR(33)} as |
| 12117 |
a function of \parf{PAR(1)} or \parf{PAR(2)}. |
| 12118 |
Figure \ref{kf.2a} presents solutions $\phi(t)$ of the modified adjoint |
| 12119 |
variational equation (for details see \citeasnoun{ChKuSa:95}) |
| 12120 |
at parameter values on the homoclinic |
| 12121 |
family before and after the first detected inclination flip. |
| 12122 |
Note that these solutions were obtained by choosing a smaller |
| 12123 |
step \parf{DS} and more output (smaller \parf{NPR}) in |
| 12124 |
\filef{c.kpr.4}. |
| 12125 |
A blow-up of the region close to the origin of this |
| 12126 |
figure is shown in Figure \ref{kf.2b}. |
| 12127 |
It illustrates the flip of the solutions of the adjoint equation while |
| 12128 |
moving through the bifurcation point. Note that the data in this |
| 12129 |
figure were plotted after first performing an additional |
| 12130 |
continuation of the solutions with respect to \parf{PAR(11)}. |
| 12131 |
|
| 12132 |
Continuing in the other direction |
| 12133 |
\begin{center} |
| 12134 |
\commandf{r3=r3+run(r3()[0],c='kpr.5',ap='3')} |
| 12135 |
\end{center} |
| 12136 |
we approach a Bogdanov-Takens point |
| 12137 |
\begin{verbatim} |
| 12138 |
BR PT TY LAB PAR(1) ... PAR(10) ... PAR(33) |
| 12139 |
1 50 EP 10 -1.93828E+00 ... -7.52334E+00 ... -3.19793E+01 |
| 12140 |
\end{verbatim} |
| 12141 |
%------------------------------------------------------ |
| 12142 |
\begin{figure}[t] |
| 12143 |
\epsfysize 9.0cm |
| 12144 |
\centerline{\epsffile{include/kpr6}} |
| 12145 |
\caption{Computed homoclinic orbits approaching the BT point} |
| 12146 |
\label{kp.6} |
| 12147 |
\end{figure} |
| 12148 |
%------------------------------------------------------ |
| 12149 |
Note that the numerical approximation has ceased to become reliable, since |
| 12150 |
\parf{PAR(10)} has now become large. |
| 12151 |
Phase portraits of homoclinic orbits between the BT point and the first |
| 12152 |
inclination flip |
| 12153 |
are depicted in Figure \ref{kp.6}. Note how the computed homoclinic orbits |
| 12154 |
approaching the BT point have their endpoints well away from the equilibrium. |
| 12155 |
To follow the homoclinic orbit to |
| 12156 |
the BT point with more precision, we would need to first perform continuation |
| 12157 |
in $T$ (\parf{PAR(11)}) to obtain a more accurate homoclinic solution. |
| 12158 |
|
| 12159 |
|
| 12160 |
\section{More Accuracy and Saddle-Node Homoclinic Orbits.} |
| 12161 |
Continuation in $T$ |
| 12162 |
in order to obtain an approximation of the homoclinic orbit over a |
| 12163 |
longer interval is necessary for parameter values near a non-hyperbolic |
| 12164 |
equilibrium (either a saddle-node or BT) where the convergence |
| 12165 |
to the equilibrium is slower. |
| 12166 |
First, we start from the original homoclinic orbit computed |
| 12167 |
via the homotopy method, label \parf{4}, which is well away from |
| 12168 |
the non-hyperbolic equilibrium. |
| 12169 |
Also, we shall no longer be interested in |
| 12170 |
in inclination flips so we set \parf{ITWIST=0} in \filef{c.kpr.6}, |
| 12171 |
and in order to compute up to \parf{PAR(11)=1000}, we set up a |
| 12172 |
user-defined function for this. Running \AUTO with \parf{PAR(11)} and |
| 12173 |
\parf{PAR(2)} as free parameters |
| 12174 |
\begin{center} |
| 12175 |
\commandf{r6=run(r2('EP1'),c='kpr.6',sv='6')} |
| 12176 |
\end{center} |
| 12177 |
we obtain among the output |
| 12178 |
\begin{verbatim} |
| 12179 |
BR PT TY LAB PERIOD L2-NORM ... PAR(2) |
| 12180 |
1 35 UZ 6 1.00000E+03 1.66191E+00 ... -1.50000E-01 |
| 12181 |
\end{verbatim} |
| 12182 |
|
| 12183 |
We can now repeat the computation of the family of saddle homoclinic |
| 12184 |
orbits in \parf{PAR(1)} and \parf{PAR(2)} from this point with |
| 12185 |
the test functions $\psi_9$ and $\psi_{10}$ for non-central |
| 12186 |
saddle-node homoclinic orbits activated |
| 12187 |
\begin{center} |
| 12188 |
\commandf{r7=run(r6('UZ1'),c='kpr.7',sv='7')} |
| 12189 |
\end{center} |
| 12190 |
The saddle-node point is now detected at |
| 12191 |
\begin{verbatim} |
| 12192 |
BR PT TY LAB PAR(1) ... PAR(2) PAR(29) PAR(30) |
| 12193 |
1 29 UZ 8 1.76505E-01 ... -2.40533E+00 -1.74004E-06 2.30933E+01 |
| 12194 |
\end{verbatim} |
| 12195 |
which is stored in \filef{s.7}. |
| 12196 |
That \parf{PAR(29)} ($\psi_9$) is zeroed shows that this |
| 12197 |
is a non-central saddle-node connecting the centre manifold to the strong stable |
| 12198 |
manifold. Note that all output beyond this point, although a well-posed |
| 12199 |
solution to the boundary-value problem, is spurious in that it no longer |
| 12200 |
represents a homoclinic orbit to a saddle equilibrium (see |
| 12201 |
\citeasnoun{ChKuSa:95}). If we had chosen |
| 12202 |
to, we could continue in the other direction in order to |
| 12203 |
approach the BT point more accurately by reversing the sign of |
| 12204 |
\parf{DS} in \filef{c.kpr.7}. |
| 12205 |
|
| 12206 |
The file \filef{c.kpr.8} contains the constants necessary |
| 12207 |
for switching to continuation of the central saddle-node homoclinic curve |
| 12208 |
in two parameters starting from the non-central saddle-node homoclinic orbit |
| 12209 |
stored as label \parf{8} in \filef{s.7}. |
| 12210 |
\begin{center} |
| 12211 |
\commandf{r8=run(r7('UZ1'),c='kpr.8',sv='8')} |
| 12212 |
\end{center} |
| 12213 |
In this run we have activated the test functions for saddle to saddle-node |
| 12214 |
transition points along curves of saddle homoclinic orbits ($\psi_{15}$ and |
| 12215 |
$\psi_{16}$). Among the output we find |
| 12216 |
\begin{verbatim} |
| 12217 |
BR PT TY LAB PAR(1) ... PAR(2) PAR(35) PAR(36) |
| 12218 |
1 38 UZ 11 1.76509E-01 ... -2.40533E+00 6.89014E-03 3.09956E-05 |
| 12219 |
\end{verbatim} |
| 12220 |
%------------------------------------------------------ |
| 12221 |
\begin{figure}[p] |
| 12222 |
\epsfysize 9.0cm |
| 12223 |
\centerline{\epsffile{include/kpr7}} |
| 12224 |
\caption{Two non-central saddle-node homoclinic orbits, \parf{1} and \parf{3}; |
| 12225 |
and, \parf{2}, a central saddle-node homoclinic orbit between |
| 12226 |
these two points \label{kf.7}} |
| 12227 |
\end{figure} |
| 12228 |
%------------------------------------------------------ |
| 12229 |
%------------------------------------------------------ |
| 12230 |
\begin{figure}[p] |
| 12231 |
\epsfysize 9.0cm |
| 12232 |
\centerline{\epsffile{include/kpr8}} |
| 12233 |
\caption{The big homoclinic orbit approaching a figure-of-eight} |
| 12234 |
\label{kp.8} |
| 12235 |
\end{figure} |
| 12236 |
%------------------------------------------------------ |
| 12237 |
% |
| 12238 |
which corresponds to the family of homoclinic orbits leaving |
| 12239 |
the locus of saddle-nodes in a second non-central saddle-node |
| 12240 |
homoclinic bifurcation (a zero of $\psi_{16}$). |
| 12241 |
|
| 12242 |
Note that the parameter values do not vary much between the |
| 12243 |
two codimension-two non-central saddle-node points (labels \parf{8} and \parf{11}). |
| 12244 |
However, Figure \ref{kf.7} shows clearly that between the two |
| 12245 |
codimension-two points |
| 12246 |
the homoclinic orbit |
| 12247 |
rotates between the two components of the 1D stable manifold, i.e.\ |
| 12248 |
between the two boundaries of the center-stable manifold of the saddle |
| 12249 |
node. The overall effect of this process is the transformation of a |
| 12250 |
nearby ``small'' saddle homoclinic orbit to a ``big'' saddle |
| 12251 |
homoclinic orbit (i.e.\ with two extra turning points in phase space). |
| 12252 |
|
| 12253 |
Finally, we can switch to continuation of the big saddle homoclinic orbit |
| 12254 |
from the new codim 2 point at label \parf{11}. |
| 12255 |
\begin{center} |
| 12256 |
\commandf{r9=run(r8('UZ1'),c='kpr.9',sv='9')} |
| 12257 |
\end{center} |
| 12258 |
Note that \AUTO takes a large number of steps near the line |
| 12259 |
\parf{PAR(1)=0}, while \parf{PAR(2)} approaches $-2.189\ldots$ |
| 12260 |
(which is why we chose such a large value \parf{NMX=500} in \filef{c.kpr.9}). This |
| 12261 |
particular computation ends at |
| 12262 |
\begin{verbatim} |
| 12263 |
BR PT TY LAB PAR(1) L2-NORM ... PAR(2) |
| 12264 |
1 500 EP 24 2.04263E-05 2.18126E-01 ... -2.18951E+00 |
| 12265 |
\end{verbatim} |
| 12266 |
By plotting phase portraits of orbits approaching this end point (see Figure |
| 12267 |
\ref{kp.8}) we see a ``canard-like'' like transformation of the big homoclinic |
| 12268 |
orbit to a pair of homoclinic orbits in a figure-of-eight configuration. |
| 12269 |
That we get a figure-of-eight is not a surprise because \parf{PAR(1)=0} |
| 12270 |
corresponds to a symmetry in the differential equations \cite{Ko:94}; |
| 12271 |
note also that the equilibrium, stored as (\parf{PAR(12), PAR(13), PAR(14)}) in |
| 12272 |
\filef{d.9}, approaches the origin as we approach the figure-of-eight homoclinic. |
| 12273 |
|
| 12274 |
\section{Three-Parameter Continuation.} |
| 12275 |
We now consider curves in three parameters of each of |
| 12276 |
the codimension-two points encountered in this model, by |
| 12277 |
freeing the parameter $\eps=$ \parf{PAR(3)}. |
| 12278 |
First we continue the first inclination flip stored at label |
| 12279 |
\parf{7} in \filef{s.3} |
| 12280 |
\begin{center} |
| 12281 |
\commandf{r10=run(r3('UZ1'),c='kpr.10',sv='10')} |
| 12282 |
\end{center} |
| 12283 |
Note that \parf{ITWIST=1} in \filef{c.kpr.10}, so that the adjoint is also |
| 12284 |
continued, and there is one fixed condition \parf{IFIXED(1)=13} so that |
| 12285 |
test function $\psi_{13}$ has been frozen. |
| 12286 |
Among the output there is a codimension-three point (zero of $\psi_9$) |
| 12287 |
where the neutrally twisted homoclinic orbit collides with the saddle-node |
| 12288 |
curve |
| 12289 |
\begin{verbatim} |
| 12290 |
BR PT TY LAB PAR(1) ... PAR(2) PAR(3) PAR(29) ... |
| 12291 |
1 18 UZ 11 1.28270E-01 ... -2.51932E+00 5.74477E-01 -2.59151E-06 ... |
| 12292 |
\end{verbatim} |
| 12293 |
The other detected inclination flip (at label \parf{8} in \filef{s.3}) is continued |
| 12294 |
similarly |
| 12295 |
\begin{center} |
| 12296 |
\commandf{r11=run(r3('UZ2'),c='kpr.11',sv='11')} |
| 12297 |
\end{center} |
| 12298 |
giving among its output another codim 3 saddle-node inclination-flip point |
| 12299 |
\begin{verbatim} |
| 12300 |
BR PT TY LAB PAR(1) ... PAR(2) PAR(3) PAR(29) ... |
| 12301 |
1 27 UZ 11 1.53542E-01 ... -2.45810E+00 1.17171E+00 -1.13312E-06 ... |
| 12302 |
\end{verbatim} |
| 12303 |
Output beyond both of these codim 3 points is spurious and both computations end in |
| 12304 |
an \parf{MX} point (no convergence). |
| 12305 |
|
| 12306 |
To continue the non-central saddle-node homoclinic orbits it is |
| 12307 |
necessary to work on the data without the solution $\phi(t)$. We |
| 12308 |
restart from the data saved at \parf{LAB=8} and \parf{LAB=11} in |
| 12309 |
\filef{s.7} and \filef{s.8} respectively. We could continue these codim 2 points in two |
| 12310 |
ways, either by appending the defining condition $\psi_{16} =0$ to |
| 12311 |
the continuation of saddle-node homoclinic orbits (with \parf{IEQUIB=2}, |
| 12312 |
etc.), or by appending $\psi_{9} =0$ to the continuation |
| 12313 |
of a saddle homoclinic orbit (with \parf{IEQUIB=1}). |
| 12314 |
The first approach is used in the example \filef{mtn}, |
| 12315 |
for contrast we shall adopt the second approach here. |
| 12316 |
%------------------------------------------------------ |
| 12317 |
\begin{figure}[p] |
| 12318 |
\epsfysize 9.0cm |
| 12319 |
\centerline{\epsffile{include/kpr10}} |
| 12320 |
\caption{Projection onto the \parf{(PAR(3),PAR(2))}-plane of the non-central |
| 12321 |
saddle-node homoclinic orbit curves (labeled \parf{1} and \parf{2}) and the |
| 12322 |
inclination-flip curves (labeled \parf{3} and \parf{4})}. |
| 12323 |
\label{kp.10} |
| 12324 |
\end{figure} |
| 12325 |
%------------------------------------------------------ |
| 12326 |
% |
| 12327 |
\begin{center} |
| 12328 |
\commandf{r12=run(r7('UZ1'),c='kpr.12',sv='12')}\\ |
| 12329 |
\commandf{r12=r12+run(r8('UZ1'),c='kpr.13',ap='12')} |
| 12330 |
\end{center} |
| 12331 |
The projection onto the $(\eps,k)$-plane of all four of these |
| 12332 |
codimension-two curves is given in Figure \ref{kp.10}. |
| 12333 |
The intersection of the inclination-flip lines with one of the |
| 12334 |
non-central saddle-node homoclinic lines is apparent. Note that the two |
| 12335 |
non-central saddle-node homoclinic orbit curves are almost overlaid, but |
| 12336 |
that as in Figure \ref{kf.7} the orbits look quite distinct in phase space. |
| 12337 |
|
| 12338 |
\section{ Detailed \AUTO-Commands.} |
| 12339 |
\begin{table}[htbp] |
| 12340 |
\begin{center} |
| 12341 |
\begin{tabular}{| l | l |} |
| 12342 |
\hline |
| 12343 |
\AUTO-COMMAND & ACTION \\ |
| 12344 |
\hline |
| 12345 |
%============================================================================== |
| 12346 |
\commandf{mkdir kpr} & create an empty work directory \\ |
| 12347 |
\commandf{cd kpr} & change directory \\ |
| 12348 |
\commandf{demo('kpr')} & copy the demo files to the work directory \\ |
| 12349 |
\hline |
| 12350 |
%============================================================================== |
| 12351 |
\commandf{r1=run('kpr',c='kpr.1',sv='1')} & continuation in the time-length parameter \parf{PAR(11)} \\ |
| 12352 |
& save output-files as \filef{b.1, s.1, d.1} \\ |
| 12353 |
\hline |
| 12354 |
%============================================================================== |
| 12355 |
\commandf{r2=run(r1('UZ1'),c='kpr.2',sv='2')} & locate the homoclinic orbit \\ |
| 12356 |
& save output-files as \filef{b.2, s.2, d.2} \\ |
| 12357 |
\hline |
| 12358 |
%============================================================================= |
| 12359 |
\commandf{r3=run(r2('UZ1'),c='kpr.3',sv='3')} & generate adjoint variables\\ |
| 12360 |
& save output-files as \filef{b.3, s.3, d.3} \\ |
| 12361 |
\hline |
| 12362 |
%============================================================================== |
| 12363 |
\commandf{r3=r3+run(r3,c='kpr.4',ap='3')} & continue the homoclinic orbit \\ |
| 12364 |
& append output-files to \filef{b.3, s.3, d.3} \\ |
| 12365 |
\hline |
| 12366 |
%============================================================================= |
| 12367 |
\commandf{r3=r3+run(r3()[0],c='kpr.5',ap='3')} & continue in reverse direction\\ |
| 12368 |
& append output-files to \filef{b.3, s.3, d.3} \\ |
| 12369 |
\hline |
| 12370 |
%============================================================================== |
| 12371 |
\commandf{r6=run(r2('EP1'),c='kpr.6',sv='6')} & increase the period \\ |
| 12372 |
& save output-files as \filef{b.6, s.6, d.6} \\ |
| 12373 |
\hline |
| 12374 |
%============================================================================== |
| 12375 |
\end{tabular} |
| 12376 |
\caption{Detailed \AUTO-Commands for running demo \filef{kpr}.} |
| 12377 |
\label{tbl:demo_kpr_1} |
| 12378 |
\end{center} |
| 12379 |
\end{table} |
| 12380 |
|
| 12381 |
|
| 12382 |
\begin{table}[htbp] |
| 12383 |
\begin{center} |
| 12384 |
\begin{tabular}{| l | l |} |
| 12385 |
\hline |
| 12386 |
\AUTO-COMMAND & ACTION \\ |
| 12387 |
\hline |
| 12388 |
%============================================================================== |
| 12389 |
\commandf{r7=run(r6('UZ1'),c='kpr.7',sv='7')} & recompute the family |
| 12390 |
of homoclinic orbits \\ |
| 12391 |
\commandf{sv('7')} & save output-files as \filef{b.7, s.7, d.7} \\ |
| 12392 |
\hline |
| 12393 |
%============================================================================== |
| 12394 |
\commandf{r8=run(r7('UZ1'),c='kpr.8',sv='8')} & continue central |
| 12395 |
saddle-node homoclinics \\ |
| 12396 |
& save output-files as \filef{b.8, s.8, d.8} \\ |
| 12397 |
\hline |
| 12398 |
%============================================================================== |
| 12399 |
\commandf{r9=run(r8('UZ1'),c='kpr.9',sv='9')} & continue homoclinics |
| 12400 |
from codim-2 point \\ |
| 12401 |
& save output-files as \filef{b.9, s.9, d.9} \\ |
| 12402 |
\hline |
| 12403 |
%============================================================================== |
| 12404 |
\commandf{r10=run(r3('UZ1'),c='kpr.10',} & 3-parameter curve of inclination-flips\\ |
| 12405 |
\commandf{ sv='10')} & save output-files as \filef{b.10, s.10, d.10} \\ |
| 12406 |
\hline |
| 12407 |
%============================================================================== |
| 12408 |
\commandf{r11=run(r3('UZ2'),c='kpr.11',} & another curve of inclination-flips \\ |
| 12409 |
\commandf{ sv='11')} & save output-files as \filef{b.11, s.11, d.11} \\ |
| 12410 |
\hline |
| 12411 |
%============================================================================== |
| 12412 |
\commandf{r12=run(r7('UZ1'),c='kpr.12',} & continue non-central saddle-node homoclinics\\ |
| 12413 |
\commandf{ sv='12')} & save output-files as \filef{b.12, s.12, d.12} \\ |
| 12414 |
\hline |
| 12415 |
%============================================================================== |
| 12416 |
\commandf{r12=r12+run(r8('UZ1'),c='kpr.13',} & continue non-central saddle-node homoclinics\\ |
| 12417 |
\commandf{ ap='12')} & append output-files to \filef{b.12, s.12, d.12} \\ |
| 12418 |
\hline |
| 12419 |
%============================================================================== |
| 12420 |
\end{tabular} |
| 12421 |
\caption{Detailed \AUTO-Commands for running demo \filef{kpr}.} |
| 12422 |
\label{tbl:demo_kpr_2} |
| 12423 |
\end{center} |
| 12424 |
\end{table} |
| 12425 |
|
| 12426 |
|
| 12427 |
%============================================================================== |
| 12428 |
%============================================================================== |
| 12429 |
\chapter{ {\cal HomCont} Demo : cir.} \label{ch:HomCont_cir} |
| 12430 |
%============================================================================== |
| 12431 |
%============================================================================== |
| 12432 |
|
| 12433 |
%============================================================================== |
| 12434 |
%DEMO=cir====================================================================== |
| 12435 |
%============================================================================== |
| 12436 |
\section{ Electronic Circuit of Freire \textit{et al}.} |
| 12437 |
Consider the following model of a three-variable electronic circuit |
| 12438 |
\cite{FrRLuGaPo:93} |
| 12439 |
\begin{equation} |
| 12440 |
\left \{ |
| 12441 |
\begin{array}{rcl} |
| 12442 |
\dot{x} & = & \left [-(\beta+\nu) x + \beta y -a_3 x^3 |
| 12443 |
+b_3(y-x)^3\right ]/r, \\ |
| 12444 |
\dot{y} & = & \beta x -(\beta+\gamma)y -z -b_3(y-x)^3, \\ |
| 12445 |
\dot{z} & = & y. |
| 12446 |
\end{array} |
| 12447 |
\right. |
| 12448 |
\label{5.fr1} |
| 12449 |
\end{equation} |
| 12450 |
These autonomous equations are also considered in the \AUTO demo \filef{tor}. |
| 12451 |
|
| 12452 |
First, we copy the demo into a new directory and compile |
| 12453 |
\begin{center} |
| 12454 |
\commandf{dm('cir')} \\ |
| 12455 |
\end{center} |
| 12456 |
The system is contained in |
| 12457 |
the equation-file \filef{cir.f90} and the initial run-time constants |
| 12458 |
are stored in \filef{c.cir.1}. We begin by starting from |
| 12459 |
the data from \filef{cir.dat} for a saddle-focus homoclinic orbit |
| 12460 |
at |
| 12461 |
$\nu=-0.721309$, $\beta=0.6$, $\gamma=0$, $r=0.6$, $A_3=0.328578$ |
| 12462 |
and $B_3=0.933578$, which was obtained by shooting over |
| 12463 |
the time interval $2T=$\parf{PAR(11)}$=36.13$. |
| 12464 |
We wish to follow the family in the $(\beta,\nu)$-plane, but |
| 12465 |
first we perform continuation in $(T,\nu)$ to obtain a better |
| 12466 |
approximation to a homoclinic orbit. |
| 12467 |
\begin{center} |
| 12468 |
\commandf{r1=run('cir',c='cir.1')} |
| 12469 |
\end{center} |
| 12470 |
yields the output |
| 12471 |
\begin{verbatim} |
| 12472 |
BR PT TY LAB PERIOD L2-NORM ... PAR(1) |
| 12473 |
1 21 UZ 2 1.000000E+02 1.286637E-01 ... -7.213093E-01 |
| 12474 |
1 42 UZ 3 2.000000E+02 9.097899E-02 ... -7.213093E-01 |
| 12475 |
1 50 EP 4 2.400000E+02 8.305208E-02 ... -7.213093E-01 |
| 12476 |
\end{verbatim} |
| 12477 |
Note that $\nu=$\parf{PAR(1)} remains constant during the continuation |
| 12478 |
as the parameter values do not change, only the length of |
| 12479 |
the interval over which the approximate homoclinic solution is computed. |
| 12480 |
Note from the eigenvalues, stored in \filef{d.1} that this is a homoclinic |
| 12481 |
orbit to a saddle-focus with a one-dimensional unstable manifold. |
| 12482 |
|
| 12483 |
We now restart at \parf{LAB=3}, corresponding to a time interval $2T=200$, |
| 12484 |
and change the principal continuation parameters to be $(\nu,\beta)$. |
| 12485 |
The new constants defining the continuation are given in \filef{c.cir.2}. |
| 12486 |
We also activate the test functions pertinent to codimension-two |
| 12487 |
singularities which may be encountered along a family of saddle-focus |
| 12488 |
homoclinic orbits, viz.\ $\psi_2$, $\psi_4$, $\psi_5$, $\psi_9$ and $\psi_{10}$. |
| 12489 |
This must be specified in three ways: by appropriate |
| 12490 |
\parf{IPSI} in \filef{c.cir.2}, by adding the corresponding parameter labels |
| 12491 |
to the list of continuation parameters \parf{ICP(I)} in \filef{c.cir.2} |
| 12492 |
(recall that these parameter indices are 20 more than the corresponding |
| 12493 |
$\psi$ indices), and finally adding UZR functions defining zeros of |
| 12494 |
these parameters in \filef{c.cir.2}. Running |
| 12495 |
\begin{center} |
| 12496 |
\commandf{r2=run(r1('UZ2'),c='cir.2',sv='2')} |
| 12497 |
\end{center} |
| 12498 |
results in |
| 12499 |
\begin{verbatim} |
| 12500 |
BR PT TY LAB PAR(1) ... PAR(2) ... PAR(25) PAR(29) |
| 12501 |
1 17 UZ 5 -7.256925E-01 ... 4.535645E-01 ... -1.765251E-05 -2.888436E-01 |
| 12502 |
1 75 UZ 6 -1.014704E+00 ... 9.998966E-03 ... 1.664509E+00 -5.035997E-03 |
| 12503 |
1 78 UZ 7 -1.026445E+00 ... -2.330391E-05 ... 1.710804E+00 1.165176E-05 |
| 12504 |
1 81 UZ 8 -1.038012E+00 ... -1.000144E-02 ... 1.756690E+00 4.964621E-03 |
| 12505 |
1 100 EP 9 -1.164160E+00 ... -1.087732E-01 ... 2.230329E+00 5.042736E-02 |
| 12506 |
\end{verbatim} |
| 12507 |
with results saved in \filef{b.2, s.2, d.2}. |
| 12508 |
%------------------------------------------------------ |
| 12509 |
\begin{figure}[p] |
| 12510 |
\epsfysize 9.0cm |
| 12511 |
\centerline{\epsffile{include/cir1}} |
| 12512 |
\caption{Solutions of the boundary value problem at labels 6 and 8, |
| 12513 |
either side of the Shil'nikov-Hopf bifurcation} |
| 12514 |
\label{Fcircuit1} |
| 12515 |
\end{figure} |
| 12516 |
%------------------------------------------------------ |
| 12517 |
%------------------------------------------------------ |
| 12518 |
\begin{figure}[p] |
| 12519 |
\epsfysize 9.0cm |
| 12520 |
\centerline{\epsffile{include/cir2}} |
| 12521 |
\caption{Phase portraits of three homoclinic orbits |
| 12522 |
on the family, showing the saddle-focus to saddle transition} |
| 12523 |
\label{Fcircuit2} |
| 12524 |
\end{figure} |
| 12525 |
%------------------------------------------------------ |
| 12526 |
Upon inspection of the output, note that label 5, where \parf{PAR(25)}$\approx 0$, |
| 12527 |
corresponds to a neutrally-divergent saddle-focus, $\psi_5=0$. |
| 12528 |
Label 7, where \parf{PAR(29)}$\approx 0$ corresponds to a local bifurcation, $\psi_9=0$, |
| 12529 |
which we note from the eigenvalues stored in \filef{d.2} corresponds to a \emp{ |
| 12530 |
Shil'nikov-Hopf} bifurcation. Note that \parf{PAR(2)} is also approximately zero |
| 12531 |
at label 7, which accords with the analytical observation that the origin of |
| 12532 |
(\ref{5.fr1}) undergoes a Hopf bifurcation when $\beta=0$. |
| 12533 |
Labels 6 and 8 are the user-defined output |
| 12534 |
points, the solutions at which are plotted in Fig.\ \ref{Fcircuit1}. |
| 12535 |
Note that solutions beyond label 7 (e.g., the plotted solution |
| 12536 |
at label 8) do not correspond to homoclinic orbits, but to |
| 12537 |
\emp{ point-to-cycle} heteroclinic orbits (c.f.\ Section~2.2.1 of |
| 12538 |
\citeasnoun{ChKuSa:95}). |
| 12539 |
|
| 12540 |
We now continue in the other direction along the family. It turns out |
| 12541 |
that starting from the initial point in the other direction results in |
| 12542 |
missing a codim 2 point which is close to the starting point. Instead we |
| 12543 |
start from the first saved point from the previous computation |
| 12544 |
(label 5 in \filef{s.2}): |
| 12545 |
\begin{center} |
| 12546 |
\commandf{r3=run(r2('UZ1'),c='cir.3',ap='2')} |
| 12547 |
\end{center} |
| 12548 |
The output |
| 12549 |
\begin{verbatim} |
| 12550 |
BR PT TY LAB PAR(1) ... PAR(2) PAR(22) PAR(24) |
| 12551 |
1 9 UZ 10 -7.204001E-01 ... 5.912315E-01 -1.725669E+00 -3.295862E-05 |
| 12552 |
1 18 UZ 11 -7.590583E-01 ... 7.428734E-01 3.432139E-05 -2.822988E-01 |
| 12553 |
1 26 UZ 12 -7.746686E-01 ... 7.746147E-01 5.833163E-01 1.637611E-07 |
| 12554 |
1 28 EP 13 -7.746628E-01 ... 7.746453E-01 5.908902E-01 1.426214E-04 |
| 12555 |
\end{verbatim} |
| 12556 |
contains a neutral saddle-focus (a \emp{ Belyakov} transition) |
| 12557 |
at \parf{LAB=10} ($\psi_4=0$), a double real leading eigenvalue |
| 12558 |
(saddle-focus to saddle transition) at \parf{LAB =11} ($\psi_2=0$) |
| 12559 |
and a neutral saddle at \parf{LAB=12} ($\psi_4=0$). Data at several |
| 12560 |
points on the complete family are plotted in Fig.\ \ref{Fcircuit2}. |
| 12561 |
If we had continued further (by increasing \parf{NMX}), |
| 12562 |
the computation would end at a no convergence error \parf{TY=MX} owing |
| 12563 |
to the homoclinic family approaching a Bogdanov-Takens singularity |
| 12564 |
at small amplitude. To compute further towards the BT point |
| 12565 |
we would first need to continue to a higher value of \parf{PAR(11)}. |
| 12566 |
|
| 12567 |
\section{ Detailed \AUTO-Commands.} |
| 12568 |
\begin{table}[htbp] |
| 12569 |
\begin{center} |
| 12570 |
\begin{tabular}{| l | l |} |
| 12571 |
\hline |
| 12572 |
\AUTO-COMMAND & ACTION \\ |
| 12573 |
\hline |
| 12574 |
%============================================================================== |
| 12575 |
\commandf{mkdir cir} & create an empty work directory \\ |
| 12576 |
\commandf{cd cir} & change directory \\ |
| 12577 |
\commandf{demo('cir')} & copy the demo files to the work directory \\ |
| 12578 |
\hline |
| 12579 |
%============================================================================== |
| 12580 |
\commandf{r1=run(c='cir.1',sv='1')} & increase the truncation interval; restart from \filef{cir.dat}\\ |
| 12581 |
& save output-files as \filef{b.1, s.1, d.1} \\ |
| 12582 |
\hline |
| 12583 |
%============================================================================== |
| 12584 |
\commandf{r2=run(r1('UZ2'),c='cir.2',sv='2')} & continue saddle-focus |
| 12585 |
homoclinic orbit; restart from \parf{r1} \\ |
| 12586 |
& save output-files as \filef{b.2, s.2, d.2} \\ |
| 12587 |
\hline |
| 12588 |
%============================================================================= |
| 12589 |
\commandf{r3=run(r2('UZ1'),c='cir.3',ap='2')} & generate adjoint variables ; restart from \parf{r2} \\ |
| 12590 |
& append output-files as \filef{b.2, s.2, d.2} \\ |
| 12591 |
\hline |
| 12592 |
%============================================================================== |
| 12593 |
\end{tabular} |
| 12594 |
\caption{Detailed \AUTO-Commands for running demo \filef{cir}.} |
| 12595 |
\label{tbl:demo_cir_1} |
| 12596 |
\end{center} |
| 12597 |
\end{table} |
| 12598 |
|
| 12599 |
|
| 12600 |
|
| 12601 |
%============================================================================== |
| 12602 |
%============================================================================== |
| 12603 |
\chapter{ {\cal HomCont} Demo : she.} \label{ch:HomCont_she} |
| 12604 |
%============================================================================== |
| 12605 |
%============================================================================== |
| 12606 |
|
| 12607 |
%============================================================================== |
| 12608 |
%DEMO=she====================================================================== |
| 12609 |
%============================================================================== |
| 12610 |
\section{ A Heteroclinic Example.} |
| 12611 |
The following system of five equations \citeasnoun{RuMa:95} |
| 12612 |
\begin{equation} \label{sh1} \begin{array}{rcl} |
| 12613 |
\dot{x} & = & \mu \, x + x\, y - z\, u, \\ |
| 12614 |
\dot{y} & = & -y - x^2, \\ |
| 12615 |
\dot{z} & = & \mu\, z + x\, u - 9\sigma\, z / 4(1+\sigma) \\ |
| 12616 |
\dot{u} & = & - \sigma u / 4 - \sigma Q v / 4\pi^2 |
| 12617 |
+ 3(1 + \sigma) x z / 4\sigma \\ |
| 12618 |
\dot{v} & = & \zeta u / 4 - \zeta v / 4 |
| 12619 |
\end{array} |
| 12620 |
\end{equation} |
| 12621 |
has been used to describe shearing instabilities in fluid convection. |
| 12622 |
The equations possess a rich structure of local and global bifurcations. |
| 12623 |
Here we shall reproduce a single curve in the $(\sigma,\mu)$-plane |
| 12624 |
of codimension-one heteroclinic orbits connecting a non-trivial |
| 12625 |
equilibrium to the origin for $Q=0$ and $\zeta=4$. The defining |
| 12626 |
problem is contained in equation-file |
| 12627 |
\filef{she.f90}\footnote{The last parameter used to store the equilibria (\parf{PAR(21)}) is |
| 12628 |
overlaped here with the first test-function. In this example, it is harmless since the test functions are |
| 12629 |
irrelevant for heteroclinic continuation.}, and starting data for the orbit at |
| 12630 |
$(\sigma,\mu)=(0.5,0.163875)$ are stored in \filef{she.dat}, |
| 12631 |
with a truncation interval of \parf{PAR(11)=85.07}. |
| 12632 |
|
| 12633 |
We begin by computing towards $\mu=0$ with the option \parf{IEQUIB=-2} |
| 12634 |
which means that both equilibria are solved for as part of |
| 12635 |
the continuation process. |
| 12636 |
\begin{center} |
| 12637 |
\commandf{demo('she')} \\ |
| 12638 |
\commandf{r1=run('she',c='she.1',sv='1')} |
| 12639 |
\end{center} |
| 12640 |
This yields the output |
| 12641 |
\begin{verbatim} |
| 12642 |
BR PT TY LAB PAR(3) L2-NORM ... PAR(1) |
| 12643 |
1 1 EP 1 5.00000E-01 4.05950E-01 ... 1.63875E-01 |
| 12644 |
1 5 2 4.52847E-01 3.72688E-01 ... 1.36505E-01 |
| 12645 |
1 10 3 3.94351E-01 3.30390E-01 ... 1.04419E-01 |
| 12646 |
1 15 4 3.35908E-01 2.87331E-01 ... 7.51623E-02 |
| 12647 |
1 20 5 2.77287E-01 2.43351E-01 ... 4.95320E-02 |
| 12648 |
1 25 6 2.18210E-01 1.98147E-01 ... 2.84629E-02 |
| 12649 |
1 30 EP 7 1.58178E-01 1.51246E-01 ... 1.29327E-02 |
| 12650 |
\end{verbatim} |
| 12651 |
Alternatively, for this problem there exists an analytic expression for |
| 12652 |
the two equilibria. This is specified in the subroutine \funcf{PVLS} of |
| 12653 |
\filef{she.f90}. Re-running with \parf{IEQUIB=-1} |
| 12654 |
\begin{center} |
| 12655 |
\commandf{r2=run('she',c='she.2')} |
| 12656 |
\end{center} |
| 12657 |
we obtain the output |
| 12658 |
\begin{verbatim} |
| 12659 |
1 1 EP 1 5.00000E-01 4.05950E-01 ... 1.63875E-01 |
| 12660 |
1 5 2 4.43202E-01 3.65772E-01 ... 1.31056E-01 |
| 12661 |
1 10 3 3.72309E-01 3.14244E-01 ... 9.30098E-02 |
| 12662 |
1 15 4 3.00884E-01 2.61156E-01 ... 5.93397E-02 |
| 12663 |
1 20 5 2.28665E-01 2.06219E-01 ... 3.17994E-02 |
| 12664 |
1 25 6 1.55541E-01 1.49165E-01 ... 1.23990E-02 |
| 12665 |
1 30 EP 7 8.10746E-02 9.14311E-02 ... 2.38662E-03 |
| 12666 |
\end{verbatim} |
| 12667 |
This output is similar to that above, but note that it is obtained slightly |
| 12668 |
more efficiently because the extra parameters \parf{PAR(12-21)} representing the |
| 12669 |
coordinates of the equilibria are no longer |
| 12670 |
part of the continuation problem. Also note that \AUTO has chosen to take |
| 12671 |
slightly larger steps along the family. Finally, we can continue in the opposite |
| 12672 |
direction along the family from the original starting point (again with \parf{IEQUIB=-1}). |
| 12673 |
\begin{center} |
| 12674 |
\commandf{r3=run(r2(2),c='she.3')}\\ |
| 12675 |
\commandf{save(r2+r3,'2')} |
| 12676 |
\end{center} |
| 12677 |
% |
| 12678 |
%------------------------------------------------------ |
| 12679 |
\begin{figure}[b] |
| 12680 |
\epsfysize 9.0cm |
| 12681 |
\centerline{\epsffile{include/she1}} |
| 12682 |
\caption{Projections into $(x,y,z)$-space of the family of heteroclinic |
| 12683 |
orbits.} |
| 12684 |
\label{Fshear} |
| 12685 |
\end{figure} |
| 12686 |
%------------------------------------------------------ |
| 12687 |
% |
| 12688 |
\begin{verbatim} |
| 12689 |
BR PT TY LAB PAR(3) L2-NORM ... PAR(1) |
| 12690 |
1 5 8 4.99759E-01 4.06015E-01 ... 1.63732E-01 |
| 12691 |
1 10 9 5.70530E-01 4.55187E-01 ... 2.06526E-01 |
| 12692 |
1 15 10 6.41644E-01 5.03184E-01 ... 2.50783E-01 |
| 12693 |
1 20 11 7.13330E-01 5.50067E-01 ... 2.95934E-01 |
| 12694 |
1 25 12 7.85769E-01 5.95871E-01 ... 3.41549E-01 |
| 12695 |
1 30 13 8.59097E-01 6.40618E-01 ... 3.87300E-01 |
| 12696 |
1 35 EP 14 9.33416E-01 6.84317E-01 ... 4.32927E-01 |
| 12697 |
\end{verbatim} |
| 12698 |
The results of both computations are presented in Figure \ref{Fshear}, |
| 12699 |
from which we see that the orbit shrinks to zero as |
| 12700 |
\parf{PAR(1)=}$\mu \to 0$. |
| 12701 |
|
| 12702 |
\section{ Detailed \AUTO-Commands.} |
| 12703 |
\begin{table}[htbp] |
| 12704 |
\begin{center} |
| 12705 |
\begin{tabular}{| l | l |} |
| 12706 |
\hline |
| 12707 |
\AUTO-COMMAND & ACTION \\ |
| 12708 |
\hline |
| 12709 |
%============================================================================== |
| 12710 |
\commandf{mkdir she} & create an empty work directory \\ |
| 12711 |
\commandf{cd she} & change directory \\ |
| 12712 |
\commandf{demo('she')} & copy the demo files to the work directory \\ |
| 12713 |
\hline |
| 12714 |
%============================================================================== |
| 12715 |
\commandf{r1=run('she',c='she.1',sv='1')} & continue heteroclinic orbit; start from \filef{she.dat}\\ |
| 12716 |
& save output-files as \filef{b.1, s.1, d.1} \\ |
| 12717 |
\hline |
| 12718 |
%============================================================================== |
| 12719 |
\commandf{r2=run('she',c='she.2')} & repeat with \parf{IEQUIB=-1} \\ |
| 12720 |
\hline |
| 12721 |
%============================================================================= |
| 12722 |
\commandf{r3=run(r2(2),c='she.3')} & continue in reverse direction ;\\ |
| 12723 |
& restart from label 2 of \parf{r2} \\ |
| 12724 |
\commandf{save(r2+r3,'2')} & Save appended results to \filef{b.2, s.2, d.2}\\ |
| 12725 |
\hline |
| 12726 |
%============================================================================= |
| 12727 |
\end{tabular} |
| 12728 |
\caption{Detailed \AUTO-Commands for running demo \filef{she}.} |
| 12729 |
\label{tbl:demo_she_1} |
| 12730 |
\end{center} |
| 12731 |
\end{table} |
| 12732 |
|
| 12733 |
|
| 12734 |
|
| 12735 |
|
| 12736 |
|
| 12737 |
%============================================================================== |
| 12738 |
%============================================================================== |
| 12739 |
\chapter{ {\cal HomCont} Demo : rev.} \label{ch:HomCont_rev} |
| 12740 |
%============================================================================== |
| 12741 |
%============================================================================== |
| 12742 |
|
| 12743 |
%============================================================================== |
| 12744 |
%DEMO=rev====================================================================== |
| 12745 |
%============================================================================== |
| 12746 |
\section{ A Reversible System.} |
| 12747 |
The fourth-order differential equation |
| 12748 |
$$ |
| 12749 |
u'''' + P u'' + u -u^3 =0 |
| 12750 |
$$ |
| 12751 |
arises in a number of contexts, e.g., as the travelling-wave |
| 12752 |
equation for a nonlinear-Schr\"{o}dinger equation with fourth-order |
| 12753 |
dissipation \cite{BuAk:95} and as a model of a strut on a symmetric |
| 12754 |
nonlinear elastic foundation \cite{HuBoTh:89}. It may be expressed as |
| 12755 |
a system |
| 12756 |
\begin{equation} |
| 12757 |
\left \{ |
| 12758 |
\begin{array}{rcl} |
| 12759 |
\dot{u_1} & = & u_2 \\ |
| 12760 |
\dot{u_2} & = & u_3 \\ |
| 12761 |
\dot{u_3} & = & u_4 \\ |
| 12762 |
\dot{u_4} & = & -P u_3 - u_1 + u_1^3 |
| 12763 |
\end{array} |
| 12764 |
\right. |
| 12765 |
\label{6.1} |
| 12766 |
\end{equation} |
| 12767 |
Note that (\ref{6.1}) is invariant under two separate reversibilities |
| 12768 |
\begin{equation} |
| 12769 |
R_1: (u_1,u_2,u_3,u_4,t) \mapsto (u_1,-u_2,u_3,-u_4,-t) |
| 12770 |
\label{6.R1} |
| 12771 |
\end{equation} |
| 12772 |
and |
| 12773 |
\begin{equation} |
| 12774 |
R_2: (u_1,u_2,u_3,u_4,t) \mapsto (-u_1,u_2,-u_3,u_4,-t) |
| 12775 |
\label{6.R2} |
| 12776 |
\end{equation} |
| 12777 |
First, we copy the demo into a new directory |
| 12778 |
\begin{center} |
| 12779 |
\commandf{demo('rev')} |
| 12780 |
\end{center} |
| 12781 |
For this example, we shall make two separate starts |
| 12782 |
from data stored in equation and data files \filef{rev.c.1, |
| 12783 |
rev.dat.1} and \filef{rev.c.3, rev.dat.3} respectively. The first |
| 12784 |
of these contains initial data for a solution that is reversible |
| 12785 |
under $R_1$ and the second for data that is reversible under $R_2$. |
| 12786 |
% |
| 12787 |
%Note that \commandf{make} or \commandf{make all} will only run the |
| 12788 |
%first of these. To make the output starting from the |
| 12789 |
%$R_2$-reversible solution we need to \commandf{make run2}. As before, |
| 12790 |
%though we illustrate here the step by step approach. |
| 12791 |
|
| 12792 |
|
| 12793 |
\section{An \texorpdfstring{$R_1$}{R1}-Reversible Homoclinic Solution.} |
| 12794 |
|
| 12795 |
The first run |
| 12796 |
\begin{center} |
| 12797 |
\commandf{r1=run('rev',c='rev.1',sv='1')} |
| 12798 |
\end{center} |
| 12799 |
starts by using the file \filef{rev.dat.1} via the |
| 12800 |
\parf{'dat'} \AUTO-constant in \filef{c.rev.1}. |
| 12801 |
The orbit contained in |
| 12802 |
the data file is a ``primary'' homoclinic solution for $P=1.6$, with |
| 12803 |
truncation (half-)interval \parf{PAR(11) = 39.0448429}. |
| 12804 |
which is reversible under $R_1$. Note that this reversibility is |
| 12805 |
specified in \filef{c.rev.1} via \parf{IREV=[0,1,0,1]}. Note also, from |
| 12806 |
\filef{c.rev.1} that we only have one free parameter \parf{PAR(1)} |
| 12807 |
because symmetric homoclinic orbits in reversible systems are |
| 12808 |
generic rather than of codimension one. |
| 12809 |
The first run results in the output |
| 12810 |
\begin{verbatim} |
| 12811 |
BR PT TY LAB PAR(1) L2-NORM MAX U(1) ... |
| 12812 |
1 1 EP 1 1.60000E+00 2.85704E-01 3.62232E-01 |
| 12813 |
1 8 UZ 2 1.70000E+00 2.90288E-01 4.18225E-01 |
| 12814 |
1 11 UZ 3 1.80000E+00 2.95723E-01 4.80604E-01 |
| 12815 |
1 14 UZ 4 1.90000E+00 2.74864E-01 4.43069E-01 |
| 12816 |
1 20 EP 5 1.99678E+00 1.13379E-01 9.59430E-02 |
| 12817 |
\end{verbatim} |
| 12818 |
which is consistent with the theoretical result that the solution |
| 12819 |
tends uniformly to zero as $P\to 0$. Note, by plotting the data |
| 12820 |
saved in \filef{s.1} that only ``half'' of the |
| 12821 |
homoclinic orbit is computed up to its point of symmetry. See Figure |
| 12822 |
\ref{Frev1}. |
| 12823 |
|
| 12824 |
%------------------------------------------------------ |
| 12825 |
\begin{figure}[p] |
| 12826 |
\epsfysize 9.0cm |
| 12827 |
\centerline{\epsffile{include/rev1}} |
| 12828 |
\caption{$R_1$-Reversible homoclinic solutions on the half-interval |
| 12829 |
$x/T \in [0,1]$ where $T=39.0448429$ for $P$ approaching $2$ (solutions |
| 12830 |
with labels \parf{1-5} respectively have decreasing amplitude)} |
| 12831 |
\label{Frev1} |
| 12832 |
\end{figure} |
| 12833 |
%------------------------------------------------------ |
| 12834 |
%------------------------------------------------------ |
| 12835 |
\begin{figure}[p] |
| 12836 |
\epsfysize 9.0cm |
| 12837 |
\centerline{\epsffile{include/rev2}} |
| 12838 |
\caption{$R_1$-reversible homoclinic orbits with oscillatory decay |
| 12839 |
as $x \to -\infty$ (corresponding to label \parf{6}) and monotone decay |
| 12840 |
(at label \parf{10})} |
| 12841 |
\label{Frev2} |
| 12842 |
\end{figure} |
| 12843 |
%------------------------------------------------------ |
| 12844 |
|
| 12845 |
The second run continues in the other direction of \parf{PAR(1)}, with |
| 12846 |
the test function $\psi_2$ activated |
| 12847 |
for the detection of saddle to saddle-focus transition points |
| 12848 |
\begin{center} |
| 12849 |
\commandf{r1=r1+run(r1('UZ1'),c='rev.2',ap='1')} |
| 12850 |
\end{center} |
| 12851 |
The output |
| 12852 |
\begin{verbatim} |
| 12853 |
BR PT TY LAB PAR(1) L2-NORM MAX U(1) ... PAR(22) |
| 12854 |
1 11 UZ 6 1.00001E+00 2.81700E-01 1.76625E-01 ... -3.00001E+00 |
| 12855 |
1 22 UZ 7 -1.00743E-07 2.89421E-01 4.69706E-02 ... -2.00000E+00 |
| 12856 |
1 33 UZ 8 -1.00000E+00 3.02208E-01 4.32654E-03 ... -1.00000E+00 |
| 12857 |
1 44 UZ 9 -2.00000E+00 3.16798E-01 1.22616E-11 ... 2.66362E-08 |
| 12858 |
1 55 EP 10 -3.09920E+00 3.32927E-01 -4.00188E-10 ... 1.09920E+00 |
| 12859 |
\end{verbatim} |
| 12860 |
shows a saddle to saddle-focus transition |
| 12861 |
(indicated by a zero of \parf{PAR(22)}) at \parf{PAR(1)=-2}. Beyond |
| 12862 |
that label the first component of the solution is negative and (up to the |
| 12863 |
point of symmetry) monotone decreasing. See Figure \ref{Frev2}. |
| 12864 |
|
| 12865 |
\section{An \texorpdfstring{$R_2$}{R2}-Reversible Homoclinic Solution.} |
| 12866 |
|
| 12867 |
\begin{center} |
| 12868 |
\commandf{r3=run('rev',c='rev.3',sv='3')} |
| 12869 |
\end{center} |
| 12870 |
starts by using the file \filef{rev.dat.3} via the |
| 12871 |
\parf{'dat'} \AUTO-constant in \filef{c.rev.3}, |
| 12872 |
and runs them with the constants stored in \filef{c.rev.3}. |
| 12873 |
The orbit contained in |
| 12874 |
the data file is a ``multi-pulse'' homoclinic solution for $P=1.6$, with |
| 12875 |
truncation (half-)interval \parf{PAR(11) = 47.4464189}. |
| 12876 |
which is reversible under $R_2$. This reversibility is |
| 12877 |
specified in \filef{c.rev.1} via \parf{IREV=[1,0,1,0]}. |
| 12878 |
The output |
| 12879 |
\begin{verbatim} |
| 12880 |
BR PT TY LAB PAR(1) L2-NORM MAX U(1) ... |
| 12881 |
1 1 EP 1 1.60000E+00 3.69766E-01 3.83942E-01 |
| 12882 |
1 7 UZ 2 1.70000E+00 3.83640E-01 4.89066E-01 |
| 12883 |
1 9 LP 3 1.71157E+00 3.92475E-01 5.46080E-01 |
| 12884 |
1 11 UZ 4 1.69884E+00 4.04207E-01 6.10428E-01 |
| 12885 |
1 14 UZ 5 1.60000E+00 4.32940E-01 7.77395E-01 |
| 12886 |
1 26 UZ 6 1.00000E+00 4.80849E-01 1.08252E+00 |
| 12887 |
1 49 UZ 7 -5.38706E-08 5.15846E-01 1.25863E+00 |
| 12888 |
1 128 MX 8 -9.15462E-01 5.44202E-01 1.32395E+00 |
| 12889 |
\end{verbatim} |
| 12890 |
contains the label of a limit point (\parf{ILP} was set to \parf{1} in |
| 12891 |
\filef{c.rev.3}), which corresponds to a ``coalescence'' of two reversible |
| 12892 |
homoclinic orbits. The two solutions on either side of this limit point are |
| 12893 |
displayed in Figure \ref{Frev3}. The computation ends in a no-convergence |
| 12894 |
point. The solution here is depicted in Figure \ref{Frev4}. The lack of |
| 12895 |
convergence is due to the large peak and trough of the solution rapidly |
| 12896 |
moving to the left as $P \to -2$ (cf. \citeasnoun{ChSp:93}). |
| 12897 |
|
| 12898 |
%------------------------------------------------------ |
| 12899 |
\begin{figure}[p] |
| 12900 |
\epsfysize 9.0cm |
| 12901 |
\centerline{\epsffile{include/rev3}} |
| 12902 |
\caption{Two $R_2$-reversible homoclinic orbits at $P=1.6$ |
| 12903 |
corresponding to labels \parf{1} (smaller amplitude) and \parf{5} (larger amplitude)} |
| 12904 |
\label{Frev3} |
| 12905 |
\end{figure} |
| 12906 |
%------------------------------------------------------ |
| 12907 |
%------------------------------------------------------ |
| 12908 |
\begin{figure}[p] |
| 12909 |
\epsfysize 9.0cm |
| 12910 |
\centerline{\epsffile{include/rev4}} |
| 12911 |
\caption{An $R_2$-reversible homoclinic orbit at label \parf{8}} |
| 12912 |
\label{Frev4} |
| 12913 |
\end{figure} |
| 12914 |
%------------------------------------------------------ |
| 12915 |
|
| 12916 |
Continuing from the initial solution in the other parameter direction |
| 12917 |
\begin{center} |
| 12918 |
\commandf{r3=r3+run(r3('UZ1'),c='rev.4',ap='3')} |
| 12919 |
\end{center} |
| 12920 |
we obtain the output |
| 12921 |
\begin{verbatim} |
| 12922 |
BR PT TY LAB PAR(1) L2-NORM MAX U(1) ... |
| 12923 |
1 7 UZ 9 1.60000E+00 3.70171E-01 3.84045E-01 |
| 12924 |
1 33 UZ 10 9.99998E-01 3.61440E-01 1.77504E-01 |
| 12925 |
1 94 UZ 11 -5.14775E-08 3.71301E-01 4.69706E-02 |
| 12926 |
1 153 MX 12 -2.54464E-01 3.75071E-01 3.00627E-02 |
| 12927 |
\end{verbatim} |
| 12928 |
which again ends at a no convergence error for similar reasons. |
| 12929 |
|
| 12930 |
\section{ Detailed \AUTO-Commands.} |
| 12931 |
\begin{table}[htbp] |
| 12932 |
\begin{center} |
| 12933 |
\begin{tabular}{| l | l |} |
| 12934 |
\hline |
| 12935 |
\AUTO-COMMAND & ACTION \\ |
| 12936 |
\hline |
| 12937 |
%============================================================================== |
| 12938 |
\commandf{mkdir rev} & create an empty work directory \\ |
| 12939 |
\commandf{cd rev} & change directory \\ |
| 12940 |
\commandf{demo('rev')} & copy the demo files to the work directory \\ |
| 12941 |
\hline |
| 12942 |
%============================================================================== |
| 12943 |
& use the starting data in \filef{rev.dat.1} \\ |
| 12944 |
\commandf{r1=run('rev',c='rev.1',sv='1')} & increase \parf{PAR(1)} \\ |
| 12945 |
& save output-files as \filef{b.1, s.1, d.1} \\ |
| 12946 |
\hline |
| 12947 |
%============================================================================== |
| 12948 |
\commandf{r1=r1+run(r1('UZ1'),c='rev.2',ap='1')} & continue in |
| 12949 |
reverse direction; restart: 1st \parf{UZ} \\ |
| 12950 |
& append output-files to \filef{b.1, s.1, d.1} \\ |
| 12951 |
\hline |
| 12952 |
%============================================================================= |
| 12953 |
& use the starting data in \filef{rev.dat.3} \\ |
| 12954 |
\commandf{r3=run('rev',c='rev.3',sv='3')} & restart with different reversibility \\ |
| 12955 |
& save output-files as \filef{b.3, s.3, d.3} \\ |
| 12956 |
\hline |
| 12957 |
%============================================================================== |
| 12958 |
\commandf{r3=r3+run(r3('UZ1'),c='rev.4',ap='3')} & continue in |
| 12959 |
reverse direction; restart: 1st \parf{UZ} \\ |
| 12960 |
& append output-files to \filef{b.3, s.3, d.3} \\ |
| 12961 |
\hline |
| 12962 |
%============================================================================= |
| 12963 |
\end{tabular} |
| 12964 |
\caption{Detailed \AUTO-Commands for running demo \filef{rev}.} |
| 12965 |
\label{tbl:demo_rev_1} |
| 12966 |
\end{center} |
| 12967 |
\end{table} |
| 12968 |
|
| 12969 |
%============================================================================== |
| 12970 |
%============================================================================== |
| 12971 |
\chapter{ {\cal HomCont} Demo : Homoclinic branch switching.} \label{ch:HomCont_hbs} |
| 12972 |
%============================================================================== |
| 12973 |
%============================================================================== |
| 12974 |
|
| 12975 |
%============================================================================== |
| 12976 |
%DEMO=hbs====================================================================== |
| 12977 |
%============================================================================== |
| 12978 |
|
| 12979 |
This demo illustrates homoclinic branch switching, which is an |
| 12980 |
implementation of Lin's method \cite{Li:90,Sa:93,Ye:01} |
| 12981 |
as described in \citeasnoun{OlChKr:03}. We use a |
| 12982 |
direct branch switching method to switch from 1- to 2- and |
| 12983 |
3-homoclinic orbits near an inclination flip bifurcation |
| 12984 |
in a model due to Sandstede, |
| 12985 |
which was introduced in Chapter~\ref{ch:HomCont_san}. |
| 12986 |
This also shows how to obtain a homoclinic orbit through continuation |
| 12987 |
of a periodic orbit born at a Hopf bifurcation. |
| 12988 |
Thereafter, we illustrate homoclinic branch switching for the |
| 12989 |
FitzHugh-Nagumo equations and a 5th-order Korteweg-De Vries model. |
| 12990 |
|
| 12991 |
The equation files in these demos are written in C. |
| 12992 |
|
| 12993 |
\section{ Branch switching at an inclination flip in Sand\-stede's |
| 12994 |
model.} |
| 12995 |
\label{sec:HomCont_hbs_san} |
| 12996 |
Consider the system \cite{Sa:95b} |
| 12997 |
\begin{equation} \begin{array}{rcl} |
| 12998 |
\dot{x} & = & a x + b y - a x^2 - \alpha z x (2-3x), \\ |
| 12999 |
\dot{y} & = & b x + a y - \frac{3}{2} x (b x + a y) + \alpha z 2 y, \\ |
| 13000 |
\dot{z} & = & c z + \mu x + 3 x z + \alpha (x^2 (1-x) - y^2). |
| 13001 |
\end{array} \end{equation} |
| 13002 |
as given in the file \filef{sib.c}, where for simplicity we have |
| 13003 |
set $\tilde\mu=0$, $\beta=1$ and $\gamma=3$. |
| 13004 |
|
| 13005 |
We study an inclination flip that exists for $a=0.375$, |
| 13006 |
$b=0.625$ and $c=-0.75$. This corresponds to the situation |
| 13007 |
where the eigenvalues of the equilibrium at the origin are |
| 13008 |
$a+b=1$, $a-b=-0.25$ and $c=-0.75$. Hence, the corresponding |
| 13009 |
bifurcation diagram consists of a complicated structure involving a |
| 13010 |
fan of infinitely many $n$-periodic and $n$-homoclinic orbits |
| 13011 |
for arbitrary $n$ and a region with horseshoe dynamics; see |
| 13012 |
also \citeasnoun{HoKr:00} and the references therein. |
| 13013 |
|
| 13014 |
This computation starts from an equilibrium at $(2/3,0,0)$, which |
| 13015 |
exists for $a=\mu=\alpha=0$. Also, $b$ is set to $0.625$ (the value |
| 13016 |
we would like it to be) and $c$ is set to $-2.5$ in \funcf{stpnt}. |
| 13017 |
Choosing $c=-2$ at this stage leads to convergence problems. |
| 13018 |
This equilibrium is not the one corresponding to the homoclinic orbit, |
| 13019 |
but it is an equilibrium with complex eigenvalues, that we can follow |
| 13020 |
until it reaches a Hopf bifurcation. A periodic orbit emanates from |
| 13021 |
this Hopf bifurcation and can be followed to the homoclinic orbit. |
| 13022 |
However, first we need to change $a$ from $0$ to $0.375$. |
| 13023 |
|
| 13024 |
All the following commands, except for \commandf{demo('sib')} |
| 13025 |
are contained within the file \commandf{'sib.auto'} which you can |
| 13026 |
either execute in a batch mode by entering\\ |
| 13027 |
\commandf{> auto sib.auto}\\ |
| 13028 |
or step by step using\\ |
| 13029 |
\commandf{AUTO> demofile('sib.auto')}. |
| 13030 |
|
| 13031 |
We start by copying the demo to the current work directory |
| 13032 |
and running the first step |
| 13033 |
\begin{center} |
| 13034 |
\commandf{demo('sib') }\\ |
| 13035 |
\commandf{r1=run(e='sib',c='sib') } \\ |
| 13036 |
\commandf{save(r1,'1') } |
| 13037 |
\end{center} |
| 13038 |
The equilibrium is followed in $a$ until $a$ (or \parf{PAR(1)}) is at our |
| 13039 |
desired value, $0.375$. |
| 13040 |
\begin{verbatim} |
| 13041 |
BR PT TY LAB PAR(1) ... U(1) U(2) U(3) |
| 13042 |
1 1 EP 1 0.00000E+00 ... 6.66667E-01 0.00000E+00 0.00000E+00 |
| 13043 |
1 5 UZ 2 3.75000E-01 ... 6.66667E-01 -1.33333E-01 0.00000E+00 |
| 13044 |
\end{verbatim} |
| 13045 |
The output is saved in the files \filef{b.1}, \filef{s.1} and |
| 13046 |
\filef{d.1}. |
| 13047 |
Next we continue in $\alpha$ (\parf{PAR(4)}) until a Hopf bifurcation is |
| 13048 |
found: |
| 13049 |
\begin{center} |
| 13050 |
\commandf{r2=run(r1,ICP=[4]) }\\ |
| 13051 |
\commandf{save(r2,'2') } |
| 13052 |
\end{center} |
| 13053 |
or, alternatively, |
| 13054 |
\begin{center} |
| 13055 |
\commandf{rn(c='sib.2',s='1')}\\ |
| 13056 |
\commandf{sv('2') } |
| 13057 |
\end{center} |
| 13058 |
\begin{verbatim} |
| 13059 |
BR PT TY LAB PAR(4) ... U(1) U(2) U(3) |
| 13060 |
1 6 HB 3 3.18429E-01 ... 6.54375E-01 -1.34754E-01 7.70102E-02 |
| 13061 |
\end{verbatim} |
| 13062 |
The output is saved in the files \filef{b.2}, \filef{s.2} and |
| 13063 |
\filef{d.2}. |
| 13064 |
This Hopf bifurcation can then be continued into a periodic orbit. The |
| 13065 |
periodic orbit eventually reaches a homoclinic bifurcation. We |
| 13066 |
continue in $\mu$=\parf{PAR(5)} and \parf{PAR(11)}, |
| 13067 |
which corresponds to the period, and stop when the period is equal to $35$. |
| 13068 |
\begin{center} |
| 13069 |
\commandf{r3=run(r2('HB1'),IPS=2,ICP=[5,11],NMX=200,DS=0.01,DSMAX=0.01,UZR=\{-11:35\})} \\ |
| 13070 |
\commandf{save(r3,'3')} |
| 13071 |
\end{center} |
| 13072 |
\begin{verbatim} |
| 13073 |
BR PT TY LAB PAR(5) L2-NORM ... PERIOD |
| 13074 |
3 10 5 -2.41881E-03 6.70569E-01 ... 1.08975E+01 |
| 13075 |
... |
| 13076 |
3 40 8 -1.29495E-02 6.14547E-01 ... 1.41297E+01 |
| 13077 |
... |
| 13078 |
3 81 UZ 13 -1.04657E-04 4.01829E-01 ... 3.50000E+01 |
| 13079 |
\end{verbatim} |
| 13080 |
The output is saved in the files \filef{b.3}, \filef{s.3} and |
| 13081 |
\filef{d.3}. Note that $\mu$ first decreases and then increases towards |
| 13082 |
$0$, which is precisely what we expect in this model, as homoclinic |
| 13083 |
orbits occur on the line $\mu=0$ in the $(\alpha,\mu)$-plane. |
| 13084 |
It is now instructive to look at a phase space diagram to see what is |
| 13085 |
going on. |
| 13086 |
\begin{center} |
| 13087 |
\commandf{plot(r3) } |
| 13088 |
\end{center} |
| 13089 |
Selecting 'solution' for Type, [5,6,7,8,9,10,11,12,13] for Label, |
| 13090 |
[U(1)] for X and [U(2)] for Y, we obtain the diagram depicted in |
| 13091 |
Figure~\ref{hopfbif}(a), where the periodic orbit grows from the |
| 13092 |
Hopf equilibrium to a homoclinic orbit. |
| 13093 |
\begin{figure}[htb] |
| 13094 |
\begin{center} |
| 13095 |
\begin{picture}(400,180) |
| 13096 |
\put(0,0){ |
| 13097 |
\put(157,148){(a)} |
| 13098 |
\includegraphics[scale=0.5]{include/hopfbif}} |
| 13099 |
\put(200,0){ |
| 13100 |
\put(157,148){(b)} |
| 13101 |
\includegraphics[scale=0.5]{include/notshifted}} |
| 13102 |
\end{picture} |
| 13103 |
\caption{Periodic orbit growing from a Hopf bifurcation to a |
| 13104 |
homoclinic orbit (a). The unshifted homoclinic orbit (b).} |
| 13105 |
\label{hopfbif} |
| 13106 |
\end{center} |
| 13107 |
\end{figure} |
| 13108 |
|
| 13109 |
Note however, that the homoclinic orbit has the wrong left-hand and |
| 13110 |
right-hand end points. This can be seen by plotting the solution |
| 13111 |
corresponding to Label [13] using 't' vs. 'x' (coordinate [U(1)]), |
| 13112 |
as depicted in Figure~\ref{hopfbif}(b). |
| 13113 |
|
| 13114 |
Hence, in order to continue this as a real homoclinic |
| 13115 |
we have to give {\cal HomCont} special instructions, to do a phase-shift in |
| 13116 |
time. This can be done by setting \parf{ISTART=4}. Moreover, |
| 13117 |
since we have not specified the value of |
| 13118 |
the equilibrium at the origin in \filef{sib.c}, |
| 13119 |
we need to set \parf{IEQUIB=1} (this is the default value) to let |
| 13120 |
{\cal HomCont} detect the equilibrium. Note that in this case this is not |
| 13121 |
strictly necessary; however, we do this for instructional purposes. |
| 13122 |
|
| 13123 |
Now we use {\cal HomCont} to continue the homoclinic orbit in $c$ and $\mu$ |
| 13124 |
(\parf{PAR(3)}, \parf{PAR(5)}), to get the desired value $c=-2.0$. |
| 13125 |
\begin{center} |
| 13126 |
\commandf{r4=run(r3,IPS=9,ICP=[3,5],NPR=60,JAC=1,UZR=\{-3:-2.0\},ISTART=4) } \\ |
| 13127 |
\commandf{save(r4,'4')} |
| 13128 |
\end{center} |
| 13129 |
\begin{verbatim} |
| 13130 |
BR PT TY LAB PAR(3) L2-NORM ... PAR(5) |
| 13131 |
3 51 UZ 14 -2.00000E+00 4.01890E-01 ... 2.66146E-09 |
| 13132 |
\end{verbatim} |
| 13133 |
The output is saved in the files \filef{b.4}, \filef{s.4} and |
| 13134 |
\filef{d.4}. Note that \parf{PAR(5)}=$\mu$ remains zero, which is exactly |
| 13135 |
what we expect. |
| 13136 |
|
| 13137 |
Next we want to add a solution to the adjoint equation to this |
| 13138 |
solution. This is achieved by making the change \parf{ITWIST = 1}. |
| 13139 |
Also, we set \parf{ISTART} to 1 to tell |
| 13140 |
{\cal HomCont} that it should not try to shift the orbit anymore. |
| 13141 |
\begin{center} |
| 13142 |
\commandf{r5=run(r4,ICP=[5,8],NMX=2,ITWIST=1,ISTART=1)} \\ |
| 13143 |
\commandf{save(r5,'5') } |
| 13144 |
\end{center} |
| 13145 |
or, alternatively, |
| 13146 |
\begin{center} |
| 13147 |
\commandf{rn(c='sib.5',s='4')}\\ |
| 13148 |
\commandf{sv('5')}\\ |
| 13149 |
\end{center} |
| 13150 |
The output is stored in \filef{b.5}, \filef{s.5} and \filef{d.5}. |
| 13151 |
\begin{verbatim} |
| 13152 |
BR PT TY LAB PAR(5) L2-NORM ... PAR(8) |
| 13153 |
3 2 EP 15 2.66146E-09 4.01890E-01 ... 1.00000E-02 |
| 13154 |
\end{verbatim} |
| 13155 |
Here \parf{PAR(8)} is a dummy (unused) parameter and $\mu$ just stays where |
| 13156 |
it is. Now that we have obtained the solution of the adjoint equation, |
| 13157 |
we are able to detect inclination flips. This can be achieved by |
| 13158 |
setting \parf{IPSI} to [13] and monitoring \parf{PAR(33)}. |
| 13159 |
\begin{center} |
| 13160 |
\commandf{r6=run(r5,ICP=[4,5,33],NMX=30,DS=-0.01,DSMAX=1.0,UZR=\{33:0,-4:0\},IPSI=[13])} |
| 13161 |
\end{center} |
| 13162 |
\begin{verbatim} |
| 13163 |
BR PT TY LAB PAR(4) L2-NORM ... PAR(5) PAR(33) |
| 13164 |
3 19 UZ 16 7.11774E-02 4.01890E-01 ... 1.24376E-11 -2.36702E-07 |
| 13165 |
\end{verbatim} |
| 13166 |
The output is stored in the \python variable \parf{r6}. |
| 13167 |
Hence an inclination flip was found at $\alpha=0.711774$. |
| 13168 |
|
| 13169 |
Now we are ready to perform homoclinic branch switching, using |
| 13170 |
the techniques described in \cite{OlChKr:03}. |
| 13171 |
Our first aim is to find a 2-homoclinic orbit. The |
| 13172 |
ingredients we need are: a homoclinic orbit where $n$-homoclinic orbits |
| 13173 |
are close by, and the solution to the adjoint equation to |
| 13174 |
obtain the Lin vector. Since both ingredients are there, we can now |
| 13175 |
continue in $\mu$, $\varepsilon_1$ and $T_1$, to obtain the initial |
| 13176 |
Lin gap. Recall from Chapter~\ref{ch:HomCont} that the Lin gaps |
| 13177 |
$\varepsilon_i$ correspond to |
| 13178 |
\parf{PAR(20+i*2)} and the time intervals $T_i$ |
| 13179 |
correspond to \parf{PAR(21+i*2)}. We stop when |
| 13180 |
$\varepsilon_1=0.2$. We need to specify \parf{ITWIST=2}, to tell |
| 13181 |
{\cal HomCont} we |
| 13182 |
aim to find a 2-homoclinic orbit, so that it will split it up in three |
| 13183 |
parts with two potential Lin gaps. We effectively have a 9-dimensional |
| 13184 |
system at this point. |
| 13185 |
\begin{center} |
| 13186 |
\commandf{r7=run(r6('UZ1'),ICP=[21,22,5],NMX=300,NPR=10,UZR=\{-22:0.2\},ISTART=-2,IPSI=[])}\\ |
| 13187 |
\commandf{save(r7,'7')} |
| 13188 |
\end{center} |
| 13189 |
\begin{verbatim} |
| 13190 |
BR PT TY LAB PAR(21) L2-NORM ... PAR(22) PAR(5) |
| 13191 |
3 10 18 3.45897E+01 4.46818E-01 ... 7.87712E-07 -1.55885E-11 |
| 13192 |
3 20 19 2.73699E+01 4.46818E-01 ... 2.91119E-05 -1.63974E-09 |
| 13193 |
3 30 20 1.73720E+01 4.46817E-01 ... 4.42273E-03 -3.10167E-05 |
| 13194 |
3 38 UZ 21 1.01451E+01 4.46796E-01 ... 2.00000E-01 -1.48615E-02 |
| 13195 |
\end{verbatim} |
| 13196 |
The output is stored in \filef{b.7}, \filef{s.7} and \filef{d.7}. |
| 13197 |
Here we see that $T_1$, the time it takes to make the first loop with |
| 13198 |
respect to the Poincar\'e section, decreases. This is illustrated in |
| 13199 |
Figure~\ref{broken}. Next we are ready to close this gap, by continuing |
| 13200 |
in $\alpha$, $\mu$, and $\varepsilon_1$, while keeping $T_1$ at a |
| 13201 |
constant value. |
| 13202 |
\begin{figure}[htb] |
| 13203 |
\begin{center} |
| 13204 |
\begin{picture}(400,180) |
| 13205 |
\put(0,0){ |
| 13206 |
\put(157,148){(a)} |
| 13207 |
\includegraphics[scale=0.5]{include/loop}} |
| 13208 |
\put(200,0){ |
| 13209 |
\put(157,148){(b)} |
| 13210 |
\includegraphics[scale=0.5]{include/broken}} |
| 13211 |
\end{picture} |
| 13212 |
\caption{Behaviour of the second piece of the |
| 13213 |
`broken homoclinic orbit' when creating a Lin gap (a). |
| 13214 |
Projection of the ``broken homoclinic orbit'' |
| 13215 |
onto the $(x,y)$-plane, where $\varepsilon_1=0.2$. To include all the |
| 13216 |
pieces necessary to obtain this |
| 13217 |
figure, the ``X'' box must contain [U(1),U(4),U(7)] |
| 13218 |
and the ``Y'' box must contain [U(2),U(5),U(8)] (b).} |
| 13219 |
\label{broken} |
| 13220 |
\end{center} |
| 13221 |
\end{figure} |
| 13222 |
\begin{center} |
| 13223 |
\commandf{r8=run(r7,ICP=[4,5,22],NPR=310,DS=0.01,DSMAX=0.01,UZR=\{-22:0.0,4:0.074\})} \\ |
| 13224 |
\commandf{r6=r6+r8} |
| 13225 |
\end{center} |
| 13226 |
\begin{verbatim} |
| 13227 |
BR PT TY LAB PAR(4) L2-NORM ... PAR(5) PAR(22) |
| 13228 |
3 3 UZ 22 7.40000E-02 4.46781E-01 ... -1.43162E-02 1.93746E-01 |
| 13229 |
3 32 UZ 23 1.98414E-01 4.46590E-01 ... -6.05495E-03 2.29300E-06 |
| 13230 |
\end{verbatim} |
| 13231 |
The output is appended to the \python variable \parf{r6}. |
| 13232 |
Now we have obtained a 2-homoclinic orbit at label 23. However, the |
| 13233 |
homoclinic orbit is still split in three parts. We can switch back to |
| 13234 |
a normal orbit by setting \parf{ITWIST} back to 0 and continuing in the usual |
| 13235 |
way. Here we continue back to the inclination flip point in $\alpha$ |
| 13236 |
and $\mu$. |
| 13237 |
\begin{center} |
| 13238 |
\commandf{r9=run(r8,ICP=[4,5],NMX=30,DS='-',DSMAX=0.1,UZR=\{4:0.15\},ISTART=1,ITWIST=0)} \\ |
| 13239 |
\commandf{r6=r6+r9} |
| 13240 |
\end{center} |
| 13241 |
\begin{verbatim} |
| 13242 |
BR PT TY LAB PAR(4) L2-NORM ... PAR(5) |
| 13243 |
3 7 UZ 24 1.50000E-01 4.94490E-01 ... -3.60248E-03 |
| 13244 |
3 30 EP 25 7.61403E-02 4.98746E-01 ... -2.64847E-06 |
| 13245 |
\end{verbatim} |
| 13246 |
So the 2-homoclinic orbit converges back to the 1-homoclinic orbit at |
| 13247 |
the inclination flip bifurcation. |
| 13248 |
The output is appended to the python variable \parf{r6}. |
| 13249 |
The resulting 2-homoclinic orbits can be seen using |
| 13250 |
\begin{center} |
| 13251 |
\commandf{plot(r6) } |
| 13252 |
\end{center} |
| 13253 |
and is depicted in Figure~\ref{hom2}(a). |
| 13254 |
\begin{figure}[htb] |
| 13255 |
\begin{center} |
| 13256 |
\begin{picture}(400,180) |
| 13257 |
\put(0,0){ |
| 13258 |
\put(157,148){(a)} |
| 13259 |
\includegraphics[scale=0.5]{include/hom2}} |
| 13260 |
\put(200,0){ |
| 13261 |
\put(157,148){(b)} |
| 13262 |
\includegraphics[scale=0.5]{include/hom3}} |
| 13263 |
\end{picture} |
| 13264 |
\caption{The 2-homoclinic orbit as $a$ is changed (a). |
| 13265 |
The two different 3-homoclinic orbits (b).} |
| 13266 |
\label{hom2} |
| 13267 |
\end{center} |
| 13268 |
\end{figure} |
| 13269 |
|
| 13270 |
Next, we aim to find a 3-homoclinic orbit. To do so, we |
| 13271 |
restart at the inclination flip point at label 16 and set |
| 13272 |
\parf{ITWIST=3}. Moreover, we need to continue in one more |
| 13273 |
gap, $\varepsilon_2$=\parf{PAR(24)} and, once again, stop |
| 13274 |
when $\varepsilon_1$=\parf{PAR(22)=0}. Note that the |
| 13275 |
dimension of the boundary value problem we continue |
| 13276 |
is now equal to 12. This is not to be confused with the setting |
| 13277 |
of the \AUTO constant \parf{NDIM=3}, because {\cal HomCont} handles this |
| 13278 |
internally. |
| 13279 |
\begin{center} |
| 13280 |
\commandf{r10=run(r6('UZ1'), ICP=[21,22,24,5], NMX=300, NPR=10, |
| 13281 |
UZR=\{-22:0.2\}, ISTART=-3, IPSI=[])} \\ |
| 13282 |
\commandf{save(r10,'10') } |
| 13283 |
\end{center} |
| 13284 |
\begin{verbatim} |
| 13285 |
BR PT TY LAB PAR(21) ... PAR(22) PAR(24) PAR(5) |
| 13286 |
3 10 26 3.45896E+01 ... 7.87894E-07 6.42157E-07 -1.06346E-11 |
| 13287 |
3 20 27 2.73699E+01 ... 2.91126E-05 6.51591E-07 -1.63655E-09 |
| 13288 |
3 30 28 1.73719E+01 ... 4.42289E-03 1.44090E-04 -3.10188E-05 |
| 13289 |
3 38 UZ 29 1.01451E+01 ... 2.00000E-01 6.97445E-02 -1.48615E-02 |
| 13290 |
\end{verbatim} |
| 13291 |
The output is stored in \filef{b.10}, \filef{s.10} and \filef{d.10}. |
| 13292 |
Now we need to subsequently close the Lin gaps. Our strategy is to |
| 13293 |
keep $T_1$ fixed. We first continue in $\alpha$, $\mu$, |
| 13294 |
$\varepsilon_1$ and $\varepsilon_2$ until $\varepsilon_1=0$. |
| 13295 |
\begin{center} |
| 13296 |
\commandf{r11=run(r10,ICP=[4,5,22,24],NPR=310,DS=0.01,DSMAX=0.01,UZR=\{-22:0.0,4:0.082\})} \\ |
| 13297 |
\commandf{r6=r6+r11} |
| 13298 |
\end{center} |
| 13299 |
\begin{verbatim} |
| 13300 |
BR PT TY LAB PAR(4) ... PAR(5) PAR(22) PAR(24) |
| 13301 |
3 6 UZ 30 8.20000E-02 ... -1.29790E-02 1.76995E-01 6.37184E-02 |
| 13302 |
3 32 UZ 31 1.98414E-01 ... -6.05495E-03 2.30717E-06 3.62449E-02 |
| 13303 |
\end{verbatim} |
| 13304 |
The output is appended to the \python variable \parf{r6}. |
| 13305 |
Note that this continuation is very similar to the one where we found |
| 13306 |
a 2-homoclinic orbit. In fact we have now found a 2-homoclinic orbit |
| 13307 |
(numerically) followed by a `broken' 1-homoclinic orbit; only the mesh |
| 13308 |
is not aligned. |
| 13309 |
|
| 13310 |
The next step is to close the gap corresponding to $\varepsilon_2$ to |
| 13311 |
obtain a 3-homoclinic orbit. We replace the continuation parameter |
| 13312 |
$\varepsilon_1$ by $T_2$, because $T_2$ (\parf{PAR(23)}) |
| 13313 |
still has to be decreased from |
| 13314 |
its high value (35) and $\varepsilon_1$ needs to stay at 0. |
| 13315 |
\begin{center} |
| 13316 |
\commandf{r12=run(r11,ICP=[4,5,23,24],NMX=32,NTST=40,DS=-1,DSMAX=1, |
| 13317 |
UZR=\{24:0,4:0.18\})}\\ |
| 13318 |
\commandf{r6=r6+r12} |
| 13319 |
\end{center} |
| 13320 |
\begin{verbatim} |
| 13321 |
BR PT TY LAB PAR(4) ... PAR(5) PAR(23) PAR(24) |
| 13322 |
3 16 UZ 32 1.98395E-01 ... -6.05536E-03 2.01311E+01 1.82491E-08 |
| 13323 |
3 24 UZ 33 1.80000E-01 ... -6.50293E-03 1.27554E+01 -3.14294E-02 |
| 13324 |
3 30 UZ 34 1.66990E-01 ... -6.89269E-03 9.41745E+00 -1.03179E-06 |
| 13325 |
3 32 EP 35 1.78172E-01 ... -6.55364E-03 9.50300E+00 -7.20367E-02 |
| 13326 |
\end{verbatim} |
| 13327 |
The output is appended to the \python variable \parf{r6}. |
| 13328 |
Note that we have found two zeros of \parf{PAR(24)}, at labels 32 and |
| 13329 |
34, respectively. The two zeros |
| 13330 |
correspond to two different 3-homoclinic |
| 13331 |
orbits, which, when followed from periodic orbits, both emanate from |
| 13332 |
from the same saddle-node bifurcation. |
| 13333 |
These two 3-homoclinic orbits are depicted in Figure~\ref{hom2}(b). |
| 13334 |
We can follow both of these back to the inclination flip point, by |
| 13335 |
setting \parf{ITWIST} back to 0: |
| 13336 |
\begin{center} |
| 13337 |
\commandf{r13=run(r6('UZ7'), ICP=[4,5], NMX=30, DS=-0.01, DSMAX=0.1, |
| 13338 |
UZR=\{4:0.13\}, ISTART=1, ITWIST=0)}\\ |
| 13339 |
\commandf{r6=r6+r13} |
| 13340 |
\end{center} |
| 13341 |
\begin{verbatim} |
| 13342 |
BR PT TY LAB PAR(4) L2-NORM ... PAR(5) |
| 13343 |
3 13 UZ 36 1.29999E-01 5.04807E-01 ... -2.33902E-03 |
| 13344 |
3 30 EP 37 9.27258E-02 5.06560E-01 ... -2.76788E-04 |
| 13345 |
\end{verbatim} |
| 13346 |
\begin{center} |
| 13347 |
\commandf{r14=run(r6('UZ9'), ICP=[4,5], NMX=30, DS=-0.01, DSMAX=0.1, |
| 13348 |
UZR=\{4:0.145\}, ISTART=1, ITWIST=0)} \\ |
| 13349 |
\commandf{r6=r6+r14} |
| 13350 |
\commandf{save(r6,'6')} |
| 13351 |
\end{center} |
| 13352 |
\begin{verbatim} |
| 13353 |
BR PT TY LAB PAR(4) L2-NORM ... PAR(5) |
| 13354 |
3 7 UZ 38 1.45000E-01 5.47347E-01 ... -4.79400E-03 |
| 13355 |
3 30 EP 39 8.39399E-02 5.52605E-01 ... -7.36611E-05 |
| 13356 |
\end{verbatim} |
| 13357 |
All the combined appended output is saved to \filef{b.6}, \filef{s.6} |
| 13358 |
and \filef{d.6}. |
| 13359 |
The bifurcation diagram and the paths we followed when closing the Lin |
| 13360 |
gaps are depicted in Figure~\ref{parspace}. It is possible and |
| 13361 |
straightforward to obtain $4, 5, 6, \dots$-homoclinic orbits by |
| 13362 |
extending the above strategy. |
| 13363 |
\begin{figure}[htb] |
| 13364 |
\begin{center} |
| 13365 |
\includegraphics[scale=0.5]{include/parspace} |
| 13366 |
\caption{Parameter space diagram near an inclination flip. |
| 13367 |
The curve |
| 13368 |
through label 17 corresponds to a 1-homoclinic orbit. |
| 13369 |
The opening of the Lin gaps occurs along the vertical line from |
| 13370 |
label 16 to label 23. The curves |
| 13371 |
through labels 23 and 30 denote the path that is followed when |
| 13372 |
closing the Lin gaps. The (approximately overlaid) |
| 13373 |
curves though labels 25 and 35 correspond to the |
| 13374 |
2- and one of the 3-homoclinic orbits. |
| 13375 |
Finally, the curve through label 37 corresponds to the other |
| 13376 |
3-homoclinic orbit, which was obtained for \parf{PAR(23)}=$T_2=12.03201$.} |
| 13377 |
\label{parspace} |
| 13378 |
\end{center} |
| 13379 |
\end{figure} |
| 13380 |
|
| 13381 |
\section{ Branch switching for a Shil'nikov type homoclinic orbit in |
| 13382 |
the FitzHugh-Nagumo equations.} |
| 13383 |
|
| 13384 |
The FitzHugh-Nagumo (FHN) equations \cite{FitzH:61,NaArYo:62} |
| 13385 |
are a simplified version of the |
| 13386 |
Hodgkin-Huxley equations \cite{HoHu:52}. |
| 13387 |
They model nerve axon dynamics and are given by |
| 13388 |
|
| 13389 |
\begin{equation} |
| 13390 |
\begin{split} |
| 13391 |
u_t&=u_{xx}-f_a(u)-w, \\ |
| 13392 |
w_t&=\epsilon(u-\gamma w), |
| 13393 |
\end{split} |
| 13394 |
\label{fhnpde} |
| 13395 |
\end{equation} |
| 13396 |
where |
| 13397 |
\[ |
| 13398 |
f_a(u) = u (u-a)(u-1). |
| 13399 |
\] |
| 13400 |
|
| 13401 |
Travelling wave solutions of the form $(u,w)(x,t)=(u,w)(\xi)$, where |
| 13402 |
$\xi=x+ct$ are solutions of the following ODE system: |
| 13403 |
|
| 13404 |
\begin{equation} |
| 13405 |
\begin{split} |
| 13406 |
\dot u &= v,\\ |
| 13407 |
\dot v &= c v + f_a(u) + w,\\ |
| 13408 |
\dot w &= \frac{\epsilon}{c} (u - \gamma w). |
| 13409 |
\end{split} |
| 13410 |
\label{fhnode} |
| 13411 |
\end{equation} |
| 13412 |
In particular we consider solitary wave solutions of \eqref{fhnpde}. |
| 13413 |
These correspond to orbits homoclinic to $(u,v,w)=0$ in system \eqref{fhnode}. |
| 13414 |
In our numerical example we keep $\gamma=0$. |
| 13415 |
|
| 13416 |
We aim to find a $2$-homoclinic orbit at a Shil'nikov bifurcation. |
| 13417 |
All the commands given here are in the file fnb.auto. |
| 13418 |
First we obtain a homoclinic orbit using a homotopy technique (see |
| 13419 |
\citeasnoun{FrDoMo:94}), using \parf{ISTART=3}, for the parameter |
| 13420 |
values $c=0.21, a=0.2, \epsilon=0.0025$. |
| 13421 |
|
| 13422 |
\begin{center} |
| 13423 |
\commandf{demo('fnb') }\\ |
| 13424 |
\commandf{r1 = run('fhn',sv='1')} |
| 13425 |
\end{center} |
| 13426 |
|
| 13427 |
Among the output we see: |
| 13428 |
\begin{verbatim} |
| 13429 |
BR PT TY LAB PERIOD L2-NORM ... PAR(17) |
| 13430 |
1 21 UZ 4 2.91921E+01 2.38053E-01 ... 2.37630E-11 |
| 13431 |
\end{verbatim} |
| 13432 |
and a zero of \parf{PAR(17)} means that a zero of an artificial parameter has |
| 13433 |
been located and the right-hand end point of the corresponding |
| 13434 |
solution belongs to the plane that is tangent to the stable manifold |
| 13435 |
at the saddle. This point still needs to come closer to the |
| 13436 |
equilibrium, which we can achieve by further increasing the period to |
| 13437 |
300, while keeping \parf{PAR(17)} at 0: |
| 13438 |
\begin{center} |
| 13439 |
\commandf{r2 = run(r1('UZ1'),c='fhn.2',sv='2')} |
| 13440 |
\end{center} |
| 13441 |
\begin{verbatim} |
| 13442 |
BR PT TY LAB PERIOD L2-NORM ... PAR(2) |
| 13443 |
1 189 UZ 11 3.00000E+02 7.37932E-02 ... 1.79286E-01 |
| 13444 |
\end{verbatim} |
| 13445 |
|
| 13446 |
Next we stop using the homotopy technique and increase the period even |
| 13447 |
further, to 1000. |
| 13448 |
\begin{center} |
| 13449 |
\commandf{r3 = run(r2('UZ1'),c='fhn.3',sv='3')} |
| 13450 |
\end{center} |
| 13451 |
\begin{verbatim} |
| 13452 |
BR PT TY LAB PERIOD L2-NORM ... PAR(2) |
| 13453 |
1 80 UZ 14 1.00000E+03 4.04183E-02 ... 1.79286E-01 |
| 13454 |
\end{verbatim} |
| 13455 |
|
| 13456 |
A continuation in \parf{PAR(2)}=$a$ and \parf{PAR(1)}=$c$ needs to be |
| 13457 |
performed to arrive |
| 13458 |
at the place where we wish to find a 2-homoclinic orbit: $a=0$. At the |
| 13459 |
same time we monitor \parf{PAR(22)} to locate Belyakov points. |
| 13460 |
\begin{center} |
| 13461 |
\commandf{r4 = run(r3('UZ1'),c='fhn.4',sv='4')} |
| 13462 |
\end{center} |
| 13463 |
\begin{verbatim} |
| 13464 |
BR PT TY LAB PAR(2) L2-NORM ... PAR(1) PAR(22) |
| 13465 |
1 6 UZ 16 1.31812E-01 3.28710E-02 ... 2.17166E-01 -6.31253E-06 |
| 13466 |
1 23 UZ 20 -8.55398E-08 1.56158E-02 ... 2.74218E-01 -9.88772E-02 |
| 13467 |
\end{verbatim} |
| 13468 |
Hence, there exists a Belyakov point at $(a,c)=(0.131812,0.21766)$. |
| 13469 |
At label 19 we have a lower value of $a$ than at the Belyakov point, |
| 13470 |
and by inspection of the file |
| 13471 |
\filef{d.4} we can observe that the equilibrium has one positive |
| 13472 |
eigenvalue and a complex conjugate pair of eigenvalues with negative |
| 13473 |
real part, and conclude that this orbit is of Shil'nikov type. |
| 13474 |
Before starting the homoclinic branch switching, we calculate |
| 13475 |
the adjoint to obtain a `Lin vector': |
| 13476 |
\begin{center} |
| 13477 |
\commandf{r5 = run(r4('UZ5'),c='fhn.5',sv='5')} |
| 13478 |
\end{center} |
| 13479 |
\begin{verbatim} |
| 13480 |
BR PT TY LAB PAR(9) L2-NORM ... PAR(3) |
| 13481 |
1 2 EP 29 -1.00000E+00 1.56158E-02 ... 2.50000E-03 |
| 13482 |
\end{verbatim} |
| 13483 |
Next, we continue in the time $T_1$ (\parf{PAR(21)}), the gap |
| 13484 |
$\varepsilon_1$ (\parf{PAR(22)}) and $c$ (\parf{PAR(1)}), |
| 13485 |
and by setting \parf{ISTART}=-2 |
| 13486 |
we try to locate a 2-homoclinic orbit: |
| 13487 |
\begin{center} |
| 13488 |
\commandf{r6 = run(r5,c='fhn.6',sv='6')} |
| 13489 |
\end{center} |
| 13490 |
In fact we find many of them, exactly as is predicted by the theory: |
| 13491 |
\begin{verbatim} |
| 13492 |
BR PT TY LAB PAR(21) ... PAR(1) PAR(22) |
| 13493 |
... |
| 13494 |
1 174 UZ 45 1.64799E+02 ... 2.74218E-01 -3.44422E-11 |
| 13495 |
1 178 UZ 46 1.44799E+02 ... 2.74218E-01 3.29142E-14 |
| 13496 |
1 182 UZ 47 1.24854E+02 ... 2.74218E-01 1.70138E-15 |
| 13497 |
1 187 UZ 48 1.04789E+02 ... 2.74218E-01 -8.57896E-14 |
| 13498 |
1 191 UZ 49 8.49517E+01 ... 2.74218E-01 1.93804E-13 |
| 13499 |
1 196 UZ 50 6.45145E+01 ... 2.74218E-01 -2.26551E-09 |
| 13500 |
\end{verbatim} |
| 13501 |
Each of these homoclinic orbits differ |
| 13502 |
by about 20 in the value $T_1$. This is about |
| 13503 |
the time it takes to make one half-turn close to and |
| 13504 |
around the equilibrium, so that orbits differ by the number of |
| 13505 |
half turns around the equilibrium before a big excursion |
| 13506 |
in phase space. Note that the variation of |
| 13507 |
$c$ is so small that it does not appear. |
| 13508 |
|
| 13509 |
A plot of $T_1$ vs. $\varepsilon_1$ gives insight into how the gap |
| 13510 |
is opened and closed in the continuation process. This is depicted in |
| 13511 |
Figure~\ref{shilgap}. |
| 13512 |
\begin{figure}[htb] |
| 13513 |
\begin{center} |
| 13514 |
\includegraphics[scale=0.5]{include/shilgap} |
| 13515 |
\caption{A plot of $\varepsilon_1$ as a function of $T_1$ |
| 13516 |
during our computation of Shil'nikov-type two-homoclinic orbits. |
| 13517 |
Each zero corresponds to a different orbit.} |
| 13518 |
\label{shilgap} |
| 13519 |
\end{center} |
| 13520 |
\end{figure} |
| 13521 |
We are now in a |
| 13522 |
position to continue each of these orbits as a |
| 13523 |
normal homoclinic orbit by setting \parf{ISTART=1} and |
| 13524 |
\parf{ITWIST=0}. We leave |
| 13525 |
this as an exercise to the reader. |
| 13526 |
|
| 13527 |
\section{ Branch switching to a 3-homoclinic orbit in |
| 13528 |
a 5th-order Korteweg-De Vries model} |
| 13529 |
|
| 13530 |
In \citeasnoun{ChGr:97} the following water wave model was considered: |
| 13531 |
\begin{equation} |
| 13532 |
\frac{2}{15}r''''-b r''+ar+\frac{3}{2}r^2- |
| 13533 |
\frac{1}{2}(r')^2+[rr']' = 0. |
| 13534 |
\label{cgode} |
| 13535 |
\end{equation} |
| 13536 |
It represents solitary-wave solutions $r(x+at)$, $r\to 0$ as $x\to |
| 13537 |
\pm\infty$ of the 5th-order PDE |
| 13538 |
\[ |
| 13539 |
r_t+\frac{2}{15}r_{xxxx}-b r_{xxx}+3r r_x+2 r_x r_{xx}+r r_{xxx=0}, |
| 13540 |
\] |
| 13541 |
where $a$ is the wave speed. |
| 13542 |
The ODE corresponds to a Hamiltonian system with Hamiltonian |
| 13543 |
\[ H=-\frac{1}{2}q_1^3-\frac{1}{2}a q_1^2+p_1 q_2-\frac{1}{2}b q_2^2+ |
| 13544 |
\frac{15}{4}p_2^2+\frac{1}{2}q_2^2 q_1 \] |
| 13545 |
and |
| 13546 |
\[q_1=r, \quad q_2=r', \quad p_1=-\frac{2}{15}r'''+br'-rr', \quad p_2=\frac{2}{15}r''.\] |
| 13547 |
System \eqref{cgode} is also reversible under the transformation |
| 13548 |
\[ t \mapsto -t, (q_1,q_2,p_1,p_2)\mapsto (q_1,-q_2,-p_1,p_2),\] |
| 13549 |
but we do not exploit the reversible structure (\parf{IREV=0}), and |
| 13550 |
instead use it as an example of Hamiltonian system. |
| 13551 |
This system exhibits an orbit flip for a reversible Hamiltonian system. |
| 13552 |
In Hamiltonian systems, homoclinic orbits are codimension-zero |
| 13553 |
phenomena, and we have to add an additional parameter $\lambda$ that breaks |
| 13554 |
the Hamiltonian structure in this system, by introducing artificial friction. |
| 13555 |
Thus, the actual system of equations that is |
| 13556 |
used for continuation is |
| 13557 |
\[\dot x=(\lambda I + J)\nabla H(x),\] |
| 13558 |
where $x=(q_1,q_2,p_1,p_2)$ and $J$ is the usual skew symmetric matrix |
| 13559 |
in $\mathbb{R}^4$. |
| 13560 |
It is now possible to continue a homoclinic orbit in {\cal HomCont} in two |
| 13561 |
parameters ($\lambda$ and either $a$ or $b$); see also |
| 13562 |
\citeasnoun{Be:90a}. |
| 13563 |
|
| 13564 |
An explicit solution exists for $a=3/5(2b+1)(b-2), b\geq -1/2$, and it is |
| 13565 |
given by |
| 13566 |
\[r(t)=3(b+\frac{1}{2})\mathrm{sech}^2\left([\frac{3}{4}(2b+1)]^{1/2}t\right).\] |
| 13567 |
It corresponds to a reversible orbit flip for $b>2$ ($a>0$) |
| 13568 |
We start from this explicit solution, using \parf{ISTART=2}, for $a=3$ and |
| 13569 |
$b=(\sqrt{65}+3)/4$: |
| 13570 |
|
| 13571 |
\begin{center} |
| 13572 |
\commandf{demo('kdv') }\\ |
| 13573 |
\commandf{r1=run('kdv',sv='1')} |
| 13574 |
\end{center} |
| 13575 |
\begin{verbatim} |
| 13576 |
BR PT TY LAB PAR(1) L2-NORM ... PAR(3) |
| 13577 |
1 1 EP 1 3.00000E+00 5.56544E+00 ... 0.00000E+00 |
| 13578 |
1 2 EP 2 3.04959E+00 5.49141E+00 ... -4.53380E-18 |
| 13579 |
\end{verbatim} |
| 13580 |
Here \parf{PAR(1)}=$a$, \parf{PAR(2)}=$b$, and |
| 13581 |
\parf{PAR(3)}=$\lambda$. We have only done a |
| 13582 |
very small continuation to give \AUTO a chance to create a good mesh |
| 13583 |
and avoid convergence problems later. |
| 13584 |
Next, we set \parf{ITWIST=1} and calculate the adjoint: |
| 13585 |
\begin{center} |
| 13586 |
\commandf{r2=run(r1,c='kdv.2',sv='2')} |
| 13587 |
\end{center} |
| 13588 |
\begin{verbatim} |
| 13589 |
BR PT TY LAB PAR(2) L2-NORM ... PAR(9) |
| 13590 |
1 2 EP 3 2.76557E+00 5.49141E+00 ... -3.12500E-04 |
| 13591 |
\end{verbatim} |
| 13592 |
We now need to move back to the orbit flip at $a=3$: |
| 13593 |
\begin{center} |
| 13594 |
\commandf{r3=run(r2,c='kdv.3',sv='3')} |
| 13595 |
\end{center} |
| 13596 |
\begin{verbatim} |
| 13597 |
BR PT TY LAB PAR(1) L2-NORM ... PAR(3) |
| 13598 |
1 14 UZ 5 3.00000E+00 5.47613E+00 ... 1.47725E-09 |
| 13599 |
\end{verbatim} |
| 13600 |
Now all preparations are done to start homoclinic branch |
| 13601 |
switching. This is very similar to the technique used in |
| 13602 |
Sandstede's model in Section~\ref{sec:HomCont_hbs_san}; |
| 13603 |
to find a 3-homoclinic orbit, we open 2 Lin gaps, |
| 13604 |
until $T_1=3.5$, while also varying $\lambda$=\parf{PAR(3)}. |
| 13605 |
\begin{center} |
| 13606 |
\commandf{r4=run(r3('UZ2'),c='kdv.4',sv='4')} |
| 13607 |
\end{center} |
| 13608 |
\begin{verbatim} |
| 13609 |
BR PT TY LAB PAR(3) ... PAR(21) PAR(22) PAR(24) |
| 13610 |
1 13 8 5.85315E-10 ... 1.65474E+01 -9.20183E-08 -6.11537E-07 |
| 13611 |
1 23 UZ 9 1.52986E-09 ... 9.85223E+00 -6.68578E-12 2.01956E-07 |
| 13612 |
1 26 10 4.09273E-09 ... 6.87525E+00 2.68679E-07 7.64502E-07 |
| 13613 |
1 33 UZ 11 2.15483E-06 ... 3.49999E+00 7.94022E-04 3.99104E-04 |
| 13614 |
\end{verbatim} |
| 13615 |
We then look for an orbit with $a<3$ and close the gap corresponding |
| 13616 |
to $\varepsilon_1$=\parf{PAR(22)}, for decreasing $a$. |
| 13617 |
\begin{center} |
| 13618 |
\commandf{r5=run(r4,c='kdv.5',sv='5')} |
| 13619 |
\end{center} |
| 13620 |
\begin{verbatim} |
| 13621 |
BR PT TY LAB PAR(2) ... PAR(3) PAR(22) PAR(24) |
| 13622 |
1 10 12 2.57977E+00 ... 2.15713E-06 7.65450E-04 3.82670E-04 |
| 13623 |
1 13 UZ 13 2.32044E+00 ... 3.86701E-11 1.13817E-10 1.58675E-08 |
| 13624 |
1 20 EP 14 -1.47788E-01 ... -9.46232E-04 -7.53666E-01 -3.43203E-01 |
| 13625 |
\end{verbatim} |
| 13626 |
and finally close the gap corresponding to $\varepsilon_2$=\parf{PAR(24)}, |
| 13627 |
\begin{center} |
| 13628 |
\commandf{r6=run(r5('UZ1'),c='kdv.6',sv='6')} |
| 13629 |
\end{center} |
| 13630 |
\begin{verbatim} |
| 13631 |
BR PT TY LAB PAR(2) ... PAR(3) PAR(23) PAR(24) |
| 13632 |
1 23 UZ 15 2.32044E+00 ... 3.30393E-12 1.48758E+01 -2.30540E-10 |
| 13633 |
1 35 16 2.31894E+00 ... -2.15192E-08 7.69389E+00 -1.07760E-05 |
| 13634 |
1 51 UZ 17 2.33846E+00 ... 2.57829E-07 3.48152E+00 1.29755E-04 |
| 13635 |
1 58 UZ 18 3.08085E+00 ... 2.28299E-12 3.50004E+00 -1.62266E-10 |
| 13636 |
\end{verbatim} |
| 13637 |
so that a three-homoclinic orbit is found. Here the zero at label |
| 13638 |
17 is the one we are looking for. Label 15 is a false positive since |
| 13639 |
$T_2=PAR(23)$ is still too high. At label 18, $a$=\parf{PAR(1)} |
| 13640 |
has changed |
| 13641 |
considerably to the extend that $a>3$ and a second 3-homoclinic orbit |
| 13642 |
is found. Note that for all zeros of \parf{PAR(24)}=$\varepsilon_2$, the |
| 13643 |
parameter $\lambda$=\parf{PAR(3)} is also zero (within \AUTO accuracy), |
| 13644 |
which it has to be to remain |
| 13645 |
within the original Hamiltonian system. |
| 13646 |
Setting \parf{ISTART=1}, a normal ``trivial'' continuation (with \parf{NMX=1}) |
| 13647 |
of the orbit corresponding to label 17 |
| 13648 |
lets {\cal HomCont} produce a proper concatenated |
| 13649 |
3-homoclinic orbit: |
| 13650 |
\begin{center} |
| 13651 |
\commandf{r7=run(r6('UZ2'),c='kdv.7',sv='7')} |
| 13652 |
\end{center} |
| 13653 |
\begin{verbatim} |
| 13654 |
BR PT TY LAB PAR(2) L2-NORM ... PAR(3) |
| 13655 |
1 1 EP 20 2.33846E+00 7.50835E+00 ... 2.57829E-07 |
| 13656 |
\end{verbatim} |
| 13657 |
This 3-homoclinic orbit is depicted in Figure~\ref{kdv3hom}. |
| 13658 |
\begin{figure}[htb] |
| 13659 |
\begin{center} |
| 13660 |
\includegraphics[scale=0.5]{include/kdv3hom} |
| 13661 |
\caption{A 3-homoclinic orbit in a 5th-order Hamiltonian |
| 13662 |
Korteweg-De Vries model.} |
| 13663 |
\label{kdv3hom} |
| 13664 |
\end{center} |
| 13665 |
\end{figure} |
| 13666 |
|
| 13667 |
%============================================================================== |
| 13668 |
%============================================================================== |
| 13669 |
|
| 13670 |
|
| 13671 |
\bibliography{include/auto} \label{sec:bibliography} |
| 13672 |
|
| 13673 |
|
| 13674 |
\end{document} |