33 template<
class TransferType,
class TrackingData>
40 template<
class TransferType,
class TrackingData>
45 List<TransferType>& faceDist
50 label nChangedFaces = 0;
54 if (patchIDs.found(patchi))
56 const polyPatch&
patch =
mesh.boundaryMesh()[patchi];
58 const Field<Type>& patchField = initialPatchValuePtrs_[patchi];
62 label meshFacei =
patch.start() + patchFacei;
64 changedFaces[nChangedFaces] = meshFacei;
66 faceDist[nChangedFaces] =
69 patch.faceCentres()[patchFacei],
70 patchField[patchFacei],
82 template<
class TransferType,
class TrackingData>
85 const MeshWave<TransferType, TrackingData>& waveInfo
90 const List<TransferType>& cellInfo = waveInfo.allCellInfo();
91 const List<TransferType>& faceInfo = waveInfo.allFaceInfo();
96 distance_.setSize(cellInfo.size());
100 const TransferType & wpn = cellInfo[celli];
102 scalar dist = wpn.distSqr();
104 if (cellInfo[celli].valid(waveInfo.data()))
108 cellData_[celli] = cellInfo[celli].data();
115 distance_[celli] =
mag(dist);
118 cellData_[celli] = cellInfo[celli].data();
125 forAll(patchDistance_, patchi)
127 const polyPatch&
patch =
mesh.boundaryMesh()[patchi];
132 patchDistance_.set(patchi, patchFieldPtr);
137 Field<Type>* patchDataFieldPtr =
new Field<Type>(
patch.size());
139 patchData_.set(patchi, patchDataFieldPtr);
141 Field<Type>& patchDataField = *patchDataFieldPtr;
144 forAll(patchField, patchFacei)
146 label meshFacei =
patch.start() + patchFacei;
148 scalar dist = faceInfo[meshFacei].distSqr();
150 if (faceInfo[meshFacei].valid(waveInfo.data()))
154 patchField[patchFacei] =
Foam::sqrt(dist) + SMALL;
156 patchDataField[patchFacei] = faceInfo[meshFacei].data();
162 patchField[patchFacei] =
mag(dist);
165 patchDataField[patchFacei] = faceInfo[meshFacei].data();
179 template<
class TransferType,
class TrackingData>
185 const bool correctWalls,
191 initialPatchValuePtrs_(initialPatchValuePtrs),
192 correctWalls_(correctWalls),
195 distance_(
mesh.nCells()),
197 cellData_(
mesh.nCells()),
206 template<
class TransferType,
class TrackingData>
214 template<
class TransferType,
class TrackingData>
223 label nWalls = sumPatchSize(patchIDs_);
228 setChangedFaces(patchIDs_, changedFaces, faceDist);
239 mesh().globalData().nTotalCells()+1,
248 nUnset_ = getValues(waveInfo);
259 correctBoundaryFaceCells
266 correctBoundaryPointCells
276 const labelList wallCells(nearestFace.toc());
278 forAll(wallCells, wallCelli)
280 label celli = wallCells[wallCelli];
282 label facei = nearestFace[celli];
284 cellData_[celli] = faceInfo[facei].data();