mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Use the PackedList unset() method in a few places
- also PackedBoolList.get(x) == 1 can be written without the == comparison since the unsigned -> bool conversion is fast
This commit is contained in:
@ -228,14 +228,14 @@ Foam::pointField Foam::autoSnapDriver::smoothPatchDisplacement
|
||||
label f0 = baffles[i].first();
|
||||
label f1 = baffles[i].second();
|
||||
|
||||
if (isMasterFace.get(f0) == 1)
|
||||
if (isMasterFace.get(f0))
|
||||
{
|
||||
// Make f1 a slave
|
||||
isMasterFace.set(f1, 0);
|
||||
isMasterFace.unset(f1);
|
||||
}
|
||||
else if (isMasterFace.get(f1) == 1)
|
||||
else if (isMasterFace.get(f1))
|
||||
{
|
||||
isMasterFace.set(f0, 0);
|
||||
isMasterFace.unset(f0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -262,7 +262,7 @@ Foam::pointField Foam::autoSnapDriver::smoothPatchDisplacement
|
||||
{
|
||||
label faceI = pFaces[pfI];
|
||||
|
||||
if (isMasterFace.get(pp.addressing()[faceI]) == 1)
|
||||
if (isMasterFace.get(pp.addressing()[faceI]))
|
||||
{
|
||||
avgBoundary[patchPointI] += pp[faceI].centre(points);
|
||||
nBoundary[patchPointI]++;
|
||||
@ -451,7 +451,7 @@ Foam::pointField Foam::autoSnapDriver::smoothPatchDisplacement
|
||||
|
||||
point newPos;
|
||||
|
||||
if (nonManifoldPoint.get(i) == 0u)
|
||||
if (!nonManifoldPoint.get(i))
|
||||
{
|
||||
// Points that are manifold. Weight the internal and boundary
|
||||
// by their number of faces and blend with
|
||||
@ -1373,7 +1373,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::autoSnapDriver::repatchToSurface
|
||||
{
|
||||
label faceI = pp.addressing()[i];
|
||||
|
||||
if (hitSurface[i] != -1 && (isZonedFace.get(faceI) == 0))
|
||||
if (hitSurface[i] != -1 && !isZonedFace.get(faceI))
|
||||
{
|
||||
closestPatch[i] = globalToPatch_
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user