CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Wmake problem interFoam solver (http://www.cfd-online.com/Forums/openfoam-solving/58233-wmake-problem-interfoam-solver.html)

feijooos December 4, 2008 14:12

Hey, I ran into a problem with
 
Hey, I ran into a problem with the interFoam solver. Whenever I remake (wmake) the solver after adding a couple of comments I get a warning saying: there is an 'unused variable' from the readPISOControls.H . So I copied the original interFoam solver and renamed it and ran wmake, and I get the same warning:

Making dependency list for source file test_interFoam.C
SOURCE=test_interFoam.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/usr/apps1/OpenFOAM/OpenFOAM-1.5/src/transportModels -I/usr/apps1/OpenFOAM/OpenFOAM-1.5/src/transportModels/incompressible/lnInclude -I/usr/apps1/OpenFOAM/OpenFOAM-1.5/src/transportModels/interfaceProperties/lnInc lude -I/usr/apps1/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -IlnInclude -I. -I/usr/apps1/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/usr/apps1/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGccDPOpt/test_interFoam.o
/usr/apps1/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/readPISOControls.H: In function ‚€˜int main(int, char**)‚€™:
/usr/apps1/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/readPISOControls.H:3 : warning: unused variable ‚€˜nCorr‚€™
g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/usr/apps1/OpenFOAM/OpenFOAM-1.5/src/transportModels -I/usr/apps1/OpenFOAM/OpenFOAM-1.5/src/transportModels/incompressible/lnInclude -I/usr/apps1/OpenFOAM/OpenFOAM-1.5/src/transportModels/interfaceProperties/lnInc lude -I/usr/apps1/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -IlnInclude -I. -I/usr/apps1/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/usr/apps1/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -pthread Make/linuxGccDPOpt/test_interFoam.o -L/usr/apps1/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt \
-linterfaceProperties -lincompressibleTransportModels -lfiniteVolume -lOpenFOAM -ldl -lm -o /usr/erc/people/egehring/OpenFOAM/egehring-1.5/applications/bin/linuxGccDPOpt/te st_interFoam

Is this just something I can ignore? Or is there something wrong with my interFoam solver? Thanks,
feijo

caw December 6, 2008 07:34

Hi Eelco, it is just what i
 
Hi Eelco,

it is just what it says: A warning about an unused variable. Nothing to worry about.

This happens if a variable is declared that is not used in the rest of the code.

Best regards
Christian

floooo December 8, 2008 05:05

Hi Eelco, nCorr is unused
 
Hi Eelco,

nCorr is unused
I have exactly the same warnig message

Florian

feijooos December 8, 2008 11:47

Hi Florian, Thanks, i was w
 
Hi Florian,

Thanks, i was wondering which variables isn't used.

Eelco

feijooos December 8, 2008 12:01

isn't nCorr used in the PISO l
 
isn't nCorr used in the PISO loop in interFoam.C?

// --- PISO loop
for (int corr=0; corr<nCorr; corr++)
{
#include "pEqn.H"
}

I also specify it in my fvSolution file.


All times are GMT -4. The time now is 18:48.