Merge branch 'free_pyramids' into 'master'

Free pyramids

See merge request jschoeberl/netgen!475
This commit is contained in:
Joachim Schöberl 2022-02-15 09:33:45 +00:00
commit a399575a26
4 changed files with 6 additions and 48 deletions

View File

@ -281,7 +281,7 @@ namespace netgen
MeshingParameters mpquad = mp;
mpquad.giveuptol = 15;
mpquad.giveuptol = mp.giveuptolopenquads;
mpquad.baseelnp = 4;
mpquad.starshapeclass = 1000;
mpquad.check_impossible = qstep == 1; // for prisms only (air domain in trafo)

View File

@ -1295,6 +1295,9 @@ namespace netgen
int giveuptol2d = 200;
/// give up quality class, 3d meshing
int giveuptol = 10;
/// give up quality class for closing open quads, > 100 for
/// free pyramids
int giveuptolopenquads = 15;
/// maximal outer steps
int maxoutersteps = 10;
/// class starting star-shape filling

View File

@ -144,6 +144,8 @@ inline void CreateMPfromKwargs(MeshingParameters& mp, py::kwargs kwargs, bool th
mp.giveuptol2d = py::cast<int>(kwargs.attr("pop")("giveuptol2d"));
if(kwargs.contains("giveuptol"))
mp.giveuptol = py::cast<int>(kwargs.attr("pop")("giveuptol"));
if(kwargs.contains("giveuptolopenquads"))
mp.giveuptolopenquads = py::cast<int>(kwargs.attr("pop")("giveuptolopenquads"));
if(kwargs.contains("maxoutersteps"))
mp.maxoutersteps = py::cast<int>(kwargs.attr("pop")("maxoutersteps"));
if(kwargs.contains("starshapeclass"))

View File

@ -100,53 +100,6 @@ freeset
endrule
rule "connect pyramid"
quality 100
mappoints
(0, 0, 0);
(1, 0, 0);
(1, 1, 0);
(0, 1, 0);
(0.5, 0.5, -0.5);
mapfaces
(1, 2, 3, 4) del;
newpoints
newfaces
(1, 2, 5);
(2, 3, 5);
(3, 4, 5);
(4, 1, 5);
elements
(1, 2, 3, 4, 5);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P3 };
{ 1 P4 };
{ 1 P5 };
freeset
1 2 3 5;
freeset
1 3 4 5;
endrule
rule "pyramid with one trig"
quality 1