45 label, std::map<std::pair<label, label>,
label>
46 >::const_iterator it = otherVrts_.find(pointI);
48 if( it != otherVrts_.end() )
50 const std::map<std::pair<label, label>,
label>& m = it->second;
52 std::map<std::pair<label, label>,
label>::const_iterator mit;
55 for(mit=m.begin();mit!=m.end();++mit)
57 if( mit->first.first != pKey )
63 for(mit=m.begin();mit!=m.end();++mit)
65 if( mit->first.first == pKey )
67 if( mit->first.second == pKey )
69 if( mit->first.first == mit->first.second )
77 return newLabelForVertex_[pointI];
88 const std::map<std::pair<label, label>,
label>& ms =
89 otherVrts_.find(
e.start())->second;
90 const std::map<std::pair<label, label>,
label>&
me =
91 otherVrts_.find(
e.end())->second;
94 Info <<
"Creating cell for edge with nodes " <<
e <<
endl;
97 std::map<std::pair<label, label>,
label>::const_iterator iter;
98 for(iter=ms.begin();iter!=ms.end();++iter)
99 Info <<
"1. Pair (" << iter->first.first <<
", "
100 << iter->first.second <<
") has value " << iter->second <<
endl;
101 for(iter=
me.begin();iter!=
me.end();++iter)
102 Info <<
"2. Pair (" << iter->first.first <<
", "
103 << iter->first.second <<
") has value " << iter->second <<
endl;
106 label p0s(-1), p1s(-1), ns(-1), p0e(-1), p1e(-1), ne(-1);
110 p0s = ms.find(std::pair<label, label>(pKeyI, pKeyI))->second;
111 p1s = ms.find(std::pair<label, label>(pKeyJ, pKeyJ))->second;
112 ns = newLabelForVertex_[
e.start()];
116 std::map<std::pair<label, label>,
label>::const_iterator it;
117 for(it=ms.begin();it!=ms.end();++it)
120 (it->first.first != pKeyJ) && (it->first.second != pKeyJ)
121 && (it->first.first != it->first.second)
127 (it->first.first != pKeyI) && (it->first.second != pKeyI)
128 && (it->first.first != it->first.second)
134 (it->first.first == it->first.second) &&
135 (it->first.first != pKeyI) && (it->first.first != pKeyJ)
144 p0e =
me.find(std::pair<label, label>(pKeyI, pKeyI))->second;
145 p1e =
me.find(std::pair<label, label>(pKeyJ, pKeyJ))->second;
146 ne = newLabelForVertex_[
e.end()];
150 std::map<std::pair<label, label>,
label>::const_iterator it;
151 for(it=
me.begin();it!=
me.end();++it)
154 (it->first.first != pKeyJ) && (it->first.second != pKeyJ)
155 && (it->first.first != it->first.second)
161 (it->first.first != pKeyI) && (it->first.second != pKeyI)
162 && (it->first.first != it->first.second)
168 (it->first.first == it->first.second) &&
169 (it->first.first != pKeyI) && (it->first.first != pKeyJ)
178 cellFaces[0][0] =
e.end();
179 cellFaces[0][1] =
e.start();
180 cellFaces[0][2] = p1s;
181 cellFaces[0][3] = p1e;
184 cellFaces[1][0] = p0e;
185 cellFaces[1][1] = ne;
186 cellFaces[1][2] = ns;
187 cellFaces[1][3] = p0s;
190 cellFaces[2][0] =
e.start();
191 cellFaces[2][1] =
e.end();
192 cellFaces[2][2] = p0e;
193 cellFaces[2][3] = p0s;
196 cellFaces[3][0] = p1s;
197 cellFaces[3][1] = ns;
198 cellFaces[3][2] = ne;
199 cellFaces[3][3] = p1e;
202 cellFaces[4][0] =
e.end();
203 cellFaces[4][1] = p1e;
204 cellFaces[4][2] = ne;
205 cellFaces[4][3] = p0e;
208 cellFaces[5][0] =
e.start();
209 cellFaces[5][1] = p0s;
210 cellFaces[5][2] = ns;
211 cellFaces[5][3] = p1s;
220 cellFaces[fI][pI] < 0 ||
221 cellFaces[fI][pI] >= mesh_.points().size()
237 const std::map<std::pair<label, label>,
label>& m =
238 otherVrts_.find(pointI)->second;
241 const label n = newLabelForVertex_[pointI];
243 m.find(std::pair<label, label>(pKeys[0], pKeys[0]))->second;
245 m.find(std::pair<label, label>(pKeys[1], pKeys[1]))->second;
247 m.find(std::pair<label, label>(pKeys[2], pKeys[2]))->second;
249 std::pair<label, label> pr;
251 pr.second = pKeys[1];
252 if( m.find(pr) == m.end() )
255 pr.second = pKeys[0];
257 const label p01 = m.find(pr)->second;
260 pr.second = pKeys[2];
261 if( m.find(pr) == m.end() )
264 pr.second = pKeys[0];
266 const label p02 = m.find(pr)->second;
269 pr.second = pKeys[2];
270 if( m.find(pr) == m.end() )
273 pr.second = pKeys[1];
275 const label p12 = m.find(pr)->second;
279 cellFaces[0][0] = pointI;
280 cellFaces[0][1] = p02;
281 cellFaces[0][2] = p00;
282 cellFaces[0][3] = p01;
284 cellFaces[1][0] = p12;
285 cellFaces[1][1] = p11;
287 cellFaces[1][3] = p22;
290 cellFaces[2][0] = pointI;
291 cellFaces[2][1] = p01;
292 cellFaces[2][2] = p11;
293 cellFaces[2][3] = p12;
295 cellFaces[3][0] = p02;
296 cellFaces[3][1] = p22;
298 cellFaces[3][3] = p00;
300 cellFaces[4][0] = pointI;
301 cellFaces[4][1] = p12;
302 cellFaces[4][2] = p22;
303 cellFaces[4][3] = p02;
305 cellFaces[5][0] = p01;
306 cellFaces[5][1] = p00;
308 cellFaces[5][3] = p11;