Debian Codegraph @

07p/demos/fnc/fnc.auto

raw
1
2 #==============
3 # AUTO Demo fnc
4 #==============
5
6 pgm = "fnc"
7 print "\nDemo %s is started"%pgm
8
9 cd("attr")
10 auto("attr.auto")
11 attr = loadbd("attr")
12 cd("..")
13
14 cd("rep")
15 auto("rep.auto")
16 rep = loadbd("rep")
17 cd("..")
18
19 # for plotting attracting and repelling manifolds
20 save(rl(attr+rep),'attrrep')
21
22 pgm = "fnc" #reinitialize
23 dl("xis")
24 for i in [3,4,5,6,7,8]:
25 print "calculating orbit for xi"+str(i)
26 uzlabel = "UZ"+str(i-2)
27 sola = attr(uzlabel)
28 solr = rep(uzlabel)
29
30 Ta = sola.PAR["Ta"]
31 Tr = solr.PAR["Tr"]
32 Tc = Ta + Tr
33
34 # concatenate manifold coordinates and rescale t
35 t = ([(ti * Ta)/Tc for ti in sola["t"][:-1]] +
36 [(ti * Tr + Ta)/Tc for ti in solr["t"]])
37 v = list(sola["v"][:-1]) + list(solr["v"])
38 h = list(sola["h"][:-1]) + list(solr["h"])
39 s = list(sola["s"][:-1]) + list(solr["s"])
40 u = [t,v,h,s]
41
42 p = {}
43 for j in ["epsilon","gamma","delta","va0","ha0"]:
44 p[j] = sola.PAR[j]
45 p["sr1"] = solr.PAR["sr1"]
46 p["Tc"] = Tc
47
48 rmin = run(u,e=pgm,c=pgm,PAR=p)
49 rplus = run(u,e=pgm,c=pgm+".epsplus",PAR=p)
50 r = merge(rmin+rplus)
51 save(r,"xi"+str(i))
52 append(r,"xis")
53
54 rl("xis")
55 print "\n***Clean the directory***"
56 cl()