| 1 |
|
| 2 |
#============================================ |
| 3 |
# AUTO Demo r3b: Computing unstable manifolds |
| 4 |
#============================================ |
| 5 |
|
| 6 |
import os,data |
| 7 |
|
| 8 |
if not os.path.exists('s.H1'): |
| 9 |
auto('r3b.auto') |
| 10 |
|
| 11 |
print "\n*** Compute the Floquet eigenfunction***" |
| 12 |
H1 = loadbd('H1') |
| 13 |
flq = run(H1(7),c='r3b.flq',sv='flq') |
| 14 |
|
| 15 |
print "\n*** Extract data for the selected orbit from s.flq***" |
| 16 |
startman = data.get(flq('UZ1'),eps=-1e-3) |
| 17 |
|
| 18 |
print "\n*** Time integration using continuation***" |
| 19 |
startH1a = run(startman,e='man',c='man.H1a.0',sv='startH1a') |
| 20 |
|
| 21 |
print "\n*** Compute part of the unstable manifold***" |
| 22 |
startUZs = startH1a('UZ') |
| 23 |
startUZ = startUZs[0] |
| 24 |
for s in startUZs: |
| 25 |
# find minimum |
| 26 |
if abs(s.PAR(21)) < abs(startUZ.PAR(21)): |
| 27 |
startUZ = s |
| 28 |
H1a = run(startUZ,c='man.H1a.1') |
| 29 |
save(rl(H1a),'H1a') |
| 30 |
|
| 31 |
print "\n***Clean the directory***" |
| 32 |
clean() |
| 33 |
|