37 void formVfValues (
const volScalarField& iF,List3<scalar>& procVfValues)
42 if (procPairs_[patchI] > -1)
44 procVfValues[patchI].resize(procWf2_[patchI].size());
45 forAll(procVfValues[patchI], faceI)
47 procVfValues[patchI][faceI].resize(procWf2_[patchI][faceI].size());
48 procVfValues[patchI][faceI] = 0.0;
49 forAll(myProcPatchCells_[patchI][faceI], cellI)
51 cellId = myProcPatchCells_[patchI][faceI][cellI];
52 procVfValues[patchI][faceI][cellI] = iF.primitiveField()[cellId];
59 PstreamBuffers pBuffers(Pstream::commsTypes::nonBlocking);
62 label procId = neigProcs_[procI];
63 DynamicList<scalar> locVf;
65 if (procPairs_[procI] > -1)
67 forAll(procVfValues[procI], faceI)
72 cellI <= ownEnd_[procI][faceI];
76 locVf.append(procVfValues[procI][faceI][cellI]);
83 label addrId = corProcIds_[procId];
84 forAll(corCellIds_[addrId], iCellId)
86 cellId = corCellIds_[addrId][iCellId];
87 locVf.append(iF.primitiveField()[cellId]);
91 UOPstream oProcStr(procId, pBuffers);
96 pBuffers.finishedSends();
101 label procId = neigProcs_[procI];
103 UIPstream iProcStr(procId, pBuffers);
104 List<scalar> locVf (iProcStr);
106 if (procPairs_[procI] > -1)
109 forAll(neiStart_[procI], iFace)
113 iCell=neiStart_[procI][iFace];
114 iCell<=neiEnd_[procI][iFace];
118 procVfValues[procI][iFace][iCell] =
131 const List<Triple<label> >& addr = corAddr_[iCorProc];
136 patchNo = addr[iVal][0];
137 faceNo = addr[iVal][1];
138 cellNo = addr[iVal][2];
140 offset = corStart_[patchNo][faceNo];
141 procVfValues[patchNo][faceNo][cellNo+offset] = locVf[iVal];
152 template<
class FieldType>
153 void formVfValues (
const GeometricField<FieldType, fvPatchField, volMesh>& iF,List<List3<scalar>>& procVfValues)
157 label nComps = pTraits<FieldType>::nComponents;
159 procVfValues.resize(nComps);
160 for(label compI = 0;compI <= nComps-1;compI++)
162 forAll(procPairs_, patchI)
164 if (procPairs_[patchI] > -1)
166 procVfValues[compI].resize(procVfValues[compI].size()+1);
167 procVfValues[compI][patchI].resize(procWf2_[patchI].size());
169 forAll(procVfValues[compI][patchI], faceI)
171 procVfValues[compI][patchI][faceI].resize(procWf2_[patchI][faceI].size());
173 forAll(procVfValues[compI][patchI][faceI], cellI)
175 procVfValues[compI][patchI][faceI][cellI] =0.0;
178 procVfValues[compI][patchI][faceI][cellI] = iF.primitiveField()[cellId].component(compI);
189 PstreamBuffers pBuffers(Pstream::commsTypes::nonBlocking);
193 label procId = neigProcs_[procI];
194 List<DynamicList<scalar>> locVf;
195 locVf.resize(nComps);
197 for(label compI = 0;compI <= nComps-1;compI++)
199 if (procPairs_[procI] > -1)
201 forAll(procVfValues[compI][procI], faceI)
206 cellI <= ownEnd_[procI][faceI];
211 locVf[compI].append(procVfValues[compI][procI][faceI][cellI]);
220 label addrId = corProcIds_[procId];
221 forAll(corCellIds_[addrId], iCellId)
223 cellId = corCellIds_[addrId][iCellId];
224 locVf[compI].append(iF.primitiveField()[cellId].component(compI));
228 UOPstream oProcStr(procId, pBuffers);
231 pBuffers.finishedSends();
238 label procId = neigProcs_[procI];
240 UIPstream iProcStr(procId, pBuffers);
242 List<List<scalar>> locVf(iProcStr);
244 if (procPairs_[procI] > -1)
247 forAll(neiStart_[procI], iFace)
251 iCell=neiStart_[procI][iFace];
252 iCell<=neiEnd_[procI][iFace];
256 for(label compI = 0;compI <= nComps-1;compI++)
257 procVfValues[compI][procI][iFace][iCell] =
270 const List<Triple<label> >& addr = corAddr_[iCorProc];
275 patchNo = addr[iVal][0];
276 faceNo = addr[iVal][1];
277 cellNo = addr[iVal][2];
278 offset = corStart_[patchNo][faceNo];
280 for(label compI = 0;compI <= nComps-1;compI++)
281 procVfValues[compI][patchNo][faceNo][cellNo+offset] = locVf[compI][iVal];