mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Using FaceCellWave instead of MeshWave in testWallDist2.C. Does
not compile in old form.
This commit is contained in:
@ -109,12 +109,16 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<wallPoint> allFaceInfo(mesh.nFaces());
|
||||||
|
List<wallPoint> allCellInfo(mesh.nCells());
|
||||||
|
|
||||||
MeshWave<wallPoint> wallDistCalc
|
FaceCellWave<wallPoint> wallDistCalc
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
changedFaces,
|
changedFaces,
|
||||||
faceDist,
|
faceDist,
|
||||||
|
allFaceInfo,
|
||||||
|
allCellInfo,
|
||||||
0 // max iterations
|
0 // max iterations
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -149,16 +153,13 @@ int main(int argc, char *argv[])
|
|||||||
// Copy face and cell values into field
|
// Copy face and cell values into field
|
||||||
//
|
//
|
||||||
|
|
||||||
const List<wallPoint>& cellInfo = wallDistCalc.allCellInfo();
|
|
||||||
const List<wallPoint>& faceInfo = wallDistCalc.allFaceInfo();
|
|
||||||
|
|
||||||
label nIllegal = 0;
|
label nIllegal = 0;
|
||||||
|
|
||||||
// Copy cell values
|
// Copy cell values
|
||||||
forAll(cellInfo, cellI)
|
forAll(allCellInfo, cellI)
|
||||||
{
|
{
|
||||||
scalar dist = cellInfo[cellI].distSqr();
|
scalar dist = allCellInfo[cellI].distSqr();
|
||||||
if (cellInfo[cellI].valid())
|
if (allCellInfo[cellI].valid())
|
||||||
{
|
{
|
||||||
wallDistUncorrected[cellI] = Foam::sqrt(dist);
|
wallDistUncorrected[cellI] = Foam::sqrt(dist);
|
||||||
}
|
}
|
||||||
@ -180,8 +181,8 @@ int main(int argc, char *argv[])
|
|||||||
label meshFaceI =
|
label meshFaceI =
|
||||||
patchField.patch().patch().start() + patchFaceI;
|
patchField.patch().patch().start() + patchFaceI;
|
||||||
|
|
||||||
scalar dist = faceInfo[meshFaceI].distSqr();
|
scalar dist = allFaceInfo[meshFaceI].distSqr();
|
||||||
if (faceInfo[meshFaceI].valid())
|
if (allFaceInfo[meshFaceI].valid())
|
||||||
{
|
{
|
||||||
patchField[patchFaceI] = Foam::sqrt(dist);
|
patchField[patchFaceI] = Foam::sqrt(dist);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user