// -*- FreeFem++ -*- // Time-stamp: "2019-03-16 18:49:26 fujiwara" // // Example from K.Ohtsuka, T.Takaishi, ISBN 978-4-320-01953-9, p.36, example 4 // http://comfos.org/jp/ffempp/book/ border ba(t=0,1.0) { x=t; y=0; label=1; }; border bb(t=0,0.5) { x=1; y=t; label=1; }; border bc(t=0,0.5) { x=1-t; y=0.5; label=1; }; border bd(t=0.5,1) { x=0.5; y=t; label=1; }; border be(t=0.5,1) { x=1-t; y=1; label=1; }; border bf(t=0.0,1) { x=0; y=1-t; label=1; }; int m = 1; mesh Th = buildmesh( ba(6*m)+bb(4*m)+bc(4*m)+bd(4*m)+be(4*m)+bf(6*m) ); fespace Vh(Th,P2); Vh u,v; func f = -1; solve Poisson(u,v) = int2d(Th)(dx(u)*dx(v)+dy(u)*dy(v)) - int2d(Th)(f*v) + on(1,u=0); //plot(u,ps="Lshape.ps"); load "plotGnuplot" bool ret = plotGnuplot(u,Th,"plotGnuplot-result",index=true,fontscale=0.5); assert( ret == true ); // Error check. // End of file