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/)
-   -   Namespace (http://www.cfd-online.com/Forums/openfoam-solving/60612-namespace.html)

sampaio April 22, 2005 05:13

Hi All, I am trying to use LE
 
Hi All,
I am trying to use LES filter and simpleFilter in the main code (in the solver).

I tried many things, adding the corresponding include files, using namespaces (Foam::simpleFilter::simpleFilter simpleFilter_), but nothing seems to work.

Does anybody knows which lines i should add in my solver, so that i can use simpleFilter in the main program (solver)? (I imagine adding a couple of lines would do, right?)

Thanks,
Luiz

eugene April 22, 2005 06:32

You need to add LESfilter.H an
 
You need to add LESfilter.H and you need to modify your Make/options file to pick up the filter headers and library, i.e.

EXE_INC = \
-I$(LIB_SRC)/LESmodels/LESfilters/lnInclude

LIB_LIBS = \
-lLESfilters

sampaio April 22, 2005 12:44

Hi Eugene, That is what I was
 
Hi Eugene,
That is what I was doing, but I get the following compilation error:

SOURCE_DIR=.
SOURCE=myles.C ; g++ -m32 -Dlinux -Wall -W -Wno-unused-parameter -O3 -ffast-math -DNoRepository -ftemplate-depth-30 -I/home/luizebs/OpenFOAM/OpenFOAM-1.1/src/OpenFOAM/lnInclude -IlnInclude -I. -I/home/luizebs/OpenFOAM/OpenFOAM-1.1/src/LESmodels -I/home/luizebs/OpenFOAM/OpenFOAM-1.1/src/LESmodels/LESdeltas/lnInclude -I/home/luizebs/OpenFOAM/OpenFOAM-1.1/src/LESmodels/LESfilters/lnInclude -I/home/luizebs/OpenFOAM/OpenFOAM-1.1/src/transportModels -I/home/luizebs/OpenFOAM/OpenFOAM-1.1/src/cfdTools/incompressible -I/home/luizebs/OpenFOAM/OpenFOAM-1.1/src/cfdTools/lnInclude -I/home/luizebs/OpenFOAM/OpenFOAM-1.1/src/meshTools/lnInclude -I/home/luizebs/OpenFOAM/OpenFOAM-1.1/src/sampling/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxOpt/myles.o
In file included from myles.C:66:
/home/luizebs/OpenFOAM/OpenFOAM-1.1/src/LESmodels/LESfilters/lnInclude/LESfilter .H: In function `int main(int, char**)':
/home/luizebs/OpenFOAM/OpenFOAM-1.1/src/LESmodels/LESfilters/lnInclude/LESfilter .H:47: error: unknown namespace `<declaration>'
/home/luizebs/OpenFOAM/OpenFOAM-1.1/src/LESmodels/LESfilters/lnInclude/LESfilter .H:46: error: expected primary-expression before "namespace"
/home/luizebs/OpenFOAM/OpenFOAM-1.1/src/LESmodels/LESfilters/lnInclude/LESfilter .H:46: error: expected `;' before "namespace"

Thanks,
Luiz

sampaio April 22, 2005 22:22

Thanks Eugene, I got it now.
 
Thanks Eugene,
I got it now.
I was putting #include inside main, when it should be outside...
Thanks,
Luiz


All times are GMT -4. The time now is 19:51.