testio.edp

load "gmsh" 
load "iovtk" 
load "medit" 
verbosity = 1; 

// example gmsh 

mesh3 Th = gmshload3("cube.msh"); 
//medit("gmsh3d",Th,wait=1); 

// example iovtk 

border Gamma(t=0,2*pi){x=cos(t);y=sin(t);label=3;} 
border Gamma1(t=0,2*pi){x=2*cos(t);y=2*sin(t);label=5;} 
mesh Th2 = buildmesh( Gamma(10)+Gamma1(20) ); 

fespace Vh(Th2,P1);     // P1 FE space 
func gg=x; 
Vh uh,vh,u; 
Vh ggg=gg; 
solve laplacep(uh,vh,solver=CG,tgv=1e5) =      //  definion of  the problem 
    int2d(Th2)( dx(uh)*dx(vh) + dy(uh)*dy(vh) )   //  bilinear form 
       + on(3,uh=1)+ on(5,uh=2) ;                        //  boundary condition form 

cout << "vtk information" << endl; 
int[int] fforder=[0,0,1,0,1]; 
savevtk("disque.vtk",Th2,uh,ggg,uh,[uh,ggg],[uh,ggg],dataname="kkdjd jyqql bidule45 vector nnn nn44233T",order=fforder); 


mesh3 Th3=readmesh3("spherewithtworegion.mesh"); // This .mesh file is obtaing with tetgenholeregion.edp 
fespace Vh3(Th3,P1);     // P1 FE space 
func gg2=x+y; 
int[int] fforder2=[0,0,1,1]; 
verbosity=6; 
savevtk("bidule.vtk",Th3,gg2,[gg2,gg2,gg2],gg2,[gg2,gg2,gg2],order=fforder2,dataname="kkdjd jyqql bidule45"); // The fourth solution Have no name. This name is vector4 (4 ==> fourth solution and vector ==> vector solution).