mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
gcc-4.6.0 warnings: removed initialised but unused variables
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -86,7 +86,6 @@ void starMesh::readPoints(const scalar scaleFactor)
|
|||||||
if (pointsFile.good())
|
if (pointsFile.good())
|
||||||
{
|
{
|
||||||
label pointLabel;
|
label pointLabel;
|
||||||
scalar x, y, z;
|
|
||||||
|
|
||||||
maxLabel = -1;
|
maxLabel = -1;
|
||||||
while (pointsFile)
|
while (pointsFile)
|
||||||
@ -97,9 +96,9 @@ void starMesh::readPoints(const scalar scaleFactor)
|
|||||||
|
|
||||||
maxLabel = max(maxLabel, pointLabel);
|
maxLabel = max(maxLabel, pointLabel);
|
||||||
|
|
||||||
x = readVtxCmpt(pointsFile);
|
readVtxCmpt(pointsFile);
|
||||||
y = readVtxCmpt(pointsFile);
|
readVtxCmpt(pointsFile);
|
||||||
z = readVtxCmpt(pointsFile);
|
readVtxCmpt(pointsFile);
|
||||||
|
|
||||||
readToNl(pointsFile);
|
readToNl(pointsFile);
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,6 @@ EXE_LIBS = \
|
|||||||
-linterfaceProperties \
|
-linterfaceProperties \
|
||||||
-lIOFunctionObjects \
|
-lIOFunctionObjects \
|
||||||
-ljobControl \
|
-ljobControl \
|
||||||
-lkineticTheoryModel \
|
|
||||||
-llagrangian \
|
-llagrangian \
|
||||||
-llagrangianIntermediate \
|
-llagrangianIntermediate \
|
||||||
-llaminarFlameSpeedModels \
|
-llaminarFlameSpeedModels \
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -383,16 +383,12 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
|
|||||||
|
|
||||||
forAll(quadFcs, quadI)
|
forAll(quadFcs, quadI)
|
||||||
{
|
{
|
||||||
label thisCellI;
|
|
||||||
|
|
||||||
if (substituteCell)
|
if (substituteCell)
|
||||||
{
|
{
|
||||||
thisCellI = cellI;
|
|
||||||
substituteCell = false;
|
substituteCell = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
thisCellI = mesh.nCells() + addCellI;
|
|
||||||
superCells[addCellI++] = cellI;
|
superCells[addCellI++] = cellI;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -430,16 +426,12 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
|
|||||||
|
|
||||||
forAll(triFcs, triI)
|
forAll(triFcs, triI)
|
||||||
{
|
{
|
||||||
label thisCellI;
|
|
||||||
|
|
||||||
if (substituteCell)
|
if (substituteCell)
|
||||||
{
|
{
|
||||||
thisCellI = cellI;
|
|
||||||
substituteCell = false;
|
substituteCell = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
thisCellI = mesh.nCells() + addCellI;
|
|
||||||
superCells[addCellI++] = cellI;
|
superCells[addCellI++] = cellI;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -24,9 +24,10 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "primitiveMesh.H"
|
#include "primitiveMesh.H"
|
||||||
|
#include "indexedOctree.H"
|
||||||
|
#include "treeDataCell.H"
|
||||||
#include "demandDrivenData.H"
|
#include "demandDrivenData.H"
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::primitiveMesh::printAllocated() const
|
void Foam::primitiveMesh::printAllocated() const
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -51,7 +51,6 @@ void Foam::ignitionSite::findIgnitionCells(const fvMesh& mesh)
|
|||||||
cellVolumes_[0] = vols[ignCell];
|
cellVolumes_[0] = vols[ignCell];
|
||||||
|
|
||||||
scalar minDist = GREAT;
|
scalar minDist = GREAT;
|
||||||
label nearestCell = 0;
|
|
||||||
label nIgnCells = 1;
|
label nIgnCells = 1;
|
||||||
|
|
||||||
forAll(centres, celli)
|
forAll(centres, celli)
|
||||||
@ -60,7 +59,6 @@ void Foam::ignitionSite::findIgnitionCells(const fvMesh& mesh)
|
|||||||
|
|
||||||
if (dist < minDist)
|
if (dist < minDist)
|
||||||
{
|
{
|
||||||
nearestCell = celli;
|
|
||||||
minDist = dist;
|
minDist = dist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -654,8 +654,6 @@ void Foam::InteractionLists<ParticleType>::findExtendedProcBbsInRange
|
|||||||
{
|
{
|
||||||
List<label> permutationIndices(nTrans, 0);
|
List<label> permutationIndices(nTrans, 0);
|
||||||
|
|
||||||
vector s = vector::zero;
|
|
||||||
|
|
||||||
if (nTrans == 0 && procI != Pstream::myProcNo())
|
if (nTrans == 0 && procI != Pstream::myProcNo())
|
||||||
{
|
{
|
||||||
treeBoundBox extendedReferredProcBb = allExtendedProcBbs[procI];
|
treeBoundBox extendedReferredProcBb = allExtendedProcBbs[procI];
|
||||||
|
|||||||
@ -440,7 +440,6 @@ void Foam::parcel::updateParcelProperties
|
|||||||
scalar oldhv = fuels.hl(pg, T(), X());
|
scalar oldhv = fuels.hl(pg, T(), X());
|
||||||
scalar Np = N(oldDensity);
|
scalar Np = N(oldDensity);
|
||||||
|
|
||||||
scalar newDensity = oldDensity;
|
|
||||||
scalar newMass = oldMass;
|
scalar newMass = oldMass;
|
||||||
scalar newhg = oldhg;
|
scalar newhg = oldhg;
|
||||||
scalar newhv = oldhv;
|
scalar newhv = oldhv;
|
||||||
@ -460,7 +459,6 @@ void Foam::parcel::updateParcelProperties
|
|||||||
// first time
|
// first time
|
||||||
if (n > 1)
|
if (n > 1)
|
||||||
{
|
{
|
||||||
newDensity = fuels.rho(pg, Tnew, X());
|
|
||||||
newMass = m();
|
newMass = m();
|
||||||
newhg = 0.0;
|
newhg = 0.0;
|
||||||
scalarField Ynew(fuels.Y(X()));
|
scalarField Ynew(fuels.Y(X()));
|
||||||
|
|||||||
@ -112,7 +112,6 @@ void Foam::LISA::atomizeParcel
|
|||||||
vector uDir = p.U()/mag(p.U());
|
vector uDir = p.U()/mag(p.U());
|
||||||
|
|
||||||
scalar uGas = mag(vel & uDir);
|
scalar uGas = mag(vel & uDir);
|
||||||
vector Ug = uGas*uDir;
|
|
||||||
|
|
||||||
// Might be the relative velocity between Liquid and Gas, but using the
|
// Might be the relative velocity between Liquid and Gas, but using the
|
||||||
// absolute velocity of the parcel as suggested by the authors
|
// absolute velocity of the parcel as suggested by the authors
|
||||||
|
|||||||
@ -118,9 +118,6 @@ void Foam::SHF::breakupParcel
|
|||||||
scalar reLiquid = p.Re(rhoLiquid, vel, muLiquid);
|
scalar reLiquid = p.Re(rhoLiquid, vel, muLiquid);
|
||||||
scalar ohnesorge = sqrt(weLiquid)/(reLiquid + VSMALL);
|
scalar ohnesorge = sqrt(weLiquid)/(reLiquid + VSMALL);
|
||||||
|
|
||||||
vector acceleration = p.Urel(vel)/p.tMom();
|
|
||||||
vector trajectory = p.U()/mag(p.U());
|
|
||||||
|
|
||||||
vector vRel = p.Urel(vel);
|
vector vRel = p.Urel(vel);
|
||||||
|
|
||||||
scalar weGasCorr = weGas/(1.0 + weCorrCoeff_*ohnesorge);
|
scalar weGasCorr = weGas/(1.0 + weCorrCoeff_*ohnesorge);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -246,9 +246,6 @@ void Foam::blobsSwirlInjector::calculateHX
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar hOLD = -100.0;
|
|
||||||
scalar xOLD = -100.0;
|
|
||||||
|
|
||||||
label i;
|
label i;
|
||||||
|
|
||||||
for (i=0; i<20; i++)
|
for (i=0; i<20; i++)
|
||||||
@ -267,10 +264,6 @@ void Foam::blobsSwirlInjector::calculateHX
|
|||||||
);
|
);
|
||||||
|
|
||||||
x_ = sqr(1.0 - 2.0*h_/injectorDiameter);
|
x_ = sqr(1.0 - 2.0*h_/injectorDiameter);
|
||||||
|
|
||||||
hOLD = h_;
|
|
||||||
xOLD = x_;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
x_ = sqr(1.0 - 2.0*h_/injectorDiameter);
|
x_ = sqr(1.0 - 2.0*h_/injectorDiameter);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -225,8 +225,6 @@ void Foam::blockMesh::calcMergeInfo()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool found = false;
|
|
||||||
|
|
||||||
// N-squared point search over all points of all faces of
|
// N-squared point search over all points of all faces of
|
||||||
// master block over all point of all faces of slave block
|
// master block over all point of all faces of slave block
|
||||||
forAll(blockPfaceFaces, blockPfaceFaceLabel)
|
forAll(blockPfaceFaces, blockPfaceFaceLabel)
|
||||||
@ -240,8 +238,6 @@ void Foam::blockMesh::calcMergeInfo()
|
|||||||
|
|
||||||
forAll(blockPfaceFacePoints, blockPfaceFacePointLabel)
|
forAll(blockPfaceFacePoints, blockPfaceFacePointLabel)
|
||||||
{
|
{
|
||||||
found = false;
|
|
||||||
|
|
||||||
forAll(blockNfaceFaces, blockNfaceFaceLabel)
|
forAll(blockNfaceFaces, blockNfaceFaceLabel)
|
||||||
{
|
{
|
||||||
const labelList& blockNfaceFacePoints
|
const labelList& blockNfaceFacePoints
|
||||||
@ -261,7 +257,6 @@ void Foam::blockMesh::calcMergeInfo()
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Found a new pair
|
// Found a new pair
|
||||||
found = true;
|
|
||||||
|
|
||||||
cp[blockPfaceFacePointLabel] =
|
cp[blockPfaceFacePointLabel] =
|
||||||
blockNfaceFacePoints[blockNfaceFacePointLabel];
|
blockNfaceFacePoints[blockNfaceFacePointLabel];
|
||||||
@ -332,7 +327,6 @@ void Foam::blockMesh::calcMergeInfo()
|
|||||||
|
|
||||||
const labelListList& curPairs = glueMergePairs[blockFaceLabel];
|
const labelListList& curPairs = glueMergePairs[blockFaceLabel];
|
||||||
|
|
||||||
bool foundFace = false;
|
|
||||||
label blockPfaceLabel;
|
label blockPfaceLabel;
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
@ -347,14 +341,12 @@ void Foam::blockMesh::calcMergeInfo()
|
|||||||
== blockInternalFaces[blockFaceLabel]
|
== blockInternalFaces[blockFaceLabel]
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
foundFace = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME? - there seems to be some logic missing here
|
// FIXME? - there seems to be some logic missing here
|
||||||
|
|
||||||
foundFace = false;
|
|
||||||
label blockNfaceLabel;
|
label blockNfaceLabel;
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
@ -369,7 +361,6 @@ void Foam::blockMesh::calcMergeInfo()
|
|||||||
== blockInternalFaces[blockFaceLabel]
|
== blockInternalFaces[blockFaceLabel]
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
foundFace = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2958,7 +2958,6 @@ char *timestring ( void )
|
|||||||
# define TIME_SIZE 29
|
# define TIME_SIZE 29
|
||||||
|
|
||||||
const struct tm *tm;
|
const struct tm *tm;
|
||||||
size_t len;
|
|
||||||
time_t now;
|
time_t now;
|
||||||
char *s;
|
char *s;
|
||||||
|
|
||||||
@ -2967,7 +2966,7 @@ char *timestring ( void )
|
|||||||
|
|
||||||
s = new char[TIME_SIZE];
|
s = new char[TIME_SIZE];
|
||||||
|
|
||||||
len = strftime ( s, TIME_SIZE, "%d %B %Y %I:%M:%S %p", tm );
|
strftime ( s, TIME_SIZE, "%d %B %Y %I:%M:%S %p", tm );
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
# undef TIME_SIZE
|
# undef TIME_SIZE
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -83,20 +83,15 @@ Foam::sixDoFRigidBodyMotionRestraints::linearAxialAngularSpring::restrain
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
vector refDir = rotationTensor(vector(1, 0 ,0), axis_) & vector(0, 1, 0);
|
vector refDir = rotationTensor(vector(1, 0 ,0), axis_) & vector(0, 1, 0);
|
||||||
|
|
||||||
vector oldDir = refQ_ & refDir;
|
vector oldDir = refQ_ & refDir;
|
||||||
|
|
||||||
vector newDir = motion.orientation() & refDir;
|
vector newDir = motion.orientation() & refDir;
|
||||||
|
|
||||||
if (mag(oldDir & axis_) > 0.95 || mag(newDir & axis_) > 0.95)
|
if (mag(oldDir & axis_) > 0.95 || mag(newDir & axis_) > 0.95)
|
||||||
{
|
{
|
||||||
// Directions getting close to the axis, change reference
|
// Directions getting close to the axis, change reference
|
||||||
|
|
||||||
refDir = rotationTensor(vector(1, 0 ,0), axis_) & vector(0, 0, 1);
|
refDir = rotationTensor(vector(1, 0 ,0), axis_) & vector(0, 0, 1);
|
||||||
|
oldDir = refQ_ & refDir;
|
||||||
vector oldDir = refQ_ & refDir;
|
newDir = motion.orientation() & refDir;
|
||||||
|
|
||||||
vector newDir = motion.orientation() & refDir;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Removing any axis component from oldDir and newDir and normalising
|
// Removing any axis component from oldDir and newDir and normalising
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -87,7 +87,6 @@ Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::restrain
|
|||||||
vector refDir = rotationTensor(vector(1, 0 ,0), axis_) & vector(0, 1, 0);
|
vector refDir = rotationTensor(vector(1, 0 ,0), axis_) & vector(0, 1, 0);
|
||||||
|
|
||||||
vector oldDir = refQ_ & refDir;
|
vector oldDir = refQ_ & refDir;
|
||||||
|
|
||||||
vector newDir = motion.orientation() & refDir;
|
vector newDir = motion.orientation() & refDir;
|
||||||
|
|
||||||
if (mag(oldDir & axis_) > 0.95 || mag(newDir & axis_) > 0.95)
|
if (mag(oldDir & axis_) > 0.95 || mag(newDir & axis_) > 0.95)
|
||||||
@ -96,9 +95,8 @@ Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::restrain
|
|||||||
|
|
||||||
refDir = rotationTensor(vector(1, 0 ,0), axis_) & vector(0, 0, 1);
|
refDir = rotationTensor(vector(1, 0 ,0), axis_) & vector(0, 0, 1);
|
||||||
|
|
||||||
vector oldDir = refQ_ & refDir;
|
oldDir = refQ_ & refDir;
|
||||||
|
newDir = motion.orientation() & refDir;
|
||||||
vector newDir = motion.orientation() & refDir;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Removing any axis component from oldDir and newDir and normalising
|
// Removing any axis component from oldDir and newDir and normalising
|
||||||
|
|||||||
Reference in New Issue
Block a user