plot-fb-P4.edp

load "Element_P4" 
load "msh3" 
load "medit" 
mesh Th=square(1,1); 
plot(Th,wait=1); 
mesh th=square(150,150); 
fespace Vh(Th,P4); 
fespace Wh(th,P1); 
func p9=x*x*x+2*y*y*y+3*x*x*y+4*x*y*y+5*x*x+6*x*y+7*y*y+8*x+9*y+10; 
func p9x=3 * x * x + 6 * x * y + 4 * y * y + 10 * x + 6 * y + 8; 
func p9y=6 * y * y + 3 * x * x + 8 * x * y + 6 * x + 14 * y + 9; 
func p9yy= 12 * y + 8 * x + 14; 
func p9xx=6 * x + 6 * y + 10; 
func p9xy=6 * x + 8 * y + 6; 



Vh vi=p9; 

cout << " 0.2,0.1 : " << vi(0.2,0.1)<<  " " << p9(0.2,0.1) << endl; 
cout << " 0.2,0.1 : " << dx(vi)(0.2,0.1)<<  " " << p9x(0.2,0.1) << endl; 
cout << " 0.2,0.1 : " << dy(vi)(0.2,0.1)<<  " " << p9y(0.2,0.1) << endl; 
cout << " 0.2,0.1 : " << dxx(vi)(0.2,0.1)<<  " " << p9xx(0.2,0.1) << endl; 
cout << " 0.2,0.1 : " << dyy(vi)(0.2,0.1)<<  " " << p9yy(0.2,0.1) << endl; 
cout << " 0.2,0.1 : " << dxy(vi)(0.2,0.1)<<  " " << p9xy(0.2,0.1) << endl; 
vi=0; 
if(!NoUseOfWait) 
  for (int i=0;i<min(vi[].n,5);++i) 
 { 
    vi[][i]=1; 
    vi; 
    plot(vi,wait=0,cmm=" v"+i); 
    mesh3 Th3= movemesh23(th,transfo=[x,y,vi*0.5]); 
    medit("mm",Th3); 
    vi=vi; 
    cout << i << " vi = "<< vi[]<<endl; 
    vi[]=0; 

 }