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