MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / correct

Function correct

src/meshTools/cellDist/patchWave/patchWave.C:160–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
159
160void Foam::patchWave::correct()
161{
162 // Set initial changed faces: set wallPoint for wall faces to wall centre
163
164 label nPatch = sumPatchSize(patchIDs_);
165
166 List<wallPoint> faceDist(nPatch);
167 labelList changedFaces(nPatch);
168
169 // Set to faceDist information to facecentre on walls.
170 setChangedFaces(patchIDs_, changedFaces, faceDist);
171
172 // Do calculate wall distance by 'growing' from faces.
173 MeshWave<wallPoint> waveInfo
174 (
175 mesh(),
176 changedFaces,
177 faceDist,
178 mesh().globalData().nTotalCells()+1 // max iterations
179 );
180
181 // Copy distance into return field
182 nUnset_ = getValues(waveInfo);
183
184 // Correct wall cells for true distance
185 if (correctWalls_)
186 {
187 Map<label> nearestFace(2*nPatch);
188
189 correctBoundaryFaceCells
190 (
191 patchIDs_,
192 distance_,
193 nearestFace
194 );
195
196 correctBoundaryPointCells
197 (
198 patchIDs_,
199 distance_,
200 nearestFace
201 );
202 }
203}
204
205
206// ************************************************************************* //

Callers 1

patchDataWave.CFile · 0.70

Calls 5

meshFunction · 0.85
correctBoundaryFaceCellsFunction · 0.85
nTotalCellsMethod · 0.80
setChangedFacesFunction · 0.70

Tested by

no test coverage detected