00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include <OpenFOAM/error.H>
00029
00030 #include "sammMesh.H"
00031
00032
00033
00034
00035
00036
00037 void sammMesh::fillSammAddressingTable()
00038 {
00039
00040 static label SammTrim1Rot0[10] = {1, 5, 6, 2, 8, 10, 4, 7, 3, 9};
00041 static label SammTrim1Rot1[10] = {2, 6, 7, 3, 8, 10, 5, 4, 0, 9};
00042 static label SammTrim1Rot2[10] = {3, 7, 4, 0, 8, 10, 6, 5, 1, 9};
00043 static label SammTrim1Rot3[10] = {0, 4, 5, 1, 8, 10, 7, 6, 2, 9};
00044 static label SammTrim1Rot4[10] = {7, 3, 2, 6, 8, 10, 0, 1, 5, 9};
00045 static label SammTrim1Rot5[10] = {4, 0, 3, 7, 8, 10, 1, 2, 6, 9};
00046 static label SammTrim1Rot6[10] = {5, 1, 0, 4, 8, 10, 2, 3, 7, 9};
00047 static label SammTrim1Rot7[10] = {6, 2, 1, 5, 8, 10, 3, 0, 4, 9};
00048
00049 sammAddressingTable[1] = SammTrim1Rot0;
00050 sammAddressingTable[2] = SammTrim1Rot1;
00051 sammAddressingTable[4] = SammTrim1Rot2;
00052 sammAddressingTable[8] = SammTrim1Rot3;
00053 sammAddressingTable[16] = SammTrim1Rot4;
00054 sammAddressingTable[32] = SammTrim1Rot5;
00055 sammAddressingTable[64] = SammTrim1Rot6;
00056 sammAddressingTable[128] = SammTrim1Rot7;
00057
00058
00059
00060 static label SammTrim2Rot0[10] = {9, 3, 7, 4, 10, 8, 2, 6, 5, 11};
00061 static label SammTrim2Rot1[10] = {9, 1, 5, 6, 10, 8, 0, 4, 7, 11};
00062 static label SammTrim2Rot2[10] = {9, 2, 1, 5, 10, 8, 3, 0, 4, 11};
00063 static label SammTrim2Rot3[10] = {9, 0, 3, 7, 10, 8, 1, 2, 6, 11};
00064
00065 static label SammTrim2Rot4[10] = {9, 4, 5, 1, 10, 8, 7, 6, 2, 11};
00066 static label SammTrim2Rot5[10] = {9, 5, 1, 0, 10, 8, 6, 2, 3, 11};
00067 static label SammTrim2Rot6[10] = {9, 1, 0, 4, 10, 8, 2, 3, 7, 11};
00068 static label SammTrim2Rot7[10] = {9, 0, 4, 5, 10, 8, 3, 7, 6, 11};
00069
00070 static label SammTrim2Rot8[10] = {9, 1, 2, 3, 10, 8, 5, 6, 7, 11};
00071 static label SammTrim2Rot9[10] = {9, 2, 3, 0, 10, 8, 6, 7, 4, 11};
00072 static label SammTrim2Rot10[10] = {9, 3, 0, 1, 10, 8, 7, 4, 5, 11};
00073 static label SammTrim2Rot11[10] = {9, 0, 1, 2, 10, 8, 4, 5, 6, 11};
00074
00075 sammAddressingTable[3] = SammTrim2Rot0;
00076 sammAddressingTable[12] = SammTrim2Rot1;
00077 sammAddressingTable[192] = SammTrim2Rot2;
00078 sammAddressingTable[48] = SammTrim2Rot3;
00079 sammAddressingTable[9] = SammTrim2Rot4;
00080 sammAddressingTable[144] = SammTrim2Rot5;
00081 sammAddressingTable[96] = SammTrim2Rot6;
00082 sammAddressingTable[6] = SammTrim2Rot7;
00083 sammAddressingTable[17] = SammTrim2Rot8;
00084 sammAddressingTable[34] = SammTrim2Rot9;
00085 sammAddressingTable[68] = SammTrim2Rot10;
00086 sammAddressingTable[136] = SammTrim2Rot11;
00087
00088
00089
00090 static label SammTrim3Rot0[10] = {5, 4, 7, 6, 11, 10, 9, 3, 8, 12};
00091 static label SammTrim3Rot1[10] = {6, 5, 4, 7, 11, 10, 9, 0, 8, 12};
00092 static label SammTrim3Rot2[10] = {7, 6, 5, 4, 11, 10, 9, 1, 8, 12};
00093 static label SammTrim3Rot3[10] = {4, 7, 6, 5, 11, 10, 9, 2, 8, 12};
00094 static label SammTrim3Rot4[10] = {1, 2, 3, 0, 11, 10, 9, 7, 8, 12};
00095 static label SammTrim3Rot5[10] = {2, 3, 0, 1, 11, 10, 9, 4, 8, 12};
00096 static label SammTrim3Rot6[10] = {3, 0, 1, 2, 11, 10, 9, 5, 8, 12};
00097 static label SammTrim3Rot7[10] = {0, 1, 2, 3, 11, 10, 9, 6, 8, 12};
00098 static label SammTrim3Rot8[10] = {0, 3, 7, 4, 11, 10, 9, 6, 8, 12};
00099 static label SammTrim3Rot9[10] = {3, 7, 4, 0, 11, 10, 9, 5, 8, 12};
00100 static label SammTrim3Rot10[10] = {7, 4, 0, 3, 11, 10, 9, 1, 8, 12};
00101 static label SammTrim3Rot11[10] = {4, 0, 3, 7, 11, 10, 9, 2, 8, 12};
00102 static label SammTrim3Rot12[10] = {1, 5, 6, 2, 11, 10, 9, 7, 8, 12};
00103 static label SammTrim3Rot13[10] = {2, 1, 5, 6, 11, 10, 9, 4, 8, 12};
00104 static label SammTrim3Rot14[10] = {6, 2, 1, 5, 11, 10, 9, 0, 8, 12};
00105 static label SammTrim3Rot15[10] = {5, 6, 1, 2, 11, 10, 9, 3, 8, 12};
00106 static label SammTrim3Rot16[10] = {7, 3, 2, 6, 11, 10, 9, 1, 8, 12};
00107 static label SammTrim3Rot17[10] = {6, 7, 3, 2, 11, 10, 9, 0, 8, 12};
00108 static label SammTrim3Rot18[10] = {2, 6, 7, 3, 11, 10, 9, 4, 8, 12};
00109 static label SammTrim3Rot19[10] = {3, 2, 6, 7, 11, 10, 9, 5, 8, 12};
00110 static label SammTrim3Rot20[10] = {4, 5, 1, 0, 11, 10, 9, 2, 8, 12};
00111 static label SammTrim3Rot21[10] = {5, 1, 0, 4, 11, 10, 9, 3, 8, 12};
00112 static label SammTrim3Rot22[10] = {1, 0, 4, 5, 11, 10, 9, 7, 8, 12};
00113 static label SammTrim3Rot23[10] = {0, 4, 5, 1, 11, 10, 9, 6, 8, 12};
00114
00115 sammAddressingTable[7] = SammTrim3Rot0;
00116 sammAddressingTable[14] = SammTrim3Rot1;
00117 sammAddressingTable[13] = SammTrim3Rot2;
00118 sammAddressingTable[11] = SammTrim3Rot3;
00119 sammAddressingTable[112] = SammTrim3Rot4;
00120 sammAddressingTable[224] = SammTrim3Rot5;
00121 sammAddressingTable[208] = SammTrim3Rot6;
00122 sammAddressingTable[176] = SammTrim3Rot7;
00123 sammAddressingTable[38] = SammTrim3Rot8;
00124 sammAddressingTable[70] = SammTrim3Rot9;
00125 sammAddressingTable[100] = SammTrim3Rot10;
00126 sammAddressingTable[98] = SammTrim3Rot11;
00127 sammAddressingTable[25] = SammTrim3Rot12;
00128 sammAddressingTable[137] = SammTrim3Rot13;
00129 sammAddressingTable[152] = SammTrim3Rot14;
00130 sammAddressingTable[145] = SammTrim3Rot15;
00131 sammAddressingTable[49] = SammTrim3Rot16;
00132 sammAddressingTable[50] = SammTrim3Rot17;
00133 sammAddressingTable[35] = SammTrim3Rot18;
00134 sammAddressingTable[19] = SammTrim3Rot19;
00135 sammAddressingTable[200] = SammTrim3Rot20;
00136 sammAddressingTable[196] = SammTrim3Rot21;
00137 sammAddressingTable[76] = SammTrim3Rot22;
00138 sammAddressingTable[140] = SammTrim3Rot23;
00139
00140
00141
00142 static label SammTrim4Rot0[10] = {6, 7, 2, 5, 13, 12 ,11, 10, 9, 8};
00143 static label SammTrim4Rot1[10] = {7, 4, 3, 6, 13, 12 ,11, 10, 9, 8};
00144 static label SammTrim4Rot2[10] = {4, 5, 6, 7, 13, 12 ,11, 10, 9, 8};
00145 static label SammTrim4Rot3[10] = {5, 6, 1, 4, 13, 12 ,11, 10, 9, 8};
00146 static label SammTrim4Rot4[10] = {2, 1, 6, 3, 13, 12 ,11, 10, 9, 8};
00147 static label SammTrim4Rot5[10] = {3, 2, 7, 0, 13, 12 ,11, 10, 9, 8};
00148 static label SammTrim4Rot6[10] = {0, 3, 4, 1, 13, 12 ,11, 10, 9, 8};
00149 static label SammTrim4Rot7[10] = {1, 0, 5, 2, 13, 12 ,11, 10, 9, 8};
00150
00151 sammAddressingTable[27] = SammTrim4Rot0;
00152 sammAddressingTable[39] = SammTrim4Rot1;
00153 sammAddressingTable[78] = SammTrim4Rot2;
00154 sammAddressingTable[141] = SammTrim4Rot3;
00155 sammAddressingTable[177] = SammTrim4Rot4;
00156 sammAddressingTable[114] = SammTrim4Rot5;
00157 sammAddressingTable[228] = SammTrim4Rot6;
00158 sammAddressingTable[216] = SammTrim4Rot7;
00159
00160
00161
00162 static label SammTrim5Rot0[8] = {12, 0, 1, 2, 8, 11, 10, 9};
00163 static label SammTrim5Rot1[8] = {12, 1, 2, 3, 8, 11, 10, 9};
00164 static label SammTrim5Rot2[8] = {12, 2, 3, 0, 8, 11, 10, 9};
00165 static label SammTrim5Rot3[8] = {12, 3, 0, 1, 8, 11, 10, 9};
00166 static label SammTrim5Rot4[8] = {12, 6, 5, 4, 8, 11, 10, 9};
00167 static label SammTrim5Rot5[8] = {12, 7, 6, 5, 8, 11, 10, 9};
00168 static label SammTrim5Rot6[8] = {12, 4, 7, 6, 8, 11, 10, 9};
00169 static label SammTrim5Rot7[8] = {12, 5, 4, 7, 8, 11, 10, 9};
00170 static label SammTrim5Rot8[8] = {12, 2, 1, 5, 8, 11, 10, 9};
00171 static label SammTrim5Rot9[8] = {12, 6, 2, 1, 8, 11, 10, 9};
00172 static label SammTrim5Rot10[8] = {12, 5, 6, 2, 8, 11, 10, 9};
00173 static label SammTrim5Rot11[8] = {12, 1, 5, 6, 8, 11, 10, 9};
00174 static label SammTrim5Rot12[8] = {12, 4, 0, 3, 8, 11, 10, 9};
00175 static label SammTrim5Rot13[8] = {12, 0, 3, 7, 8, 11, 10, 9};
00176 static label SammTrim5Rot14[8] = {12, 3, 7, 4, 8, 11, 10, 9};
00177 static label SammTrim5Rot15[8] = {12, 7, 4, 0, 8, 11, 10, 9};
00178 static label SammTrim5Rot16[8] = {12, 0, 4, 5, 8, 11, 10, 9};
00179 static label SammTrim5Rot17[8] = {12, 4, 5, 1, 8, 11, 10, 9};
00180 static label SammTrim5Rot18[8] = {12, 5, 1, 0, 8, 11, 10, 9};
00181 static label SammTrim5Rot19[8] = {12, 1, 0, 4, 8, 11, 10, 9};
00182 static label SammTrim5Rot20[8] = {12, 6, 7, 3, 8, 11, 10, 9};
00183 static label SammTrim5Rot21[8] = {12, 2, 6, 7, 8, 11, 10, 9};
00184 static label SammTrim5Rot22[8] = {12, 3, 2, 6, 8, 11, 10, 9};
00185 static label SammTrim5Rot23[8] = {12, 7, 3, 2, 8, 11, 10, 9};
00186
00187 sammAddressingTable[248] = SammTrim5Rot0;
00188 sammAddressingTable[241] = SammTrim5Rot1;
00189 sammAddressingTable[242] = SammTrim5Rot2;
00190 sammAddressingTable[244] = SammTrim5Rot3;
00191 sammAddressingTable[143] = SammTrim5Rot4;
00192 sammAddressingTable[31] = SammTrim5Rot5;
00193 sammAddressingTable[47] = SammTrim5Rot6;
00194 sammAddressingTable[79] = SammTrim5Rot7;
00195 sammAddressingTable[217] = SammTrim5Rot8;
00196 sammAddressingTable[185] = SammTrim5Rot9;
00197 sammAddressingTable[155] = SammTrim5Rot10;
00198 sammAddressingTable[157] = SammTrim5Rot11;
00199 sammAddressingTable[230] = SammTrim5Rot12;
00200 sammAddressingTable[118] = SammTrim5Rot13;
00201 sammAddressingTable[103] = SammTrim5Rot14;
00202 sammAddressingTable[110] = SammTrim5Rot15;
00203 sammAddressingTable[206] = SammTrim5Rot16;
00204 sammAddressingTable[205] = SammTrim5Rot17;
00205 sammAddressingTable[220] = SammTrim5Rot18;
00206 sammAddressingTable[236] = SammTrim5Rot19;
00207 sammAddressingTable[55] = SammTrim5Rot20;
00208 sammAddressingTable[59] = SammTrim5Rot21;
00209 sammAddressingTable[179] = SammTrim5Rot22;
00210 sammAddressingTable[115] = SammTrim5Rot23;
00211
00212
00213
00214 static label SammTrim8[12] = {8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
00215
00216 sammAddressingTable[255] = SammTrim8;
00217 }
00218
00219
00220
00221
00222
00223