| 1 |
# This is a sample AUTO-07P script file. This file uses the |
| 2 |
# entire AUTO-07P command set, except for the plotting commands. |
| 3 |
# Accordingly, some of the command sequences are not optimal |
| 4 |
# (i.e. some of the same functionality can be accomplished |
| 5 |
# with fewer commands). |
| 6 |
|
| 7 |
# The next two commands are sent to the shell |
| 8 |
! rm -rf test |
| 9 |
! mkdir test |
| 10 |
# Go into the newly created test directory |
| 11 |
cd test |
| 12 |
# Copy the wav demo into the current directory. This command |
| 13 |
# also loads in the problem definition file wav.c and the |
| 14 |
# constants file c.wav. Basically, the 'dm' command is |
| 15 |
# the concatenation of the 'copyDemo' command and the |
| 16 |
# 'ld' command |
| 17 |
dm("wav") |
| 18 |
# Check what files are in the current directory |
| 19 |
ls |
| 20 |
# Print out the short online help for all the commands |
| 21 |
man |
| 22 |
# Print out the long online help for the 'run' command |
| 23 |
man run |
| 24 |
# Print out the contents of the c.wav.1 file |
| 25 |
cat c.wav |
| 26 |
# Load the files wav.c, c.wav, s.wav, and h.wav into the AUTO |
| 27 |
# command interpretor. If either the s.wav or the h.wav file |
| 28 |
# does not exist it is silently ignored, since they are not |
| 29 |
# necessarily required to run AUTO. NOTE: in this case this |
| 30 |
# command is not needed since its functionality is included |
| 31 |
# in the 'dm' command. It is put here for clarity. |
| 32 |
ld("wav") |
| 33 |
# This loop runs the AUTO using each of the constants files |
| 34 |
# c.wav.2, c.wav.3, c.wav.4, and c.wav.5. The |
| 35 |
# results of each computation are appended to the file s.wav, |
| 36 |
# which is read back in to provide starting data for the |
| 37 |
# next calculation. Note the Python syntax 'c="wav.%d"%i', which |
| 38 |
# use to generate the constants file names. |
| 39 |
for i in range(2,5): |
| 40 |
rn(c="wav.%d"%i,s="wav") |
| 41 |
ap("wav") |
| 42 |
# Remove all files from the current directory. |
| 43 |
! rm -f * |
| 44 |
# We set a Python variable to contain the name of the next |
| 45 |
# demo we want to run. |
| 46 |
cir = "cir" |
| 47 |
# We copy and load the demo files. |
| 48 |
dm(cir) |
| 49 |
# The 'cir' demo is somewhat non-standard in that it uses |
| 50 |
# a tabulated file of values for initial data. This command |
| 51 |
# takes that file and creates a AUTO input file from it. |
| 52 |
us(cir) |
| 53 |
# Again, this command is strictly redundant, but is here to |
| 54 |
# show the different ways that files may be loaded into |
| 55 |
# the interface. First you may use a 'ld' command with a single |
| 56 |
# argument to load in the standard files cir.c, c.cir, s.cir, and h.cir. |
| 57 |
ld(cir) |
| 58 |
# Or, you may load in the files are part of the 'run' command |
| 59 |
# itself. In this case we have used the extended form, in which |
| 60 |
# each filename is given individually. This command loads in |
| 61 |
# the files c.cir1, and s.dat and then runs AUTO. |
| 62 |
rn(c="cir.1",s="dat") |
| 63 |
# Or, you may run without defining any files, and this will |
| 64 |
# use whatever files were loaded last. |
| 65 |
run() |
| 66 |
# We save the data in s.cir |
| 67 |
sv(cir) |
| 68 |
# These commands print out various values associated with |
| 69 |
# solutions to the problem. |
| 70 |
|
| 71 |
# The pseudo arclength step-size. |
| 72 |
st(cir) |
| 73 |
# The 'secondary periodic' function |
| 74 |
sc(cir) |
| 75 |
# Any notes that AUTO entered in the diagnostic file |
| 76 |
nt(cir) |
| 77 |
# The 'limit point' function |
| 78 |
lm(cir) |
| 79 |
# The number of iterations required for convergence |
| 80 |
it(cir) |
| 81 |
# The 'Hopf bifurcation' function |
| 82 |
hp(cir) |
| 83 |
# The Floquet multipliers |
| 84 |
fl(cir) |
| 85 |
# The eigenvalues of the Jacobian (for algebraic problems) |
| 86 |
eg(cir) |
| 87 |
# The 'branch point' function |
| 88 |
br(cir) |
| 89 |
# Clean the directory by removing fort.*, o.*, and *.exe |
| 90 |
cl() |
| 91 |
# Now remove everything else |
| 92 |
! rm -f * |
| 93 |
# Set a new variable with the name of a third demo. |
| 94 |
demo = "ab" |
| 95 |
# Copy and load the demo. |
| 96 |
dm(demo) |
| 97 |
# Delete all d.*, b.*, and s.* files |
| 98 |
dl(demo) |
| 99 |
# Load just the constants file c.ab.1 and leave the rest of the loaded files |
| 100 |
# the same. |
| 101 |
ld(constants="ab.1") |
| 102 |
# Run the demo |
| 103 |
run() |
| 104 |
# Change the constant RL1 to have the value 0.4 |
| 105 |
ch("RL1",0.4) |
| 106 |
# And run the demo again. |
| 107 |
run() |
| 108 |
# Save the results into d.ab, s.ab, and b.ab (since demo='ab') |
| 109 |
sv(demo) |
| 110 |
# Append another copy of the data into the same files |
| 111 |
ap(demo) |
| 112 |
# Run the demo, but changing the constants file to c.ab.2 and the |
| 113 |
# solution file to s.ab |
| 114 |
run(constants="ab.2",solution="ab") |
| 115 |
# Copy the files d.ab, s.ab, and b.ab to d.double, s.double, and b.double |
| 116 |
cp(demo,"double") |
| 117 |
# 'Double' the solutions in d.double, s.double, and b.double. This |
| 118 |
# is used to compute period doubling bifurcations. |
| 119 |
db("double") |
| 120 |
# Move the files d.double, s.double, and b.double to |
| 121 |
# d.triple, s.triple, and b.triple |
| 122 |
mv("double","triple") |
| 123 |
# 'Triple' the solutions in d.triple, s.triple, and b.triple. This |
| 124 |
# is used to compute period tripling bifurcations. |
| 125 |
tr("triple") |
| 126 |
# Parse the data in fort.8 and return a Python object containing |
| 127 |
# the data |
| 128 |
data=sl() |
| 129 |
# Parse the data in fort.7 and return a Python object containing |
| 130 |
# the data |
| 131 |
data=dg() |
| 132 |
# Parse the data in fort.7 and fort.8 and return a Python object containing |
| 133 |
# the data |
| 134 |
data=bt() |
| 135 |
# Clean the directory |
| 136 |
! rm -rf * |
| 137 |
# Go up one directory level |
| 138 |
cd .. |
| 139 |
# Remove the test directory |
| 140 |
! rmdir test |
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|