| 1 |
#=============== |
| 2 |
# AUTO Demo cusp |
| 3 |
#=============== |
| 4 |
|
| 5 |
# Load the files cusp.f90 and c.cusp into the AUTO |
| 6 |
# command interpreter. |
| 7 |
cusp = load('cusp') |
| 8 |
# Run and store the result in the Python variable mu |
| 9 |
mu = run(cusp) |
| 10 |
# Run backwards, and append to mu |
| 11 |
mu = mu + run(cusp,DS='-') |
| 12 |
# Relabel solutions |
| 13 |
mu = relabel(mu) |
| 14 |
# Save to b.mu, s.mu, and d.mu |
| 15 |
save(mu,'mu') |
| 16 |
# Plot bifurcation diagram |
| 17 |
p = plot(mu) |
| 18 |
p.config(bifurcation_y=['x']) |
| 19 |
# Set the new start label to the first LP label in b.mu and s.mu |
| 20 |
lp1 = load(mu('LP1'), ISW=2) |
| 21 |
# Continue from this label in two parameters |
| 22 |
cusp = run(lp1) |
| 23 |
cusp = cusp + run(lp1,DS='-') |
| 24 |
# save to b.cusp, s.cusp, and d.cusp |
| 25 |
save(cusp,'cusp') |
| 26 |
# Plot the cusp |
| 27 |
p = plot(cusp) |
| 28 |
p.config(bifurcation_y=['lambda']) |
| 29 |
#clean the directory |
| 30 |
clean() |
| 31 |
wait() |