LaplaceP4.edp

load "Element_P4" 
load "Element_P3" 
load "qf11to25" 


mesh Th=square(10,10); 
verbosity=4; 

for (int i=1;i<=26;i++) 
{ 
  cout <<" int1d order= "<< i ; 
  int1d(Th,qforder=i)(1.); 
} 

for (int i=1;i<=26;i++) 
{ 
 cout <<" int2d order= "<< i ; 
  int2d(Th,qforder=i)(1.); 
} 

verbosity=1; 

 fespace Vh(Th,P4);     // P1 FE space 
 Vh uh,vh;              // unkown and test function. 
 func f=1;                 //  right hand side function 
 func g=0;                 //  boundary condition function 

 problem laplace(uh,vh) =                    //  Definion of  the problem 
    int2d(Th,qft=qf11pT)( dx(uh)*dx(vh) + dy(uh)*dy(vh) ) //  bilinear form 
  - int2d(Th,qft=qf25pT)( f*vh )                          //  linear form 
  + on(1,2,3,4,uh=g) ;                      //  boundary condition form 

  laplace; // solve the problem plot(uh); // to see the result 
  plot(uh,ps="LaplaceP4.eps",value=true);