initmesh: 'Hmax' parameter is not an upper bound on edge lengths

5 visualizzazioni (ultimi 30 giorni)
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 Commenti
darova
darova il 17 Mag 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)
Robin Merkle
Robin Merkle il 17 Mag 2020
Yes. That's what i meant by the max-min-edge length. But I don't understand why this is the case (since - at least to my knowledge - error bounds e.g. for PDE-solving methods are usually given in terms of the maximal edge length of all triangles). And, in addition, this is definitely not what is described in the matlab description of the function initmesh().

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by