load "msh3" load "medit" load "aniso" load "mmg" load "mshmet" include "cube.idp" int[int] Nxyz=[10,10,3]; real [int,int] Bxyz=[[0.,0.06],[0.,0.06],[0.,0.0015]]; int [int,int] Lxyz=[[1,1],[2,2],[2,2]]; mesh3 Th=Cube(Nxyz,Bxyz,Lxyz); fespace Ph6(Th,[P1,P1,P1,P1,P1,P1]); Ph6 [m11,m21,m22,m31,m32,m33]; real errh,hmax,hmin,adaptratio; errh = 1e-3; hmax = 0.01; hmin =1e-7 ;adaptratio = 1.5; real epsilon = 0.002; fespace Ph(Th,P1); Ph p = -(2*tanh(y/(epsilon))-1); real[int] hmetric(6*Th.nv); hmetric=mshmet(Th,p,normalization=1,aniso=1,nbregul=1,hmax=hmax,hmin=hmin,err=errh); boundaniso(6,hmetric,40); m11[]=hmetric; mesh3 Th3=mmg3d(Th,mem=10000,metric=m11[],hmax = hmax,hmin = hmin); medit("init",Th); medit("after",Th3);