33 template<
class Type,
class TrackingData>
37 const label masterFaceLabel,
49 const face& masterFace = this->mesh_.faces()[masterFaceLabel];
51 const labelList& curFaceLabels = this->mesh_.cells()[celli];
53 oppositeFaceLabels.
clear();
55 forAll(curFaceLabels, facei)
58 const face& curFace = this->mesh_.faces()[curFaceLabels[facei]];
61 if (curFaceLabels[facei] != masterFaceLabel)
63 bool sharedPoint =
false;
69 const label l = curFace[pointi];
71 forAll(masterFace, masterPointi)
73 if (masterFace[masterPointi] == l)
80 if (sharedPoint)
break;
87 oppositeFaceLabels.
append(curFaceLabels[facei]);
98 template<
class Type,
class TrackingData>
120 changedOppositeFaces_(this->mesh_.nCells())
123 label iter = this->iterate(maxIter);
125 if ((maxIter > 0) && (iter >= maxIter))
128 <<
"Maximum number of iterations reached. Increase maxIter."
130 <<
" maxIter:" << maxIter <<
endl
131 <<
" nChangedCells:" << this->changedCells_.size() <<
endl
132 <<
" nChangedFaces:" << this->changedFaces_.size() <<
endl
140 template<
class Type,
class TrackingData>
143 const labelList& owner = this->mesh_.faceOwner();
144 const labelList& neighbour = this->mesh_.faceNeighbour();
145 label nInternalFaces = this->mesh_.nInternalFaces();
149 forAll(this->changedFaces_, changedFacei)
151 label facei = this->changedFaces_[changedFacei];
153 if (!this->changedFace_.test(facei))
157 <<
" not marked as having been changed"
162 const Type& neighbourWallInfo = this->allFaceInfo_[facei];
168 label celli = owner[facei];
169 Type& currentWallInfo = this->allCellInfo_[celli];
171 if (!currentWallInfo.equal(neighbourWallInfo, this->td_))
174 opposingFaceLabels(celli, facei, oppositeFaceLabels);
176 if (oppositeFaceLabels.size())
178 label sz = this->changedCells_.size();
184 this->propagationTol_,
187 if (this->changedCells_.size() > sz)
190 if (oppositeFaceLabels.size() == 1)
192 oppFacei = oppositeFaceLabels[0];
194 changedOppositeFaces_.
append(oppFacei);
201 if (facei < nInternalFaces)
203 label celli = neighbour[facei];
204 Type& currentWallInfo2 = this->allCellInfo_[celli];
206 if (!currentWallInfo2.equal(neighbourWallInfo, this->td_))
209 opposingFaceLabels(celli, facei, oppositeFaceLabels);
211 if (oppositeFaceLabels.size())
213 label sz = this->changedCells_.size();
219 this->propagationTol_,
222 if (this->changedCells_.size() > sz)
225 if (oppositeFaceLabels.size() == 1)
227 oppFacei = oppositeFaceLabels[0];
229 changedOppositeFaces_.
append(oppFacei);
236 this->changedFace_.unset(facei);
240 this->changedFaces_.clear();
244 Pout<<
" Changed cells : " << this->changedCells_.size()
249 label totNChanged = this->changedCells_.size();
257 template<
class Type,
class TrackingData>
260 forAll(this->changedCells_, changedCelli)
262 label celli = this->changedCells_[changedCelli];
263 label facei = changedOppositeFaces_[changedCelli];
265 if (!this->changedCell_.test(celli))
268 <<
"Cell " << celli <<
" not marked as having been changed"
274 const Type& neighbourWallInfo = this->allCellInfo_[celli];
278 Type& currentWallInfo = this->allFaceInfo_[facei];
280 if (!currentWallInfo.equal(neighbourWallInfo, this->td_))
287 this->propagationTol_,
294 this->changedCell_.unset(celli);
298 this->changedCells_.clear();
299 changedOppositeFaces_.clear();
301 if (this->hasCyclicPatches_)
304 this->handleCyclicPatches();
307 if (this->hasCyclicAMIPatches_)
309 this->handleAMICyclicPatches();
312 if (Pstream::parRun())
315 this->handleProcPatches();
320 Pout<<
" Changed faces : " << this->changedFaces_.size()
325 label totNChanged = this->changedFaces_.size();