#============== # AUTO Demo ops #============== pgm = "ops" print "\nDemo %s is started"%pgm print "\n%s : first run : locate a Hopf bifurcation"%pgm r1 = run(e=pgm,c=pgm) print "\n%s : second run : compute a branch of periodic solutions"%pgm uzr = {3: [0.92, 0.93]} r2 = run(r1("HB1"),IPS=2,ICP=[3,11],NMX=150,RL0=0.9,UZR=uzr,UZSTOP={}) save(r1+r2,'0') print "\n%s : third run : locate a 1-parameter extremum as a bifurcation"%pgm icp=[3,11,12,22,-22,-23,-31] r3 = run(r2("UZ1"),IPS=15,ILP=0,ICP=icp,ISP=2,NMX=25,ITNW=7,DS=-0.05) print "\n%s : fourth run : switch branches to generate adjoint variables"%pgm r4 = run(r3("BP1"),ISW=-1,ISP=0,NMX=5) save(r3+r4,'1') print "\n%s : fifth run : a 2-parameter branch of 1-parameter extrema"%pgm icp[1:3]=[2,11] uzr[22]=0.0 r5 = run(r4,ICP=icp,ISW=1,NMX=150,RL0=0.8,RL1=1.9,DS='-',UZR=uzr) save(r5,'2') print "\n%s : sixth run : a 3-parameter branch of 2-parameter extrema"%pgm icp[2:4]=[1,11] r6 = run(r5("UZ4"),IRS=15,ICP=icp,NTST=50,UZR={1:[0.1,0.05,0.01,0.005,0.001]}) save(r6,'3') print "\n***Clean the directory***" cl()