mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 21:40:33 +05:00
469 lines
7.7 KiB
C++
469 lines
7.7 KiB
C++
namespace netgen
|
|
{
|
|
const char * triarules[] = {
|
|
"rule \"Free Triangle (1)\"\n",\
|
|
"\n",\
|
|
"quality 1\n",\
|
|
"\n",\
|
|
"mappoints\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1.0, 0, 1.0 };\n",\
|
|
"\n",\
|
|
"maplines\n",\
|
|
"(1, 2) del;\n",\
|
|
"\n",\
|
|
"newpoints\n",\
|
|
"(0.5, 0.866) { 0.5 X2 } { };\n",\
|
|
"\n",\
|
|
"newlines\n",\
|
|
"(1, 3);\n",\
|
|
"(3, 2);\n",\
|
|
"\n",\
|
|
"freearea\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1 X2 } { };\n",\
|
|
"(1.5, 0.7) { 0.5 X2 } { };\n",\
|
|
"(0.5, 1.5) { 0.5 X2 } { };\n",\
|
|
"(-0.5, 0.7) { 0.5 X2 } { };\n",\
|
|
"\n",\
|
|
"freearea2\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1 X2 } { };\n",\
|
|
"(0.5, 0.866) { 0.5 X2 } { };\n",\
|
|
"(0.5, 0.866) { 0.5 X2 } { };\n",\
|
|
"(0.5, 0.866) { 0.5 X2 } { };\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"elements\n",\
|
|
"(1, 2, 3);\n",\
|
|
"\n",\
|
|
"endrule\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"rule \"Free Triangle (5)\"\n",\
|
|
"\n",\
|
|
"quality 5\n",\
|
|
"\n",\
|
|
"mappoints\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1.0, 0, 1.0 };\n",\
|
|
"\n",\
|
|
"maplines\n",\
|
|
"(1, 2) del;\n",\
|
|
"\n",\
|
|
"newpoints\n",\
|
|
"(0.5, 0.5) { 0.5 X2 } { };\n",\
|
|
"\n",\
|
|
"newlines\n",\
|
|
"(1, 3);\n",\
|
|
"(3, 2);\n",\
|
|
"\n",\
|
|
"freearea\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1 X2 } { };\n",\
|
|
"(1, 0.7) { 1 X2 } { };\n",\
|
|
"(0, 0.7) { } { };\n",\
|
|
"\n",\
|
|
"freearea2\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1 X2 } { };\n",\
|
|
"(0.5, 0.5) { 0.5 X2 } { };\n",\
|
|
"(0.5, 0.5) { 0.5 X2 } { };\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"elements\n",\
|
|
"(1, 2, 3);\n",\
|
|
"\n",\
|
|
"endrule\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"rule \"Free Triangle (10)\"\n",\
|
|
"\n",\
|
|
"quality 10\n",\
|
|
"\n",\
|
|
"mappoints\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1.0, 0, 1.0 };\n",\
|
|
"\n",\
|
|
"maplines\n",\
|
|
"(1, 2) del;\n",\
|
|
"\n",\
|
|
"newpoints\n",\
|
|
"(0.5, 0.3) { 0.5 X2 } { };\n",\
|
|
"\n",\
|
|
"newlines\n",\
|
|
"(1, 3);\n",\
|
|
"(3, 2);\n",\
|
|
"\n",\
|
|
"freearea\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1 X2 } { };\n",\
|
|
"(1, 0.5) { 1 X2 } { };\n",\
|
|
"(0, 0.5) { } { };\n",\
|
|
"\n",\
|
|
"freearea2\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1 X2 } { };\n",\
|
|
"(0.5, 0.3) { 0.5 X2 } { };\n",\
|
|
"(0.5, 0.3) { 0.5 X2 } { };\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"elements\n",\
|
|
"(1, 2, 3);\n",\
|
|
"\n",\
|
|
"endrule\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"rule \"Free Triangle (20)\"\n",\
|
|
"\n",\
|
|
"quality 20\n",\
|
|
"\n",\
|
|
"mappoints\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1.0, 0, 1.0 };\n",\
|
|
"\n",\
|
|
"maplines\n",\
|
|
"(1, 2) del;\n",\
|
|
"\n",\
|
|
"newpoints\n",\
|
|
"(0.5, 0.1) { 0.5 X2 } { };\n",\
|
|
"\n",\
|
|
"newlines\n",\
|
|
"(1, 3);\n",\
|
|
"(3, 2);\n",\
|
|
"\n",\
|
|
"freearea\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1 X2 } { };\n",\
|
|
"(1, 0.2) { 1 X2 } { };\n",\
|
|
"(0, 0.2) { } { };\n",\
|
|
"\n",\
|
|
"freearea2\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1 X2 } { };\n",\
|
|
"(0.5, 0.1) { 0.5 X2 } { };\n",\
|
|
"(0.5, 0.1) { 0.5 X2 } { };\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"elements\n",\
|
|
"(1, 2, 3);\n",\
|
|
"\n",\
|
|
"endrule\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"rule \"Right 60 (1)\"\n",\
|
|
"\n",\
|
|
"quality 1\n",\
|
|
"\n",\
|
|
"mappoints\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 0.5, 0, 1.0 };\n",\
|
|
"(0.5, 0.866) { 0.6, 0, 0.8 };\n",\
|
|
"\n",\
|
|
"maplines\n",\
|
|
"(1, 2) del;\n",\
|
|
"(2, 3) del;\n",\
|
|
"\n",\
|
|
"newpoints\n",\
|
|
"\n",\
|
|
"newlines\n",\
|
|
"(1, 3);\n",\
|
|
"\n",\
|
|
"freearea\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1 X2 } { };\n",\
|
|
"(0.5, 0.866) { 1 X3 } { 1 Y3 };\n",\
|
|
"(-0.125, 0.6495) { -0.5 X2, 0.75 X3 } { -0.5 Y2, 0.75 Y3 };\n",\
|
|
"\n",\
|
|
"freearea2\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1 X2 } { };\n",\
|
|
"(0.5, 0.866) { 1 X3 } { 1 Y3 };\n",\
|
|
"(0.25, 0.433) { 0.5 X3 } { 0.5 Y3 };\n",\
|
|
"\n",\
|
|
"elements\n",\
|
|
"(1, 2, 3);\n",\
|
|
"\n",\
|
|
"endrule\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"rule \"Left 60 (1)\"\n",\
|
|
"\n",\
|
|
"quality 1\n",\
|
|
"\n",\
|
|
"mappoints\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0);\n",\
|
|
"(0.5, 0.866);\n",\
|
|
"\n",\
|
|
"maplines\n",\
|
|
"(1, 2) del;\n",\
|
|
"(3, 1) del;\n",\
|
|
"\n",\
|
|
"newpoints\n",\
|
|
"\n",\
|
|
"newlines\n",\
|
|
"(3, 2);\n",\
|
|
"\n",\
|
|
"freearea\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1 X2 } { };\n",\
|
|
"(1.125, 0.6495) { 0.75 X2, 0.75 X3 } { 0.75 Y3 };\n",\
|
|
"(0.5, 0.866) { 1 X3 } { 1 Y3 };\n",\
|
|
"\n",\
|
|
"freearea2\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1 X2 } { };\n",\
|
|
"(0.75, 0.433) { 0.5 X2, 0.5 X3 } { 0.5 Y2, 0.5 Y3 };\n",\
|
|
"(0.5, 0.866) { 1 X3 } { 1 Y3 };\n",\
|
|
"\n",\
|
|
"elements\n",\
|
|
"(1, 2, 3);\n",\
|
|
"\n",\
|
|
"endrule\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"rule \"Right 120 (1)\"\n",\
|
|
"\n",\
|
|
"quality 1\n",\
|
|
"\n",\
|
|
"mappoints\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0);\n",\
|
|
"(1.5, 0.866);\n",\
|
|
"\n",\
|
|
"maplines\n",\
|
|
"(1, 2) del;\n",\
|
|
"(2, 3) del;\n",\
|
|
"\n",\
|
|
"newpoints\n",\
|
|
"(0.5, 0.866) { 1 X3, -1 X2 } { 1 Y3 };\n",\
|
|
"\n",\
|
|
"newlines\n",\
|
|
"(1, 4);\n",\
|
|
"(4, 3);\n",\
|
|
"\n",\
|
|
"freearea\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1 X2 } { };\n",\
|
|
"(1.5, 0.866) { 1 X3 } { 1 Y3 };\n",\
|
|
"(1, 1.732) { -2 X2, 2 X3 } { 2 Y3 };\n",\
|
|
"(0, 1.732) { -3 X2, 2 X3 } { 2 Y3 };\n",\
|
|
"(-0.5, 0.866) { -2 X2, 1 X3 } {1 Y3 };\n",\
|
|
"\n",\
|
|
"elements\n",\
|
|
"(1, 2, 4);\n",\
|
|
"(2, 3, 4);\n",\
|
|
"\n",\
|
|
"endrule\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"rule \"Left 120 (1)\"\n",\
|
|
"\n",\
|
|
"quality 1\n",\
|
|
"\n",\
|
|
"mappoints\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0);\n",\
|
|
"(-0.5, 0.866);\n",\
|
|
"\n",\
|
|
"maplines\n",\
|
|
"(1, 2) del;\n",\
|
|
"(3, 1) del;\n",\
|
|
"\n",\
|
|
"newpoints\n",\
|
|
"(0.5, 0.866) { 1 X3, 1 X2 } { 1 Y3 };\n",\
|
|
"\n",\
|
|
"newlines\n",\
|
|
"(3, 4);\n",\
|
|
"(4, 2);\n",\
|
|
"\n",\
|
|
"freearea\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1 X2 } { };\n",\
|
|
"(1.5, 0.866) { 2 X2, 1 X3 } { 1 Y3 };\n",\
|
|
"(1, 1.732) { 2 X2, 2 X3 } { 2 Y3 };\n",\
|
|
"(0, 1.732) { 1 X2, 2 X3 } { 2 Y3 };\n",\
|
|
"(-0.5, 0.866) { 1 X3 } {1 Y3 };\n",\
|
|
"\n",\
|
|
"elements\n",\
|
|
"(1, 2, 4);\n",\
|
|
"(1, 4, 3);\n",\
|
|
"\n",\
|
|
"endrule\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"rule \"Left Right 120 (1)\"\n",\
|
|
"\n",\
|
|
"quality 1\n",\
|
|
"\n",\
|
|
"mappoints\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0);\n",\
|
|
"(-0.5, 0.866);\n",\
|
|
"(1.5, 0.866);\n",\
|
|
"\n",\
|
|
"maplines\n",\
|
|
"(1, 2) del;\n",\
|
|
"(3, 1) del;\n",\
|
|
"(2, 4) del;\n",\
|
|
"\n",\
|
|
"newpoints\n",\
|
|
"(0.5, 0.866) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4 };\n",\
|
|
"\n",\
|
|
"newlines\n",\
|
|
"(3, 5);\n",\
|
|
"(5, 4);\n",\
|
|
"\n",\
|
|
"freearea\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1 X2 } { };\n",\
|
|
"(1.5, 0.866) { 1 X4 } { 1 Y4 };\n",\
|
|
"(1, 1.299) { -0.5 X2, 0.375 X3, 1.125 X4 } { -0.5 Y2, 0.375 Y3, 1.125 Y4 };\n",\
|
|
"(0, 1.299) { 1.125 X3, 0.375 X4 } { 1.125 Y3, 0.375 Y4 };\n",\
|
|
"(-0.5, 0.866) { 1 X3 } { 1 Y3 };\n",\
|
|
"\n",\
|
|
"elements\n",\
|
|
"(1, 2, 5);\n",\
|
|
"(3, 1, 5);\n",\
|
|
"(2, 4, 5);\n",\
|
|
"\n",\
|
|
"endrule\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"rule \"Fill Triangle\"\n",\
|
|
"\n",\
|
|
"quality 1\n",\
|
|
"\n",\
|
|
"mappoints\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0);\n",\
|
|
"(0.5, 0.866);\n",\
|
|
"\n",\
|
|
"maplines\n",\
|
|
"(1, 2) del;\n",\
|
|
"(2, 3) del;\n",\
|
|
"(3, 1) del;\n",\
|
|
"\n",\
|
|
"newpoints\n",\
|
|
"\n",\
|
|
"newlines\n",\
|
|
"\n",\
|
|
"freearea\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1 X2 } { 1 Y2 };\n",\
|
|
"(0.5, 0.866) { 1 X3 } { 1 Y3 };\n",\
|
|
"\n",\
|
|
"elements\n",\
|
|
"(1, 2, 3);\n",\
|
|
"\n",\
|
|
"endrule\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"rule \"Vis A Vis (1)\"\n",\
|
|
"\n",\
|
|
"quality 1\n",\
|
|
"\n",\
|
|
"mappoints\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0);\n",\
|
|
"(0.5, 0.866);\n",\
|
|
"\n",\
|
|
"maplines\n",\
|
|
"(1, 2) del;\n",\
|
|
"\n",\
|
|
"newpoints\n",\
|
|
"\n",\
|
|
"newlines\n",\
|
|
"(1, 3);\n",\
|
|
"(3, 2);\n",\
|
|
"\n",\
|
|
"freearea\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1 X2 } { };\n",\
|
|
"(1.2, 0.693) { 0.8 X2, 0.8 X3 } { 0.8 Y2, 0.8 Y3 };\n",\
|
|
"(0.5, 0.866) { 1 X3 } { 1 Y3 };\n",\
|
|
"(-0.2, 0.693) { -0.6 X2, 0.8 X3 } { -0.6 Y2, 0.8 Y3 };\n",\
|
|
"\n",\
|
|
"freearea2\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1 X2 } { };\n",\
|
|
"(0.75, 0.433) { 0.5 X2, 0.5 X3 } { 0.5 Y2, 0.5 Y3 };\n",\
|
|
"(0.5, 0.866) { 1 X3 } { 1 Y3 };\n",\
|
|
"(0.25, 0.433) { 0.5 X3 } { 0.5 Y3 };\n",\
|
|
"\n",\
|
|
"elements\n",\
|
|
"(1, 2, 3);\n",\
|
|
"\n",\
|
|
"endrule\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"rule \"2 h Vis A Vis (1)\"\n",\
|
|
"\n",\
|
|
"quality 3\n",\
|
|
"\n",\
|
|
"mappoints\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0);\n",\
|
|
"(1, 1.732);\n",\
|
|
"(0, 1.732);\n",\
|
|
"\n",\
|
|
"maplines\n",\
|
|
"(1, 2) del;\n",\
|
|
"(3, 4) del;\n",\
|
|
"\n",\
|
|
"newpoints\n",\
|
|
"(0.5, 0.866) { 0.25 X2, 0.25 X3, 0.25 X4 } { 0.25 Y2, 0.25 Y3, 0.25 Y4 };\n",\
|
|
"\n",\
|
|
"newlines\n",\
|
|
"(1, 5);\n",\
|
|
"(5, 4);\n",\
|
|
"(3, 5);\n",\
|
|
"(5, 2);\n",\
|
|
"\n",\
|
|
"freearea\n",\
|
|
"(0, 0);\n",\
|
|
"(1, 0) { 1 X2 } { 1 Y2 };\n",\
|
|
"(1.5, 0.866) { 0.75 X2, 0.75 X3, -0.25 X4 } { 0.75 Y2, 0.75 Y3, -0.25 Y4 };\n",\
|
|
"(1, 1.732) { 1 X3 } { 1 Y3 };\n",\
|
|
"(0, 1.732) { 1 X4 } { 1 Y4 };\n",\
|
|
"(-0.5, 0.866) { 0.75 X4, -0.25 X2, -0.25 X3 } { 0.75 Y4, -0.25 Y3 };\n",\
|
|
"\n",\
|
|
"elements\n",\
|
|
"(1, 2, 5);\n",\
|
|
"(3, 4, 5);\n",\
|
|
"\n",\
|
|
"endrule\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
"\n",\
|
|
0};
|
|
}
|