next up previous contents
Next: Scripting Up: Running AUTO using Python Previous: General Overview.   Contents


First Example

We begin with a simple example of the AUTO CLUI. In this example we copy the ab demo from the AUTO installation directory and run it. For more information on the ab demo see Section 12.8. The commands listed in Table 4.2 will copy the demo files to your work directory and run the first part of the demo. The results of running these commands are shown in Figure 4.2.


Table 4.2: Running the demo ab files.
Unix-COMMAND ACTION
auto start the AUTO CLUI
AUTO CLUI COMMAND ACTION
copydemo('ab') copy the demo files to the work directory
load(equation='ab') load the filename ab.f into memory
load(constants='ab.1') load the contents of the file c.ab.1 into memory
run() run AUTO with the current set of files
 


\begin{figure}
% latex2html id marker 573
{\small\begin{center}\begin{boxedverb...
...he rest of the commands are interpreted by
the {\cal AUTO}~CLUI.}
\end{figure}

Let us examine more closely what action each of the commands performs. First, copydemo('ab') (Section 4.14.7 in the reference) copies the files in $AUTO_DIR/demo/ab into the work directory.

Next, load(equation='ab') (Section 4.14.34 in the reference) informs the AUTO CLUI that the name of the user defined function file is ab.f. The command load is one of the most commonly used commands in the AUTO CLUI, since it reads and parses the user files which are manipulated by other commands. The AUTO CLUI stores this setting until it is changed by a command, such as another load command. The idea of storing information is one of the ideas that sets the CLUI apart from the command language described in Section 5.

Next, load(constants='ab.1') parses the AUTO  constants file c.ab.1 and reads it into memory. Note that changes to the file c.ab.1 after it has been loaded in will not be used by AUTO unless it is loaded in again after the changes are made.

Finally, run() (Section 4.14.31 in the reference) uses the user defined functions loaded by the load(equation='ab') command, and the AUTO constants loaded by the load(constants='ab.1') to run AUTO .

Figure 4.2 showed two of the file types that the load command can read into memory, namely the user defined function file and the AUTO constants file (Section 3). There are two other files types that can be read in using the load command, and they are the restart solution file (Section 6) and the HomCont parameter file (Section 20.2).

Note that the name given to the load command is not the same as the filename which is read in, for example load(constants='ab.1') reads in the file c.ab.1. This difference is a result of the automatic transformation of the filenames by the AUTO CLUI into the standard names used by AUTO . The standard filename transformations are show in Table 4.3.


Table 4.3: This table shows the standard AUTO CLUI filename translations. In load and run commands either the long name or the short name may be used for loading the appropriate files.
Long name Short name Name entered Transformed file name
equation e foo foo.c
constants c foo c.foo
solution s foo s.foo
bifurcationDiagram b foo b.foo
diagnostics d foo d.foo
homcont h foo h.foo


Since the load command is so common, there are various shorthand versions of it. First, there are short versions of the various arguments as shown in Table 4.3. For example, the command load(constants='ab.1') can be shortened to load(c='ab.1'). Next, several different files may be loaded at once using the same load command. For example, the two commands in Figure 4.3 have the same effect as the single command in Figure 4.4.

\begin{figure}
% latex2html id marker 624
{\small\begin{center}\begin{boxedverb...
...[Loading two files individually] {Loading two files individually.}
\end{figure}

\begin{figure}
% latex2html id marker 632
{\small\begin{center}\begin{boxedverb...
... two files at the same time] {Loading two files at the same time.}
\end{figure}

Also, since it is common that several files will be loaded that have the same base name load('ab') performs the same action as load(e='ab',c='ab',s='ab',h='ab'). Note, for the command load('ab') it is only required that ab.f and c.ab exist; s.ab and h.ab are optional, and if they do not exist, no error message will be given.


next up previous contents
Next: Scripting Up: Running AUTO using Python Previous: General Overview.   Contents
Gabriel Lord 2007-11-19