load "Element_P4"; load "Element_P3"; int nn = 50; mesh Th=square(nn,nn); plot(Th,wait=1); macro grad(w) [dx(w),dy(w)] // EOM: End Of Macro. Column Vector fespace Vh(Th,P4); Vh u,v; // Definition des fonctions f et g (-Delta u = f on \Omega, u = g on \Gamma.) func f = -1.0; func g = 0.0; // Implement Solver solve Poisson(u,v) = int2d(Th)(grad(u)'*grad(v)) - int2d(Th)(f*v) + on(1,2,3,4, u=g); // Graphical Representation plot(u, wait=1,dim=3,fill=1,value=1,cmm="min value = "+u[].min); // Dim : 2=>isolines, 3=>3d function, Fill: 0=> isolines, 1=> color, value (boolean) = affiche l'echelle, cmm = affiche des infos dans l'angle haut gauche. // plot(u, wait=1,rstr=5); // use a wrong parameter to get the list of available parameters in terminal.