}) # Solve the profile p, s = profile_flux(p, sol) x = np.linspace(s['L'], s['R'], 200) y = soln(x, s) # Plot the profile plt.figure("Profile") plt.plot(x, y) plt.show() s, e, m, c = emcset(s, 'front', [2, 2], 'reg_adj_compound', A, Ak) circpnts, imagpnts, innerpnts = 30, 30, 32 r = 1 spread = 4 zerodist = 10**(-4) # ksteps, lambda_steps = 32, 0 preimage = semicirc(circpnts, imagpnts, c['ksteps'], r, spread, zerodist) out, domain = Evans_compute(preimage, c, s, p, m, e) out = out / out[0] w = reflect_image(out) windnum = winding_number(w) print('Winding Number: {:f}\n'.format(windnum)) Evans_plot(w)
# This choice solves the right hand side via exterior products s, e, m, c = emcset(s, 'front', [2, 2], 'adj_reg_compound', A, Ak) # display a waitbar c.stats = 'print' # 'on', 'print', or 'off' c.ksteps = 2**8 # Preimage Contour # This is a semi circle. You can also do a semi annulus or a rectangle circpnts = 30 imagpnts = 30 R = 10 spread = 2 zerodist = 10**(-2) preimage = semicirc(circpnts, imagpnts, c.ksteps, R, spread, zerodist) # compute Evans function halfw, domain = Evans_compute(preimage, c, s, p, m, e) w = halfw / halfw[0] # We compute Evans function on half of contour then reflect across reals w = reflect_image(w) # Process and display data wnd = winding_number(w) # determine the number of roots inside the contour print("Winding Number: ", wnd) # plot the Evans function (normalized) Evans_plot(w)
# set STABLAB structures to local default values # default for Burgers is reg_reg_polar s['A'] = A s, e, m, c = emcset(s,'front',[1,1],'default') # Create the Preimage Contour circpnts, imagpnts, innerpnts = 20, 20, 5 r = 10 spread = 4 zerodist = 10**(-2) # Can set custom ksteps and lambda_steps here, if desired # ksteps, lambda_steps = 32, 0 preimage = semicirc2(circpnts, imagpnts, innerpnts, c['ksteps'], r,spread,zerodist,c['lambda_steps']) # plot the preimage plt.title("Preimage") plt.plot(np.real(preimage), np.imag(preimage)) plt.show() # Compute the Evans function halfw, domain = Evans_compute(preimage,c,s,p,m,e) # Normalize the solution halfw = halfw/halfw[0] w = reflect_image(halfw) windnum = winding_number(w) Evans_plot(w) plt.show()
}) p, s = profile_flux(p, sol) x = np.linspace(s['L'], s['R'], 200) y = soln(x, s) plt.figure("Profile") plt.plot(x, y) plt.show() # set STABLAB structures to local default values #s, e, m, c = emcset(s, 'front', [2,3], 'reg_adj_compound', A, A_k) s, e, m, c = emcset(s, 'front', [2, 3], 'reg_reg_polar', A) circpnts, imagpnts, innerpnts = 20, 30, 5 r = 10 spread = 4 zerodist = 10**(-2) # ksteps, lambda_steps = 32, 0 preimage = semicirc2(circpnts, imagpnts, innerpnts, c['ksteps'], r, spread, zerodist, c['lambda_steps']) pre_w, preimage = Evans_compute(preimage, c, s, p, m, e) pre_w = pre_w / pre_w[0] w = reflect_image(pre_w) windnum = winding_number(w) Evans_plot(w) plt.show()
m.options['RelTol'] = 1e-9 # display a waitbar c.stats = 'print' # 'on', 'print', or 'off' c.ksteps = 2**6 # Preimage Contour # This is a semi circle. You can also do a semi annulus or a rectangle circpnts = 30 imagpnts = 10 innerpts = 10 R = 1 spread = 2 zerodist = .0001 preimage = stablab.semicirc2(circpnts, imagpnts, innerpts, c.ksteps, R, spread, zerodist) # compute Evans function halfw, domain = stablab.Evans_compute(preimage, c, s, p, m, e) w = halfw / halfw[0] # We compute the Evans function on half of contour then reflect w = stablab.reflect_image(w) # process and display data wnd = stablab.winding_number( w) # determine the number of roots inside the contour print('Winding Number: {:f}\n'.format(wnd)) # plot the Evans function (normalized) stablab.Evans_plot(w)
}) # Solve the profile p,s = profile_flux(p,sol) x = np.linspace(s['L'],s['R'],200) y = soln(x,s) # Plot the profile plt.figure("Profile") plt.plot(x,y) plt.show() s, e, m, c = emcset(s,'front',[2,2],'reg_adj_compound',A,Ak) circpnts, imagpnts, innerpnts = 30, 30, 32 r = 1 spread = 4 zerodist = 10**(-4) # ksteps, lambda_steps = 32, 0 preimage = semicirc(circpnts, imagpnts, c['ksteps'], r, spread, zerodist) out, domain = Evans_compute(preimage,c,s,p,m,e) out = out/out[0] w = reflect_image(out) windnum = winding_number(w) print('Winding Number: {:f}\n'.format(windnum)) Evans_plot(w)
}) p,s = profile_flux(p,sol) x = np.linspace(s['L'],s['R'],200) y = soln(x,s) plt.figure("Profile") plt.plot(x,y) plt.show() # set STABLAB structures to local default values #s, e, m, c = emcset(s, 'front', [2,3], 'reg_adj_compound', A, A_k) s, e, m, c = emcset(s,'front',[2,3],'reg_reg_polar',A) circpnts, imagpnts, innerpnts = 20, 30, 5 r = 10 spread = 4 zerodist = 10**(-2) # ksteps, lambda_steps = 32, 0 preimage = semicirc2(circpnts, imagpnts, innerpnts, c['ksteps'], r,spread,zerodist,c['lambda_steps']) pre_w,preimage = Evans_compute(preimage,c,s,p,m,e) pre_w = pre_w/pre_w[0] w = reflect_image(pre_w) windnum = winding_number(w) Evans_plot(w) plt.show()
# set STABLAB Structs to local default values #s,e,m,c = emcset(s,'front',[2,2],'reg_reg_polar') #s,e,m,c = emcset(s,'front',[2,2],'reg_adj_polar') #s,e,m,c = emcset(s,'front',[2,2],'adj_reg_polar') s,e,m,c = emcset(s,'front',[2,2],'reg_adj_compound') # display a waitbar c.stats = 'print' # Preimage points = 50 preimage = 0.16+0.05*np.exp(2*np.pi*1j*np.linspace(0,0.5,points+(points-1)*c.ksteps)) #FIXME: this line could probably be easier to understand # Compute the Evans function halfw,preimage = Evans_compute(preimage,c,s,p,m,e) w = reflect_image(halfw) # Normalize the Evans Output w = w/w[0] # Process and display data: wnd = winding_number(w) print("Winding Number: {:f}\n".format(wnd)) Evans_plot(w) plt.show() #Set variables in preparation for root solving c.lambda_steps = 0 c.stats = 'off' c.pic_stats = 'on' c.ksteps = 2**8 c.moments = 'off'