32 template<
class TransferType>
37 List<TransferType>& faceDist
42 label nChangedFaces = 0;
44 forAll(mesh.boundaryMesh(), patchI)
46 if (patchIDs.found(patchI))
48 const polyPatch& patch = mesh.boundaryMesh()[patchI];
50 const Field<Type>& patchField = initialPatchValuePtrs_[patchI];
52 forAll(patch.faceCentres(), patchFaceI)
54 label meshFaceI = patch.start() + patchFaceI;
56 changedFaces[nChangedFaces] = meshFaceI;
58 faceDist[nChangedFaces] =
61 patch.faceCentres()[patchFaceI],
62 patchField[patchFaceI],
74 template<
class TransferType>
77 const MeshWave<TransferType>& waveInfo
82 const List<TransferType>& cellInfo = waveInfo.allCellInfo();
83 const List<TransferType>& faceInfo = waveInfo.allFaceInfo();
88 distance_.setSize(cellInfo.size());
92 const TransferType & wpn = cellInfo[cellI];
94 scalar
dist = wpn.distSqr();
96 if (cellInfo[cellI].valid())
100 cellData_[cellI] = cellInfo[cellI].data();
106 distance_[cellI] =
dist;
109 cellData_[cellI] = cellInfo[cellI].data();
116 forAll(patchDistance_, patchI)
118 const polyPatch& patch = mesh.boundaryMesh()[patchI];
123 patchDistance_.set(patchI, patchFieldPtr);
128 Field<Type>* patchDataFieldPtr =
new Field<Type>(patch.size());
130 patchData_.set(patchI, patchDataFieldPtr);
132 Field<Type>& patchDataField = *patchDataFieldPtr;
135 forAll(patchField, patchFaceI)
137 label meshFaceI = patch.start() + patchFaceI;
139 scalar dist = faceInfo[meshFaceI].distSqr();
141 if (faceInfo[meshFaceI].valid())
145 patchField[patchFaceI] =
Foam::sqrt(dist) + SMALL;
147 patchDataField[patchFaceI] = faceInfo[meshFaceI].data();
153 patchField[patchFaceI] =
dist;
156 patchDataField[patchFaceI] = faceInfo[meshFaceI].data();
170 template<
class TransferType>
176 const bool correctWalls
181 initialPatchValuePtrs_(initialPatchValuePtrs),
182 correctWalls_(correctWalls),
195 template<
class TransferType>
203 template<
class TransferType>
212 label nWalls = sumPatchSize(patchIDs_);
217 setChangedFaces(patchIDs_, changedFaces, faceDist);
228 mesh().globalData().nTotalCells()
236 nUnset_ = getValues(waveInfo);
247 correctBoundaryFaceCells
254 correctBoundaryPointCells
266 forAll(wallCells, wallCellI)
268 label cellI = wallCells[wallCellI];
270 label faceI = nearestFace[cellI];
272 cellData_[cellI] = faceInfo[faceI].
data();