In [5]:
using Plots,ApproxFun,Interact,Reactive;
gr();
In [9]:
d=Interval()^2
u0 = ProductFun((x,y)->exp(-40(x-.1)^2-40(y+.2)^2),d)
B=dirichlet(d);D=Derivative(Interval())
L=(0.01D^2-4D)⊗I + I⊗(0.01D^2-3D)
glp=Signal(u0);map(f->surface(f;nlevels=20,xlims=(-1.,1.),ylims=(-1.,1.)),glp)
Out[9]:
In [10]:
u0=BDF4(B,L,u0,0.002,150,glp);
In [11]:
d=Interval()^2
# initial condition
u0 = ProductFun((x,y)->exp(-50x^2-50y^2),d)
B= dirichlet(d);Δ=Laplacian(d);
glp=Signal(u0);map(f->surface(f,nlevels=20,xlims=(-1.,1.),ylims=(-1.,1.)),glp)
Out[11]:
In [12]:
u0=BDF22(B,Δ,u0,0.004,200,glp);
In [14]:
d=Interval()^2
u0 = ProductFun((x,y)->exp(-50x^2-50y^2),d)
B= dirichlet(d);L=Laplacian(d)-I;g(u)=u-sin(u)
glp=Signal(u0);map(u->surface(u;xlims=(-1.,1.),ylims=(-1.,1.)),glp)
Out[14]:
In [15]:
u0=BDF22(B,L,g,u0,0.004,300,glp);