// example21.edp // from membranerror.edp // modified: plot error as field // all Dirichlet b.c. verbosity=0; real theta = 4.*pi/3.; real a=1., b=1.; // ellipse is a circle here border Gamma1(t=0.0,theta) { x = a * cos(t); y = b*sin(t); } border Gamma2(t=theta,2.0*pi) { x = a * cos(t); y = b*sin(t); } func f = -4.0*( cos(x^2 + y^2 - 1.0) - (x^2 + y^2)*sin(x^2 + y^2 - 1.0)); func phiexact = sin(x^2+y^2-1.0); load "Element_P3" // compute error on a sequence of meshes int meshes=4, mshdensity=1; real[int] L2error(meshes); for ( int n=0; n