initmesh: 'Hmax' parameter is not an upper bound on edge lengths
5 views (last 30 days)
Show older comments
Hi all,
I am using initmesh() to generate a 2D-mesh in order to discretize a PDE-problem. The parameter 'Hmax' of this matlab function can be used to bound the edge lengths of the triangulation. Beeing precise, the documentation of initmesh() says:
"The Hmax property controls the size of the triangles on the mesh. initmesh creates a mesh where triangle edge lengths are approximately Hmax or less."
However, an easy example on the domain D=[0,1]^2 with Hmax=1 shows, that this is not the case: the generated mesh includes the triangle [0,0] - [1,0] - [0,1] with maximum edge length sqrt(2).
Code:
b1=0;b2=1; d0=decsg([3 4 b1 b2 b2 b1 b1 b1 b2 b2]');
[points,edges,triCL]=initmesh(d0,'Hmax',1,'MesherVersion','R2013a');
pdemesh(points,edges,triCL)
Indeed, after a few experiments it seems like the parameter 'Hmax' is a treshold on the max-min-edge length, i.e. it seems to be a bound on max(h_min(T)) over all triangles T in the triangulation, where h_min(T) denotes the minimal edge length of the triangle T.
Is there a reason for this? Do I misunderstand something?
Thank you in advance!
2 Comments
darova
on 17 May 2020
Maybe Hmax controls smaller edges of the triangle
b1 = 0;
b2 = 1.01;
d0 = decsg([3 4 b1 b2 b2 b1 b1 b1 b2 b2]');
[p,e,t] = initmesh(d0,'Hmax',1,'MesherVersion','R2013a');
pdemesh(p,e,t)
Answers (0)
See Also
Categories
Find more on Geometry and Mesh in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!