mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
fixes for hex-filling
This commit is contained in:
parent
392eee9177
commit
8350a88daf
@ -33,10 +33,72 @@ const char * hexrules[] = {
|
||||
"(4, 3, 2, 1, 8, 7, 6, 5);\n",\
|
||||
"\n",\
|
||||
"freezone2\n",\
|
||||
"{ 1 P1 };\n",\
|
||||
"{ 1 P2 };\n",\
|
||||
"{ 1 P5 };\n",\
|
||||
"{ 1 P6 };\n",\
|
||||
"{ 1 P2 };\n",\
|
||||
"{ 1 P3 };\n",\
|
||||
"{ 0.3 P1, 0.3 P2, 0.3 P5, 0.3 P6, -0.05 P3, -0.05 P4, -0.05 P7, -0.05 P8 };\n",\
|
||||
"{ 0.3 P3, 0.3 P4, 0.3 P7, 0.3 P8, -0.05 P1, -0.05 P2, -0.05 P5, -0.05 P6 };\n",\
|
||||
"\n",\
|
||||
"freezonelimit\n",\
|
||||
"{ 1 P5 };\n",\
|
||||
"{ 1 P6 };\n",\
|
||||
"{ 1 P2 };\n",\
|
||||
"{ 1 P3 };\n",\
|
||||
"{ 0.25 P1, 0.25 P2, 0.25 P5, 0.25 P6, -0.0 P3, -0.0 P4, -0.0 P7, -0.0 P8 };\n",\
|
||||
"{ 0.25 P3, 0.25 P4, 0.25 P7, 0.25 P8, -0.0 P1, -0.0 P1, -0.0 P5, -0.0 P6 };\n",\
|
||||
"\n",\
|
||||
"\n",\
|
||||
"endrule\n",\
|
||||
"\n",\
|
||||
"\n",\
|
||||
"\n",\
|
||||
"rule \"Hexa left-right-top (10)\"\n",\
|
||||
"\n",\
|
||||
"quality 10\n",\
|
||||
"\n",\
|
||||
"flags t;\n",\
|
||||
"\n",\
|
||||
"mappoints\n",\
|
||||
"(0, 0, 0);\n",\
|
||||
"(1, 0, 0) { 1 } ;\n",\
|
||||
"(1, 1, 0) { 1 } ;\n",\
|
||||
"(0, 1, 0) { 1 } ;\n",\
|
||||
"(0, 0, 1) { 1 } ;\n",\
|
||||
"(1, 0, 1) { 1 } ;\n",\
|
||||
"(1, 1, 1) { 1 } ;\n",\
|
||||
"(0, 1, 1) { 1 } ;\n",\
|
||||
"\n",\
|
||||
"mapfaces\n",\
|
||||
"(4, 3, 2, 1) del;\n",\
|
||||
"(3, 7, 6, 2) del;\n",\
|
||||
"(7, 8, 5, 6) del;\n",\
|
||||
"(8, 4, 1, 5) del;\n",\
|
||||
"\n",\
|
||||
"newpoints\n",\
|
||||
"\n",\
|
||||
"newfaces\n",\
|
||||
"(5, 6, 2, 1);\n",\
|
||||
"(7, 8, 4, 3);\n",\
|
||||
"\n",\
|
||||
"elements\n",\
|
||||
"(4, 3, 2, 1, 8, 7, 6, 5);\n",\
|
||||
"\n",\
|
||||
"freezone2\n",\
|
||||
"{ 1 P5 };\n",\
|
||||
"{ 1 P6 };\n",\
|
||||
"{ 1 P2 };\n",\
|
||||
"{ 1 P3 };\n",\
|
||||
"{ 0.251 P1, 0.251 P2, 0.251 P5, 0.251 P6, -0.05 P3, -0.001 P4, -0.001 P7, -0.001 P8 };\n",\
|
||||
"{ 0.251 P3, 0.251 P4, 0.251 P7, 0.251 P8, -0.05 P1, -0.001 P2, -0.001 P5, -0.001 P6 };\n",\
|
||||
"\n",\
|
||||
"freezonelimit\n",\
|
||||
"{ 1 P5 };\n",\
|
||||
"{ 1 P6 };\n",\
|
||||
"{ 1 P2 };\n",\
|
||||
"{ 1 P3 };\n",\
|
||||
"{ 0.25 P1, 0.25 P2, 0.25 P5, 0.25 P6, -0.0 P3, -0.0 P4, -0.0 P7, -0.0 P8 };\n",\
|
||||
"{ 0.25 P3, 0.25 P4, 0.25 P7, 0.25 P8, -0.0 P1, -0.0 P1, -0.0 P5, -0.0 P6 };\n",\
|
||||
"\n",\
|
||||
"\n",\
|
||||
"endrule\n",\
|
||||
@ -45,9 +107,62 @@ const char * hexrules[] = {
|
||||
"\n",\
|
||||
"\n",\
|
||||
"\n",\
|
||||
"rule \"Hexa left-right-top-front\"\n",\
|
||||
"\n",\
|
||||
"quality 1\n",\
|
||||
"\n",\
|
||||
"flags t;\n",\
|
||||
"\n",\
|
||||
"mappoints\n",\
|
||||
"(0, 0, 0);\n",\
|
||||
"(1, 0, 0) { 1 } ;\n",\
|
||||
"(1, 1, 0) { 1 } ;\n",\
|
||||
"(0, 1, 0) { 1 } ;\n",\
|
||||
"(0, 0, 1) { 1 } ;\n",\
|
||||
"(1, 0, 1) { 1 } ;\n",\
|
||||
"(1, 1, 1) { 1 } ;\n",\
|
||||
"(0, 1, 1) { 1 } ;\n",\
|
||||
"\n",\
|
||||
"mapfaces\n",\
|
||||
"(4, 3, 2, 1) del;\n",\
|
||||
"(3, 7, 6, 2) del;\n",\
|
||||
"(7, 8, 5, 6) del;\n",\
|
||||
"(8, 4, 1, 5) del;\n",\
|
||||
"(1, 2, 6, 5) del;\n",\
|
||||
"newpoints\n",\
|
||||
"\n",\
|
||||
"newfaces\n",\
|
||||
"(7, 8, 4, 3);\n",\
|
||||
"\n",\
|
||||
"elements\n",\
|
||||
"(4, 3, 2, 1, 8, 7, 6, 5);\n",\
|
||||
"\n",\
|
||||
"freezone2\n",\
|
||||
"{ 1 P5 };\n",\
|
||||
"{ 1 P6 };\n",\
|
||||
"{ 1 P2 };\n",\
|
||||
"{ 1 P3 };\n",\
|
||||
"{ 0.3 P3, 0.3 P4, 0.3 P7, 0.3 P8, -0.05 P1, -0.05 P2, -0.05 P5, -0.05 P6 };\n",\
|
||||
"\n",\
|
||||
"freezonelimit\n",\
|
||||
"{ 1 P5 };\n",\
|
||||
"{ 1 P6 };\n",\
|
||||
"{ 1 P2 };\n",\
|
||||
"{ 1 P3 };\n",\
|
||||
"{ 0.25 P3, 0.25 P4, 0.25 P7, 0.25 P8, -0.0 P1, -0.0 P1, -0.0 P5, -0.0 P6 };\n",\
|
||||
"\n",\
|
||||
"\n",\
|
||||
"endrule\n",\
|
||||
"\n",\
|
||||
"\n",\
|
||||
"\n",\
|
||||
"\n",\
|
||||
"\n",\
|
||||
"\n",\
|
||||
"\n",\
|
||||
"rule \"Hexa fill\"\n",\
|
||||
"\n",\
|
||||
"quality 10\n",\
|
||||
"quality 1\n",\
|
||||
"\n",\
|
||||
"flags t;\n",\
|
||||
"\n",\
|
||||
|
@ -96,8 +96,8 @@ namespace netgen
|
||||
domain_bbox.Increase (0.01 * domain_bbox.Diam());
|
||||
|
||||
|
||||
// for (int qstep = 1; qstep <= 3; qstep++)
|
||||
for (int qstep = 0; qstep <= 0; qstep++) // for hex-filling
|
||||
for (int qstep = 0; qstep <= 3; qstep++)
|
||||
// for (int qstep = 0; qstep <= 0; qstep++) // for hex-filling
|
||||
{
|
||||
// cout << "openquads = " << mesh3d.HasOpenQuads() << endl;
|
||||
if (mesh3d.HasOpenQuads())
|
||||
@ -109,7 +109,7 @@ namespace netgen
|
||||
{
|
||||
case 0:
|
||||
rulefile = "/Users/joachim/gitlab/netgen/rules/hexa.rls";
|
||||
// rulep = hexrules;
|
||||
rulep = hexrules;
|
||||
break;
|
||||
case 1:
|
||||
rulefile += "/rules/prisms2.rls";
|
||||
@ -125,8 +125,8 @@ namespace netgen
|
||||
break;
|
||||
}
|
||||
|
||||
Meshing3 meshing(rulefile);
|
||||
// Meshing3 meshing(rulep);
|
||||
// Meshing3 meshing(rulefile);
|
||||
Meshing3 meshing(rulep);
|
||||
|
||||
MeshingParameters mpquad = mp;
|
||||
|
||||
|
@ -48,7 +48,59 @@ freezonelimit
|
||||
|
||||
endrule
|
||||
|
||||
# { 1.02 P5, 1.02 P6, 1.02 P2,
|
||||
|
||||
|
||||
rule "Hexa left-right-top (10)"
|
||||
|
||||
quality 10
|
||||
|
||||
flags t;
|
||||
|
||||
mappoints
|
||||
(0, 0, 0);
|
||||
(1, 0, 0) { 1 } ;
|
||||
(1, 1, 0) { 1 } ;
|
||||
(0, 1, 0) { 1 } ;
|
||||
(0, 0, 1) { 1 } ;
|
||||
(1, 0, 1) { 1 } ;
|
||||
(1, 1, 1) { 1 } ;
|
||||
(0, 1, 1) { 1 } ;
|
||||
|
||||
mapfaces
|
||||
(4, 3, 2, 1) del;
|
||||
(3, 7, 6, 2) del;
|
||||
(7, 8, 5, 6) del;
|
||||
(8, 4, 1, 5) del;
|
||||
|
||||
newpoints
|
||||
|
||||
newfaces
|
||||
(5, 6, 2, 1);
|
||||
(7, 8, 4, 3);
|
||||
|
||||
elements
|
||||
(4, 3, 2, 1, 8, 7, 6, 5);
|
||||
|
||||
freezone2
|
||||
{ 1 P5 };
|
||||
{ 1 P6 };
|
||||
{ 1 P2 };
|
||||
{ 1 P3 };
|
||||
{ 0.251 P1, 0.251 P2, 0.251 P5, 0.251 P6, -0.05 P3, -0.001 P4, -0.001 P7, -0.001 P8 };
|
||||
{ 0.251 P3, 0.251 P4, 0.251 P7, 0.251 P8, -0.05 P1, -0.001 P2, -0.001 P5, -0.001 P6 };
|
||||
|
||||
freezonelimit
|
||||
{ 1 P5 };
|
||||
{ 1 P6 };
|
||||
{ 1 P2 };
|
||||
{ 1 P3 };
|
||||
{ 0.25 P1, 0.25 P2, 0.25 P5, 0.25 P6, -0.0 P3, -0.0 P4, -0.0 P7, -0.0 P8 };
|
||||
{ 0.25 P3, 0.25 P4, 0.25 P7, 0.25 P8, -0.0 P1, -0.0 P1, -0.0 P5, -0.0 P6 };
|
||||
|
||||
|
||||
endrule
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user