Dear all,
I did mesh adaption by mmg3d, the same code has different results on different PCs. In windows with FreeFem v4.10 and Mac with v4.12,
the mesh can be adapted, be refined near the edge (y==0);
but in Ubuntu 20.04 with ff v4.12, the mmg3d did not change the mesh.
One of my colleague also checked in his Linux with v4.12, the mesh was not changed.
The following is my simple example:
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);
Thanks!
Y.H.
Examplemmg.edp (728 Bytes)