47 void pointPatchInterpolation::makePatchPatchAddressing()
51 Info<<
"pointPatchInterpolation::makePatchPatchAddressing() : "
52 <<
"constructing boundary addressing"
56 const fvBoundaryMesh& bm = fvMesh_.
boundary();
61 label nPatchPatchPoints = 0;
65 if(!isA<emptyFvPatch>(bm[
patchi]) && !bm[patchi].coupled())
67 nPatchPatchPoints += bm[
patchi].patch().boundaryPoints().size();
73 Map<label> patchPatchPointSet(2*nPatchPatchPoints);
75 patchPatchPoints_.
setSize(nPatchPatchPoints);
77 List<pointConstraint> patchPatchPointConstraints(nPatchPatchPoints);
83 if(!isA<emptyFvPatch>(bm[patchi]) && !bm[patchi].coupled())
90 label ppp = meshPoints[bp[pointi]];
94 if (iter == patchPatchPointSet.end())
96 patchPatchPointSet.insert(ppp, pppi);
97 patchPatchPoints_[pppi] = ppp;
99 pbm[
patchi].applyConstraint
102 patchPatchPointConstraints[pppi]
108 pbm[
patchi].applyConstraint
111 patchPatchPointConstraints[iter()]
118 nPatchPatchPoints = pppi;
119 patchPatchPoints_.
setSize(nPatchPatchPoints);
120 patchPatchPointConstraints.setSize(nPatchPatchPoints);
122 patchPatchPointConstraintPoints_.
setSize(nPatchPatchPoints);
123 patchPatchPointConstraintTensors_.
setSize(nPatchPatchPoints);
125 label nConstraints = 0;
127 forAll(patchPatchPointConstraints, i)
129 if (patchPatchPointConstraints[i].first() != 0)
131 patchPatchPointConstraintPoints_[nConstraints] =
132 patchPatchPoints_[i];
134 patchPatchPointConstraintTensors_[nConstraints] =
135 patchPatchPointConstraints[i].constraintTransformation();
141 patchPatchPointConstraintPoints_.
setSize(nConstraints);
142 patchPatchPointConstraintTensors_.
setSize(nConstraints);
145 patchInterpolators_.
clear();
146 patchInterpolators_.
setSize(bm.size());
150 patchInterpolators_.
set
159 Info<<
"pointPatchInterpolation::makePatchPatchAddressing() : "
160 <<
"finished constructing boundary addressing"
166 void pointPatchInterpolation::makePatchPatchWeights()
170 Info<<
"pointPatchInterpolation::makePatchPatchWeights() : "
171 <<
"constructing boundary weighting factors"
175 patchPatchPointWeights_.
clear();
176 patchPatchPointWeights_.
setSize(patchPatchPoints_.
size());
180 const fvBoundaryMesh& bm = fvMesh_.
boundary();
187 fvMesh_.polyMesh::instance(),
194 forAll(patchPatchPoints_, pointi)
196 const label curPoint = patchPatchPoints_[pointi];
197 const labelList& curFaces = pf[curPoint];
199 patchPatchPointWeights_[pointi].
setSize(curFaces.size());
200 scalarList& pw = patchPatchPointWeights_[pointi];
202 label nFacesAroundPoint = 0;
213 if (!isA<emptyFvPatch>(bm[patchi]) && !bm[patchi].coupled())
217 - centres.boundaryField()[
patchi]
218 [bm[
patchi].patch().whichFace(curFaces[facei])];
220 pw[nFacesAroundPoint] = 1.0/(
mag(d)+VSMALL);
228 pw.setSize(nFacesAroundPoint);
231 sumWeights[curPoint] +=
sum(pw);
239 if (sumWeights.boundaryField()[
patchi].coupled())
241 refCast<coupledPointPatchScalarField>
242 (sumWeights.boundaryField()[
patchi]).initSwapAdd
244 sumWeights.internalField()
251 if (sumWeights.boundaryField()[
patchi].coupled())
253 refCast<coupledPointPatchScalarField>
254 (sumWeights.boundaryField()[
patchi]).swapAdd
256 sumWeights.internalField()
263 forAll(patchPatchPoints_, pointi)
265 scalarList& pw = patchPatchPointWeights_[pointi];
266 scalar sumw = sumWeights[patchPatchPoints_[pointi]];
277 Info<<
"pointPatchInterpolation::makePatchPatchWeights() : "
278 <<
"finished constructing boundary weighting factors"
286 pointPatchInterpolation::pointPatchInterpolation(
const fvMesh& vm)
304 makePatchPatchAddressing();
305 makePatchPatchWeights();
311 forAll(patchInterpolators_, patchi)
313 patchInterpolators_[
patchi].movePoints();
316 makePatchPatchWeights();
325 void pointPatchInterpolation::applyCornerConstraints<scalar>