% PDEONE - Solve one dimensional PDE's using ALGORITHM 494 PDEONE % % Written by: % -- % John L. Weatherwax 2005-12-17 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- %xGrid = 0:0.005:1; xGrid = unique( [ linspace(0,0.5,200+1), linspace(0.5,1.2,150+1) ] ); tGrid = [ 0 0.0001 0.0002 0.0003 0.0004 0.0005 0.002 0.006 ]; %tGrid = [ 0 0.0001 0.0002 0.0003 0.0004 0.0005 0.002 0.006 0.025 0.05 1.0 ]; [ U, opts ] = pdeone("F","D","BNDRY_ALPHA","BNDRY_BETA","BNDRY_GAMMA","elliptic_init", ... "dt", 10^(-9), "eps", 10^(-4), "xGrid", xGrid, "tGrid", tGrid ); tGrid = opts.tGrid; xGrid = opts.xGrid; close all; ntouts = length(tGrid); h=figure; for nti=1:ntouts, figure(h); plot( xGrid, U(1,:,nti) ); grid; %title( [ 'U(1) at t(',num2str(nti),')' ] ); hold on; %pause; end save -v6 "EGC_sol.mat" U xGrid tGrid;