You have too many boundary conditions: dirichlet conditions on a rectangle
defaults to conditions on all 4 sides. Imposing on just the left side
gives an answer:
d = domain(Fun(identity,[0.0,1.0]))
f = Fun(x->exp(-x^2),d)
D = Derivative(d)
L = 2.0D⊗I+I⊗D
u = [ldirichlet(d)⊗I,L]\[f]
though you may need another boundary condition. to get the answer you are
looking for.
PS I'm more likely to see this if you post it as a git issue on ApproxFun's
github page.
On Sunday, April 12, 2015 at 12:10:24 AM UTC+10, idontgetoutmuch wrote:
>
> I am trying to solve a first order PDE to which I know the solution $2u_x
> + u_y = 0$ with boundary condition $u(x,0) = exp{-x^2}$. The solution is
> $exp{-(x-2t)^2}$. I have tried the code below
>
> Pkg.checkout("ApproxFun")
>
> using ApproxFun
>
> d = domain(Fun(identity,[0.0,1.0]))
>
> f = Fun(x->exp(-x^2),d)
>
> D = Derivative(d)
>
> L = 2.0D⊗I+I⊗D
>
> u = [dirichlet(d^2),L]\[f]
>
>
> but I get endless
>
> WARNING: Maximum number of iterations 100000 reached
> WARNING: Maximum number of iterations 100000 reached
> WARNING: Maximum number of iterations 100000 reached
>
> Any help would be gratefully received.
>
>