![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/293625/image.png)
initmesh: 'Hmax' parameter is not an upper bound on edge lengths
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
darova
2020-5-17
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)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/293625/image.png)
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!