36 #include <HashTable.H>
38 #include "emptyFvPatch.H"
39 #include "coupledFvPatch.H"
40 #include "wedgeFvPatch.H"
41 #include "symmetryFvPatch.H"
42 #include "symmetryPlaneFvPatch.H"
52 surfaceScalarField sF = linearInterpolate(iF);
53 surfaceScalarField sngF (fvc::snGrad(iF));
55 tmp<surfaceVectorField> tgradIF(0.0 *
nf_ * sngF);
56 surfaceVectorField& gradIF = tgradIF.ref();
61 vector gf = vector::zero;
64 if (
mesh_.isInternalFace(facei))
82 gradIF[dFaceId] = sngF[dFaceId] *
nf_[dFaceId];
88 bool notConstrain =
true;
89 const fvPatch& fvp =
mesh_.boundary()[ipatch];
92 isA<emptyFvPatch>(fvp) ||
93 isA<wedgeFvPatch>(fvp) ||
94 isA<coupledFvPatch>(fvp) ||
95 isA<symmetryFvPatch>(fvp) ||
96 isA<symmetryPlaneFvPatch>(fvp)
100 notConstrain =
false;
105 gradIF.boundaryFieldRef()[ipatch] =
nf_.boundaryField()[ipatch] *
106 iF.boundaryField()[ipatch].snGrad();
111 if(!Pstream::parRun())
129 procVfValues[patchI].resize(
procWf2_[patchI].size());
130 forAll(procVfValues[patchI], faceI)
132 procVfValues[patchI][faceI].resize(
procWf2_[patchI][faceI].size());
133 procVfValues[patchI][faceI] = 0.0;
137 procVfValues[patchI][faceI][cellI] = iF.primitiveField()[cellId];
145 PstreamBuffers pBuffers(Pstream::commsTypes::nonBlocking);
151 DynamicList<scalar> locVf;
155 forAll(procVfValues[procI], faceI)
160 cellI <=
ownEnd_[procI][faceI];
164 locVf.append(procVfValues[procI][faceI][cellI]);
177 locVf.append(iF.primitiveField()[cellId]);
181 UOPstream oProcStr(procId, pBuffers);
186 pBuffers.finishedSends();
192 UIPstream iProcStr(procId, pBuffers);
193 List<scalar> locVf (iProcStr);
207 procVfValues[procI][iFace][iCell] =
220 const List<Triple<label> >& addr =
corAddr_[iCorProc];
224 patchNo = addr[iVal][0];
225 faceNo = addr[iVal][1];
226 cellNo = addr[iVal][2];
229 procVfValues[patchNo][faceNo][cellNo+offset] = locVf[iVal];
239 if (procPatchId > -1)
241 fvsPatchVectorField& pgradf = gradIF.boundaryFieldRef()[procPatchId];
251 gf = gf + pwf2[iFace][i]*pgdf[iFace][i]*
252 (pvf[iFace][i] - sF.boundaryField()[procPatchId][iFace]);
260 forAll(degProcFaces, iFace)
262 degId = degProcFaces[iFace];
264 pgradf[degId] =
nf_.boundaryField()[procPatchId][degId]*
265 sngF.boundaryField()[procPatchId][degId];
List< DynamicList< label > > procDegFaces_
tmp< surfaceVectorField > Grad(const volScalarField &iF)
Calculate gradient of volume scalar function on the faces.
labelHashTable< label > corProcIds_
List2< label > corCellIds_
List2< Triple< label > > corAddr_
List3< label > myProcPatchCells_
labelListList neighbourCells_
DynamicList< label > internalDegFaces_