Resolve warning messages generated by Clang-15

This commit is contained in:
Will Bainbridge
2023-01-03 10:11:16 +00:00
parent b082f06ac0
commit 20c7c7c21a
25 changed files with 79 additions and 240 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -169,23 +169,14 @@ template<class Triangulation>
void Foam::DelaunayMesh<Triangulation>::printVertexInfo(Ostream& os) const
{
label nInternal = 0;
label nInternalRef = 0;
label nUnassigned = 0;
label nUnassignedRef = 0;
label nInternalNearBoundary = 0;
label nInternalNearBoundaryRef = 0;
label nInternalSurface = 0;
label nInternalSurfaceRef = 0;
label nInternalFeatureEdge = 0;
label nInternalFeatureEdgeRef = 0;
label nInternalFeaturePoint = 0;
label nInternalFeaturePointRef = 0;
label nExternalSurface = 0;
label nExternalSurfaceRef = 0;
label nExternalFeatureEdge = 0;
label nExternalFeatureEdgeRef = 0;
label nExternalFeaturePoint = 0;
label nExternalFeaturePointRef = 0;
label nFar = 0;
label nReferred = 0;
@ -201,7 +192,6 @@ void Foam::DelaunayMesh<Triangulation>::printVertexInfo(Ostream& os) const
if (vit->referred())
{
nReferred++;
nInternalRef++;
}
nInternal++;
@ -211,7 +201,6 @@ void Foam::DelaunayMesh<Triangulation>::printVertexInfo(Ostream& os) const
if (vit->referred())
{
nReferred++;
nUnassignedRef++;
}
nUnassigned++;
@ -221,7 +210,6 @@ void Foam::DelaunayMesh<Triangulation>::printVertexInfo(Ostream& os) const
if (vit->referred())
{
nReferred++;
nInternalNearBoundaryRef++;
}
nInternalNearBoundary++;
@ -231,7 +219,6 @@ void Foam::DelaunayMesh<Triangulation>::printVertexInfo(Ostream& os) const
if (vit->referred())
{
nReferred++;
nInternalSurfaceRef++;
}
nInternalSurface++;
@ -241,7 +228,6 @@ void Foam::DelaunayMesh<Triangulation>::printVertexInfo(Ostream& os) const
if (vit->referred())
{
nReferred++;
nInternalFeatureEdgeRef++;
}
nInternalFeatureEdge++;
@ -251,7 +237,6 @@ void Foam::DelaunayMesh<Triangulation>::printVertexInfo(Ostream& os) const
if (vit->referred())
{
nReferred++;
nInternalFeaturePointRef++;
}
nInternalFeaturePoint++;
@ -261,7 +246,6 @@ void Foam::DelaunayMesh<Triangulation>::printVertexInfo(Ostream& os) const
if (vit->referred())
{
nReferred++;
nExternalSurfaceRef++;
}
nExternalSurface++;
@ -271,7 +255,6 @@ void Foam::DelaunayMesh<Triangulation>::printVertexInfo(Ostream& os) const
if (vit->referred())
{
nReferred++;
nExternalFeatureEdgeRef++;
}
nExternalFeatureEdge++;
@ -281,7 +264,6 @@ void Foam::DelaunayMesh<Triangulation>::printVertexInfo(Ostream& os) const
if (vit->referred())
{
nReferred++;
nExternalFeaturePointRef++;
}
nExternalFeaturePoint++;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -911,8 +911,6 @@ Foam::DistributedDelaunayMesh<Triangulation>::rangeInsertReferredWithInfo
typename Triangulation::Locate_type lt;
int li, lj;
label nNotInserted = 0;
labelPairHashSet uninserted
(
Triangulation::number_of_vertices()
@ -1037,7 +1035,6 @@ Foam::DistributedDelaunayMesh<Triangulation>::rangeInsertReferredWithInfo
else
{
uninserted.insert(labelPair(vert.procIndex(), vert.index()));
nNotInserted++;
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -183,52 +183,21 @@ Foam::tensor Foam::cellShapeControl::cellAlignment(const point& pt) const
}
else
{
label nFarPoints = 0;
triad tri;
for (label pI = 0; pI < 4; ++pI)
{
if (ch->vertex(pI)->farPoint())
if (bary[pI] > small)
{
nFarPoints++;
tri += triad(bary[pI]*ch->vertex(pI)->alignment());
}
}
// if (nFarPoints != 0)
// {
// for (label pI = 0; pI < 4; ++pI)
// {
// if (!ch->vertex(pI)->farPoint())
// {
// alignment = ch->vertex(pI)->alignment();
// }
// }
// }
// else
{
triad tri;
tri.normalise();
tri.orthogonalise();
tri = tri.sortxyz();
for (label pI = 0; pI < 4; ++pI)
{
if (bary[pI] > small)
{
tri += triad(bary[pI]*ch->vertex(pI)->alignment());
}
}
tri.normalise();
tri.orthogonalise();
tri = tri.sortxyz();
alignment = tri;
}
// cellShapeControlMesh::Vertex_handle nearV =
// shapeControlMesh_.nearest_vertex_in_cell
// (
// toPoint<cellShapeControlMesh::Point>(pt),
// ch
// );
//
// alignment = nearV->alignment();
alignment = tri;
}
return alignment;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -79,16 +79,9 @@ bool Foam::controlMeshRefinement::detectEdge
Foam::point midPoint = (a + b)/2.0;
label nIterations = 0;
while (true)
{
nIterations++;
if
(
magSqr(a - b) < tolSqr
)
if (magSqr(a - b) < tolSqr)
{
pointFound.setPoint(midPoint);
pointFound.setHit();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -72,8 +72,6 @@ bool Foam::featurePointConformer::createSpecialisedFeaturePoint
return false;
}
label nVert = foamyHexMesh_.number_of_vertices();
const label initialNumOfPoints = pts.size();
const scalar ppDist = foamyHexMesh_.pointPairDistance(featPt);
@ -267,7 +265,6 @@ bool Foam::featurePointConformer::createSpecialisedFeaturePoint
for (label i = 0; i < 2; ++i)
{
pts.remove();
nVert--;
}
return false;
@ -504,8 +501,6 @@ bool Foam::featurePointConformer::createSpecialisedFeaturePoint
return false;
}
label nVert = foamyHexMesh_.number_of_vertices();
const label initialNumOfPoints = pts.size();
const scalar ppDist = foamyHexMesh_.pointPairDistance(featPt);
@ -703,7 +698,6 @@ bool Foam::featurePointConformer::createSpecialisedFeaturePoint
for (label i = 0; i < 2; ++i)
{
pts.remove();
nVert--;
}
return false;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -122,12 +122,10 @@ void Foam::CV2D::insertPointPairs
if (meshControls().objOutput())
{
OFstream str(fName);
label vertI = 0;
forAll(surfacePoints, ppi)
{
meshTools::writeOBJ(str, toPoint3D(surfacePoints[ppi]));
vertI++;
}
Info<< "insertPointPairs: Written " << surfacePoints.size()