CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] Problem with compiling funkySetFields (https://www.cfd-online.com/Forums/openfoam-community-contributions/90700-problem-compiling-funkysetfields.html)

Victor July 19, 2011 02:20

Problem with compiling funkySetFields
 
Hi at all,

I tried to compile funkySetFields for OF 1.7 on Ubuntu 10.04
I always get following error-message:

Making dependency list for source file ValueExpressionParser.C
Making dependency list for source file ValueExpressionLexer.C
SOURCE=ValueExpressionParser.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IMake/linuxGccDPOpt -I/opt/openfoam171/src/finiteVolume/lnInclude -I/opt/openfoam171/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/ValueExpressionParser.o
In file included from location.hh:44,
from ValueExpressionParser.tab.hh:65,
from ValueExpressionParser.tab.cc:68:
position.hh: In function ‘bool ve::operator==(const ve::position&, const ve::position&)’:
position.hh:136: warning: suggest parentheses around ‘&&’ within ‘||’
ValueExpressionParser.yy: In member function ‘virtual int ve::ValueExpressionParser::parse()’:
ValueExpressionParser.yy:202: error: ‘class ValueExpressionDriver’ has no member named ‘getVectorField’
ValueExpressionParser.yy:251: error: ‘class ValueExpressionDriver’ has no member named ‘getFaceScalarField’
ValueExpressionParser.yy:269: error: ‘class ValueExpressionDriver’ has no member named ‘getFaceVectorField’
ValueExpressionParser.yy:339: error: ‘class ValueExpressionDriver’ has no member named ‘getScalarField’
ValueExpressionParser.tab.cc: In member function ‘unsigned char ve::ValueExpressionParser::yytranslate_(int)’:
ValueExpressionParser.tab.cc:3177: warning: use of old-style cast
make: *** [Make/linuxGccDPOpt/ValueExpressionParser.o] error 1


Does anyone know where the problem is? I am quite new to OpenFoam and Ubuntu, so I donnot know how to solve this problem.:(
Thanks a lot for any advice!


Victor

gschaider July 19, 2011 04:36

Quote:

Originally Posted by Victor (Post 316555)
Hi at all,

I tried to compile funkySetFields for OF 1.7 on Ubuntu 10.04
I always get following error-message:

Making dependency list for source file ValueExpressionParser.C
Making dependency list for source file ValueExpressionLexer.C
SOURCE=ValueExpressionParser.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IMake/linuxGccDPOpt -I/opt/openfoam171/src/finiteVolume/lnInclude -I/opt/openfoam171/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/ValueExpressionParser.o
In file included from location.hh:44,
from ValueExpressionParser.tab.hh:65,
from ValueExpressionParser.tab.cc:68:
position.hh: In function ‘bool ve::operator==(const ve::position&, const ve::position&)’:
position.hh:136: warning: suggest parentheses around ‘&&’ within ‘||’
ValueExpressionParser.yy: In member function ‘virtual int ve::ValueExpressionParser::parse()’:
ValueExpressionParser.yy:202: error: ‘class ValueExpressionDriver’ has no member named ‘getVectorField’
ValueExpressionParser.yy:251: error: ‘class ValueExpressionDriver’ has no member named ‘getFaceScalarField’
ValueExpressionParser.yy:269: error: ‘class ValueExpressionDriver’ has no member named ‘getFaceVectorField’
ValueExpressionParser.yy:339: error: ‘class ValueExpressionDriver’ has no member named ‘getScalarField’
ValueExpressionParser.tab.cc: In member function ‘unsigned char ve::ValueExpressionParser::yytranslate_(int)’:
ValueExpressionParser.tab.cc:3177: warning: use of old-style cast
make: *** [Make/linuxGccDPOpt/ValueExpressionParser.o] error 1


Does anyone know where the problem is? I am quite new to OpenFoam and Ubuntu, so I donnot know how to solve this problem.:(
Thanks a lot for any advice!


Victor

That is strange because in the version of FSF that I have here there is no method getVectorField. But there used to be, so probably you're using an old version.

Which version of FSF do you use? I see that it is an "old-school" standalone version, but where did you get it from?

BTW: old-school FSF is not in active development anymore. For the brightest and shiniest version of FSF use swak4Foam

Victor July 19, 2011 14:57

Hi gschaider, thank you very much for your quick reply.


I tried to install swak4foam the last days, but it didn't work all the time, so i tried to use this old version - i used it in a lab-course - to compile FSF.
Now i tried swak4foam in order to post the error message in this thread, but know it works!!!! I really do not know what has been the problem:)

So anyhow, thank you very much!

Victor July 19, 2011 15:31

Here I am again:

After testing FSF i experienced something strange: All the time when i used FSF, either with a FSF-dict or with a simple command (funkySetFields -expression 0 -time 0), FSF created a .gz file of the field that had to be changed.

For example, i have a field a in my 0-folder and want to use the FSF two times (a1,a2):

expressions
(
a1
{
field a;
expression "8.418e-5";
valuePatches (PROCESSOR EXCHANGE_SURFACE COOLER);
create false;
}
a2
{
field a;
expression "1.12e-6";
condition "(sqr(pos().x-0.015)/sqr(0.003)+sqr(pos().y-0.0045)/sqr(0.0007)+sqr(pos().y-0.003)/sqr(0.001))<1";
keepPatches true;
create false;
}
);

After that, i got a a.gz in my 0-folder and only the first expression (a1) has been done.
Isn't it strange?

Thanks a lot for any help in advance!

gschaider July 19, 2011 16:34

Quote:

Originally Posted by Victor (Post 316650)
Here I am again:

After testing FSF i experienced something strange: All the time when i used FSF, either with a FSF-dict or with a simple command (funkySetFields -expression 0 -time 0), FSF created a .gz file of the field that had to be changed.

For example, i have a field a in my 0-folder and want to use the FSF two times (a1,a2):

expressions
(
a1
{
field a;
expression "8.418e-5";
valuePatches (PROCESSOR EXCHANGE_SURFACE COOLER);
create false;
}
a2
{
field a;
expression "1.12e-6";
condition "(sqr(pos().x-0.015)/sqr(0.003)+sqr(pos().y-0.0045)/sqr(0.0007)+sqr(pos().y-0.003)/sqr(0.001))<1";
keepPatches true;
create false;
}
);

After that, i got a a.gz in my 0-folder and only the first expression (a1) has been done.
Isn't it strange?

No, it is not: obviously your controlDict asks for compressed files and that's what you get (this is the general OpenFOAM-behaviour, not a speciality of FSF)

About the second expression: it should be executed. Check the output in the terminal. If the output is there and the field is unmodified then maybe the condition needs some debugging


All times are GMT -4. The time now is 13:41.