// macro the get the current mesh size // parameter // in: Th the mesh // Vh P1 fespace on Th // out : // h: the Vh finite element finite set to the current mesh size macro MeshSizecomputation(Th,Vh,h){ /* Th mesh Vh P1 finite element space h the P1 mesh size value */ real[int] count(Th.nv); /* mesh size (lenEdge = $\int_e 1$) */ varf vmeshsizen(u,v)=intalledges(Th,qfnbpE=1)(v); /* number of edge / par vertex */ varf vedgecount(u,v)=intalledges(Th,qfnbpE=1)(v/lenEdge); /* computation of the mesh size ----------------------------- */ count=vedgecount(0,Vh); h[]=0.; h[]=vmeshsizen(0,Vh); cout << " count min = "<< count.min << " " << count.max << endl; h[]=h[]./count; cout << " -- bound meshsize = " <