1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
26 \*---------------------------------------------------------------------------*/
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
35 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
37 void sammMesh::fillSammAddressingTable()
39 // SAMM trim type 1: 8 models
40 static label SammTrim1Rot0[10] = {1, 5, 6, 2, 8, 10, 4, 7, 3, 9};
41 static label SammTrim1Rot1[10] = {2, 6, 7, 3, 8, 10, 5, 4, 0, 9};
42 static label SammTrim1Rot2[10] = {3, 7, 4, 0, 8, 10, 6, 5, 1, 9};
43 static label SammTrim1Rot3[10] = {0, 4, 5, 1, 8, 10, 7, 6, 2, 9};
44 static label SammTrim1Rot4[10] = {7, 3, 2, 6, 8, 10, 0, 1, 5, 9};
45 static label SammTrim1Rot5[10] = {4, 0, 3, 7, 8, 10, 1, 2, 6, 9};
46 static label SammTrim1Rot6[10] = {5, 1, 0, 4, 8, 10, 2, 3, 7, 9};
47 static label SammTrim1Rot7[10] = {6, 2, 1, 5, 8, 10, 3, 0, 4, 9};
49 sammAddressingTable[1] = SammTrim1Rot0;
50 sammAddressingTable[2] = SammTrim1Rot1;
51 sammAddressingTable[4] = SammTrim1Rot2;
52 sammAddressingTable[8] = SammTrim1Rot3;
53 sammAddressingTable[16] = SammTrim1Rot4;
54 sammAddressingTable[32] = SammTrim1Rot5;
55 sammAddressingTable[64] = SammTrim1Rot6;
56 sammAddressingTable[128] = SammTrim1Rot7;
59 // SAMM trim type 2: 12 models
60 static label SammTrim2Rot0[10] = {9, 3, 7, 4, 10, 8, 2, 6, 5, 11};
61 static label SammTrim2Rot1[10] = {9, 1, 5, 6, 10, 8, 0, 4, 7, 11};
62 static label SammTrim2Rot2[10] = {9, 2, 1, 5, 10, 8, 3, 0, 4, 11};
63 static label SammTrim2Rot3[10] = {9, 0, 3, 7, 10, 8, 1, 2, 6, 11};
65 static label SammTrim2Rot4[10] = {9, 4, 5, 1, 10, 8, 7, 6, 2, 11};
66 static label SammTrim2Rot5[10] = {9, 5, 1, 0, 10, 8, 6, 2, 3, 11};
67 static label SammTrim2Rot6[10] = {9, 1, 0, 4, 10, 8, 2, 3, 7, 11};
68 static label SammTrim2Rot7[10] = {9, 0, 4, 5, 10, 8, 3, 7, 6, 11};
70 static label SammTrim2Rot8[10] = {9, 1, 2, 3, 10, 8, 5, 6, 7, 11};
71 static label SammTrim2Rot9[10] = {9, 2, 3, 0, 10, 8, 6, 7, 4, 11};
72 static label SammTrim2Rot10[10] = {9, 3, 0, 1, 10, 8, 7, 4, 5, 11};
73 static label SammTrim2Rot11[10] = {9, 0, 1, 2, 10, 8, 4, 5, 6, 11};
75 sammAddressingTable[3] = SammTrim2Rot0;
76 sammAddressingTable[12] = SammTrim2Rot1;
77 sammAddressingTable[192] = SammTrim2Rot2;
78 sammAddressingTable[48] = SammTrim2Rot3;
79 sammAddressingTable[9] = SammTrim2Rot4;
80 sammAddressingTable[144] = SammTrim2Rot5;
81 sammAddressingTable[96] = SammTrim2Rot6;
82 sammAddressingTable[6] = SammTrim2Rot7;
83 sammAddressingTable[17] = SammTrim2Rot8;
84 sammAddressingTable[34] = SammTrim2Rot9;
85 sammAddressingTable[68] = SammTrim2Rot10;
86 sammAddressingTable[136] = SammTrim2Rot11;
89 // SAMM trim type 3: 24 models
90 static label SammTrim3Rot0[10] = {5, 4, 7, 6, 11, 10, 9, 3, 8, 12};
91 static label SammTrim3Rot1[10] = {6, 5, 4, 7, 11, 10, 9, 0, 8, 12};
92 static label SammTrim3Rot2[10] = {7, 6, 5, 4, 11, 10, 9, 1, 8, 12};
93 static label SammTrim3Rot3[10] = {4, 7, 6, 5, 11, 10, 9, 2, 8, 12};
94 static label SammTrim3Rot4[10] = {1, 2, 3, 0, 11, 10, 9, 7, 8, 12};
95 static label SammTrim3Rot5[10] = {2, 3, 0, 1, 11, 10, 9, 4, 8, 12};
96 static label SammTrim3Rot6[10] = {3, 0, 1, 2, 11, 10, 9, 5, 8, 12};
97 static label SammTrim3Rot7[10] = {0, 1, 2, 3, 11, 10, 9, 6, 8, 12};
98 static label SammTrim3Rot8[10] = {0, 3, 7, 4, 11, 10, 9, 6, 8, 12};
99 static label SammTrim3Rot9[10] = {3, 7, 4, 0, 11, 10, 9, 5, 8, 12};
100 static label SammTrim3Rot10[10] = {7, 4, 0, 3, 11, 10, 9, 1, 8, 12};
101 static label SammTrim3Rot11[10] = {4, 0, 3, 7, 11, 10, 9, 2, 8, 12};
102 static label SammTrim3Rot12[10] = {1, 5, 6, 2, 11, 10, 9, 7, 8, 12};
103 static label SammTrim3Rot13[10] = {2, 1, 5, 6, 11, 10, 9, 4, 8, 12};
104 static label SammTrim3Rot14[10] = {6, 2, 1, 5, 11, 10, 9, 0, 8, 12};
105 static label SammTrim3Rot15[10] = {5, 6, 1, 2, 11, 10, 9, 3, 8, 12};
106 static label SammTrim3Rot16[10] = {7, 3, 2, 6, 11, 10, 9, 1, 8, 12};
107 static label SammTrim3Rot17[10] = {6, 7, 3, 2, 11, 10, 9, 0, 8, 12};
108 static label SammTrim3Rot18[10] = {2, 6, 7, 3, 11, 10, 9, 4, 8, 12};
109 static label SammTrim3Rot19[10] = {3, 2, 6, 7, 11, 10, 9, 5, 8, 12};
110 static label SammTrim3Rot20[10] = {4, 5, 1, 0, 11, 10, 9, 2, 8, 12};
111 static label SammTrim3Rot21[10] = {5, 1, 0, 4, 11, 10, 9, 3, 8, 12};
112 static label SammTrim3Rot22[10] = {1, 0, 4, 5, 11, 10, 9, 7, 8, 12};
113 static label SammTrim3Rot23[10] = {0, 4, 5, 1, 11, 10, 9, 6, 8, 12};
115 sammAddressingTable[7] = SammTrim3Rot0;
116 sammAddressingTable[14] = SammTrim3Rot1;
117 sammAddressingTable[13] = SammTrim3Rot2;
118 sammAddressingTable[11] = SammTrim3Rot3;
119 sammAddressingTable[112] = SammTrim3Rot4;
120 sammAddressingTable[224] = SammTrim3Rot5;
121 sammAddressingTable[208] = SammTrim3Rot6;
122 sammAddressingTable[176] = SammTrim3Rot7;
123 sammAddressingTable[38] = SammTrim3Rot8;
124 sammAddressingTable[70] = SammTrim3Rot9;
125 sammAddressingTable[100] = SammTrim3Rot10;
126 sammAddressingTable[98] = SammTrim3Rot11;
127 sammAddressingTable[25] = SammTrim3Rot12;
128 sammAddressingTable[137] = SammTrim3Rot13;
129 sammAddressingTable[152] = SammTrim3Rot14;
130 sammAddressingTable[145] = SammTrim3Rot15;
131 sammAddressingTable[49] = SammTrim3Rot16;
132 sammAddressingTable[50] = SammTrim3Rot17;
133 sammAddressingTable[35] = SammTrim3Rot18;
134 sammAddressingTable[19] = SammTrim3Rot19;
135 sammAddressingTable[200] = SammTrim3Rot20;
136 sammAddressingTable[196] = SammTrim3Rot21;
137 sammAddressingTable[76] = SammTrim3Rot22;
138 sammAddressingTable[140] = SammTrim3Rot23;
141 // SAMM trim type 4: 8 models
142 static label SammTrim4Rot0[10] = {6, 7, 2, 5, 13, 12 ,11, 10, 9, 8};
143 static label SammTrim4Rot1[10] = {7, 4, 3, 6, 13, 12 ,11, 10, 9, 8};
144 static label SammTrim4Rot2[10] = {4, 5, 6, 7, 13, 12 ,11, 10, 9, 8};
145 static label SammTrim4Rot3[10] = {5, 6, 1, 4, 13, 12 ,11, 10, 9, 8};
146 static label SammTrim4Rot4[10] = {2, 1, 6, 3, 13, 12 ,11, 10, 9, 8};
147 static label SammTrim4Rot5[10] = {3, 2, 7, 0, 13, 12 ,11, 10, 9, 8};
148 static label SammTrim4Rot6[10] = {0, 3, 4, 1, 13, 12 ,11, 10, 9, 8};
149 static label SammTrim4Rot7[10] = {1, 0, 5, 2, 13, 12 ,11, 10, 9, 8};
151 sammAddressingTable[27] = SammTrim4Rot0;
152 sammAddressingTable[39] = SammTrim4Rot1;
153 sammAddressingTable[78] = SammTrim4Rot2;
154 sammAddressingTable[141] = SammTrim4Rot3;
155 sammAddressingTable[177] = SammTrim4Rot4;
156 sammAddressingTable[114] = SammTrim4Rot5;
157 sammAddressingTable[228] = SammTrim4Rot6;
158 sammAddressingTable[216] = SammTrim4Rot7;
161 // SAMM trim type 5: 24 models
162 static label SammTrim5Rot0[8] = {12, 0, 1, 2, 8, 11, 10, 9};
163 static label SammTrim5Rot1[8] = {12, 1, 2, 3, 8, 11, 10, 9};
164 static label SammTrim5Rot2[8] = {12, 2, 3, 0, 8, 11, 10, 9};
165 static label SammTrim5Rot3[8] = {12, 3, 0, 1, 8, 11, 10, 9};
166 static label SammTrim5Rot4[8] = {12, 6, 5, 4, 8, 11, 10, 9};
167 static label SammTrim5Rot5[8] = {12, 7, 6, 5, 8, 11, 10, 9};
168 static label SammTrim5Rot6[8] = {12, 4, 7, 6, 8, 11, 10, 9};
169 static label SammTrim5Rot7[8] = {12, 5, 4, 7, 8, 11, 10, 9};
170 static label SammTrim5Rot8[8] = {12, 2, 1, 5, 8, 11, 10, 9};
171 static label SammTrim5Rot9[8] = {12, 6, 2, 1, 8, 11, 10, 9};
172 static label SammTrim5Rot10[8] = {12, 5, 6, 2, 8, 11, 10, 9};
173 static label SammTrim5Rot11[8] = {12, 1, 5, 6, 8, 11, 10, 9};
174 static label SammTrim5Rot12[8] = {12, 4, 0, 3, 8, 11, 10, 9};
175 static label SammTrim5Rot13[8] = {12, 0, 3, 7, 8, 11, 10, 9};
176 static label SammTrim5Rot14[8] = {12, 3, 7, 4, 8, 11, 10, 9};
177 static label SammTrim5Rot15[8] = {12, 7, 4, 0, 8, 11, 10, 9};
178 static label SammTrim5Rot16[8] = {12, 0, 4, 5, 8, 11, 10, 9};
179 static label SammTrim5Rot17[8] = {12, 4, 5, 1, 8, 11, 10, 9};
180 static label SammTrim5Rot18[8] = {12, 5, 1, 0, 8, 11, 10, 9};
181 static label SammTrim5Rot19[8] = {12, 1, 0, 4, 8, 11, 10, 9};
182 static label SammTrim5Rot20[8] = {12, 6, 7, 3, 8, 11, 10, 9};
183 static label SammTrim5Rot21[8] = {12, 2, 6, 7, 8, 11, 10, 9};
184 static label SammTrim5Rot22[8] = {12, 3, 2, 6, 8, 11, 10, 9};
185 static label SammTrim5Rot23[8] = {12, 7, 3, 2, 8, 11, 10, 9};
187 sammAddressingTable[248] = SammTrim5Rot0;
188 sammAddressingTable[241] = SammTrim5Rot1;
189 sammAddressingTable[242] = SammTrim5Rot2;
190 sammAddressingTable[244] = SammTrim5Rot3;
191 sammAddressingTable[143] = SammTrim5Rot4;
192 sammAddressingTable[31] = SammTrim5Rot5;
193 sammAddressingTable[47] = SammTrim5Rot6;
194 sammAddressingTable[79] = SammTrim5Rot7;
195 sammAddressingTable[217] = SammTrim5Rot8;
196 sammAddressingTable[185] = SammTrim5Rot9;
197 sammAddressingTable[155] = SammTrim5Rot10;
198 sammAddressingTable[157] = SammTrim5Rot11;
199 sammAddressingTable[230] = SammTrim5Rot12;
200 sammAddressingTable[118] = SammTrim5Rot13;
201 sammAddressingTable[103] = SammTrim5Rot14;
202 sammAddressingTable[110] = SammTrim5Rot15;
203 sammAddressingTable[206] = SammTrim5Rot16;
204 sammAddressingTable[205] = SammTrim5Rot17;
205 sammAddressingTable[220] = SammTrim5Rot18;
206 sammAddressingTable[236] = SammTrim5Rot19;
207 sammAddressingTable[55] = SammTrim5Rot20;
208 sammAddressingTable[59] = SammTrim5Rot21;
209 sammAddressingTable[179] = SammTrim5Rot22;
210 sammAddressingTable[115] = SammTrim5Rot23;
213 // SAMM trim type 8: 1 model
214 static label SammTrim8[12] = {8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
216 sammAddressingTable[255] = SammTrim8;
220 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
223 // ************************************************************************* //