hex-filling of thin domains (first steps ...)

This commit is contained in:
Joachim Schöberl 2016-04-05 14:27:51 +02:00
parent d1ebdf35d8
commit 16c6ae5865
2 changed files with 182 additions and 0 deletions

View File

@ -0,0 +1,94 @@
namespace netgen
{
const char * hexrules[] = {
"rule \"Hexa left-right-top\"\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",\
"\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 P1 };\n",\
"{ 1 P2 };\n",\
"{ 1 P5 };\n",\
"{ 1 P3 };\n",\
"\n",\
"\n",\
"endrule\n",\
"\n",\
"\n",\
"\n",\
"\n",\
"\n",\
"rule \"Hexa fill\"\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",\
"(1, 2, 6, 5) del;\n",\
"(3, 4, 8, 7) del;\n",\
"\n",\
"newpoints\n",\
"\n",\
"newfaces\n",\
"\n",\
"elements\n",\
"(4, 3, 2, 1, 8, 7, 6, 5);\n",\
"\n",\
"freezone2\n",\
"{ 1 P1 };\n",\
"{ 1 P2 };\n",\
"{ 1 P5 };\n",\
"{ 1 P3 };\n",\
"\n",\
"\n",\
"endrule\n",\
"\n",\
"\n",\
"\n",\
"\n",\
"\n",\
"\n",\
0};
}

88
rules/hexa.rls Normal file
View File

@ -0,0 +1,88 @@
rule "Hexa left-right-top"
quality 1
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 P1 };
{ 1 P2 };
{ 1 P5 };
{ 1 P3 };
endrule
rule "Hexa fill"
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;
(1, 2, 6, 5) del;
(3, 4, 8, 7) del;
newpoints
newfaces
elements
(4, 3, 2, 1, 8, 7, 6, 5);
freezone2
{ 1 P1 };
{ 1 P2 };
{ 1 P5 };
{ 1 P3 };
endrule