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] installing funkySetFields (https://www.cfd-online.com/Forums/openfoam-community-contributions/62796-installing-funkysetfields.html)

moh1367 March 10, 2010 01:14

A Problem
 
Dear foamers!
I have a problem when I using Funky to set a complicated fields .my profile is as below:

funkySetFields -time 0 -field alpha1 -expression 1 -condition "pos().y-1e-9-7.5e-9*exp((pow(pos().x-15e-9,10)+1)*log(1-pow((pos().x-15e-9)/7.5e-9,2)))<=0"

but I think that this module have some problem with power function. I have this error:
Putting "1" into field alpha1 at t = "0" if condition "pos().y-1e-9-7.5e-9*exp((pow(pos().x-15e-9,10)+1)*log(1-pow((pos().x-15e-9)/7.5e-9,2)))<=0" is true

#0 Foam::error::printStack(Foam::Ostream&) in "/home/Zakerzadeh/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/Zakerzadeh/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted:
#3 log in "/lib/libm.so.6"
#4 Foam::log(Foam::Field<double>&, Foam::UList<double> const&) in "/home/Zakerzadeh/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#5 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::log<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/Zakerzadeh/OpenFOAM/Zakerzadeh-1.6/applications/bin/linuxGccDPOpt/funkySetFields"
#6 .L21360 at ValueExpressionParser.C:0
#7 ValueExpressionDriver::parse(std::string const&) in "/home/Zakerzadeh/OpenFOAM/Zakerzadeh-1.6/applications/bin/linuxGccDPOpt/funkySetFields"
#8 doAnExpression(Foam::fvMesh const&, Foam::word const&, Foam::string const&, Foam::string const&, Foam::Time const&, bool, bool, bool, Foam::dimensionSet const&, bool, Foam::List<Foam::word> const&) in "/home/Zakerzadeh/OpenFOAM/Zakerzadeh-1.6/applications/bin/linuxGccDPOpt/funkySetFields"
#9 main in "/home/Zakerzadeh/OpenFOAM/Zakerzadeh-1.6/applications/bin/linuxGccDPOpt/funkySetFields"
#10 __libc_start_main in "/lib/libc.so.6"
#11 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/home/Zakerzadeh/OpenFOAM/Zakerzadeh-1.6/applications/bin/linuxGccDPOpt/funkySetFields"
Floating point exception

Is there anyone have any idea about it.
Sincerely

ngj March 10, 2010 03:44

According to error #3 it is due to the log-function. So make sure that you are not evaluating log(r), with r<=0.

Best regards,

Niels

moh1367 March 10, 2010 04:05

Yes,you are right!

But when I have this problem unless I decrease the power to 2 or 1. I test an easier case with just power term . Its better to test this case . I believe that this program have some problems with power.I appreciate if you have any suggestion about it?


Sincerely

Disco_Caine March 12, 2010 09:13

This is very embarassing! What had worked previously with OF-1.6, now is not working with OF-1.6.x. I followed my steps but now im getting this error:

Code:

position.hh: In function ‘bool ve::operator==(const ve::position&, const ve::position&)’:
position.hh:136: warning: suggest parentheses around ‘&&’ within ‘||’

ValueExpressionDriver.C: In member function ‘Foam::surfaceScalarField* ValueExpressionDriver::makeAreaField()’:
ValueExpressionDriver.C:462: error: call of overloaded ‘GeometricField(Foam::IOobject, const Foam::fvMesh&, int)’ is ambiguous
/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude/GeometricField.C:421: note: candidates are: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dictionary&) [with Type = double, PatchField = Foam::fvsPatchField, GeoMesh = Foam::surfaceMesh]
/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude/GeometricField.C:257: note:                Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensioned<Type>&, const Foam::word&) [with Type = double, PatchField = Foam::fvsPatchField, GeoMesh = Foam::surfaceMesh]

ValueExpressionDriver.C: In member function ‘Foam::volScalarField* ValueExpressionDriver::makeVolumeField()’:
ValueExpressionDriver.C:482: error: call of overloaded ‘GeometricField(Foam::IOobject, const Foam::fvMesh&, int)’ is ambiguous
/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude/GeometricField.C:421: note: candidates are: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dictionary&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude/GeometricField.C:257: note:                Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensioned<Type>&, const Foam::word&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]

ValueExpressionDriver.C: In member function ‘Foam::volScalarField* ValueExpressionDriver::makeDistanceField()’:
ValueExpressionDriver.C:506: error: call of overloaded ‘GeometricField(Foam::IOobject, const Foam::fvMesh&, int)’ is ambiguous

/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude/GeometricField.C:421: note: candidates are: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dictionary&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]

/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude/GeometricField.C:257: note:                Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensioned<Type>&, const Foam::word&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]

ValueExpressionDriver.C: In member function ‘Foam::volScalarField*

ValueExpressionDriver::makeRDistanceField(const Foam::volVectorField&)’:

ValueExpressionDriver.C:529: error: call of overloaded ‘GeometricField(Foam::IOobject, const Foam::fvMesh&, int)’ is ambiguous

/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude/GeometricField.C:421: note: candidates are: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dictionary&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]

/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude/GeometricField.C:257: note:                Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensioned<Type>&, const Foam::word&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
make: *** [Make/linux64GccDPOpt/ValueExpressionDriver.o] Error 1

Any ideas? Thanks!

Disco_Caine March 12, 2010 12:30

I do not know what i did, but it is working now. Thanks all.

gschaider March 15, 2010 06:07

Quote:

Originally Posted by moh1367 (Post 249291)
Yes,you are right!

But when I have this problem unless I decrease the power to 2 or 1. I test an easier case with just power term . Its better to test this case . I believe that this program have some problems with power.I appreciate if you have any suggestion about it?

The argument values are passed to the OF::log. One guess would be that for your expression pow(xxx,10) the xxx is too large. Use FSF to write out xxx on its own and have a look at the values.

If you really feel that there is a bug in FSF report it at
https://sourceforge.net/apps/mantisb...e_status_id=-2

Bernhard

querdynamik May 7, 2010 07:00

I'm trying to install funkySetFields (v1.6) on OF-1.6, but i get this error in "Allwmake" :

Quote:

....
/home/HiWi/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libfiniteVolume.so: undefined reference to `Foam::reduce(double&, Foam::sumOp<double> const&)'
/home/HiWi/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libmeshTools.so: undefined reference to `Foam::triSurface::~triSurface()'
/home/HiWi/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libfiniteVolume.so: undefined reference to `Foam::triSurface::~triSurface()'
/home/HiWi/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libmeshTools.so: undefined reference to `Foam::triSurface::markZones(Foam::List<bool> const&, Foam::List<int>&) const'
/home/HiWi/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libmeshTools.so: undefined reference to `Foam::triSurface::operator=(Foam::triSurface const&)'
/home/HiWi/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libmeshTools.so: undefined reference to `Foam::triSurface::edgeOwner() const'
/home/HiWi/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libmeshTools.so: undefined reference to `Foam::triSurface::triSurface()'
/home/HiWi/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libmeshTools.so: undefined reference to `Foam::triSurface::triSurface(Foam::List<Foam::lab elledTri> const&, Foam::List<Foam::geometricSurfacePatch> const&, Foam::Field<Foam::Vector<double> > const&)'
/home/HiWi/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so: undefined reference to `Foam::Pstream::init(int&, char**&)'
/home/HiWi/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libmeshTools.so: undefined reference to `Foam::triSurface::triSurface(Foam::triSurface const&)'
/home/HiWi/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libmeshTools.so: undefined reference to `Foam::decompositionMethod::typeName'
/home/HiWi/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libmeshTools.so: undefined reference to `Foam::triSurface::clearOut()'
/home/HiWi/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so: undefined reference to `Foam::Pstream::addValidParOptions(Foam::HashTable <Foam::string, Foam::word, Foam::string::hash>&)'
collect2: ld returned 1 exit status
make: *** [/home/HiWi/OpenFOAM/hiwi-1.6/applications/bin/linux64GccDPOpt/funkySetFields] error 1

Can someone help me out and tell what the problem might be?

Thanks in advance!

gschaider May 10, 2010 05:24

Quote:

Originally Posted by querdynamik (Post 257912)
I'm trying to install funkySetFields (v1.6) on OF-1.6, but i get this error in "Allwmake" :

Can someone help me out and tell what the problem might be?

Thanks in advance!

Something seems to be fundamentally wrong with your OF installation (there seem to be at least two libraries missing). Have you ever successfully compiled another third-party OF-utility? Could you post the stuff just before the error messages start?

farhagim May 10, 2010 17:06

Tx man. this message is very useful for such beginner like me

Quote:

Originally Posted by Disco_Caine (Post 249207)
I have fixed my own problem, perhaps this is way too obvious for the almighty linux users, but i shall post it anyways, just in case another new guy runs into the same problem.

1) open up your terminal and make sure you are in the funkySetFields folder, (where the insertGenerated.sh is) and type this:

chmod +x insertGenerated.sh

2) then type:

./insertGenerated.sh

3) then, wmake.

And you are done with funkySetFields


P.S: sorry about the different fonts!


querdynamik May 17, 2010 09:20

Quote:

Originally Posted by gschaider (Post 258146)
Something seems to be fundamentally wrong with your OF installation (there seem to be at least two libraries missing). Have you ever successfully compiled another third-party OF-utility? Could you post the stuff just before the error messages start?

At first, thx for your answer and sorry for my late reply.

No, i did not even try to compile any OF-utility before. But i realised, that i was trying to install the funkySetFields-Tool from the POSTprocressing-directory. I don't know if that made any difference.
Anyway, now i tried to install it from the PREprocessing directory and got these lines :

Code:

hiwi@wmpc05:~/OpenFOAM/OpenFOAM-1.6/applications/utilities/preProcessing/FunkySetFields> ./Allwmake
+ wmake funkySetFields
Making dependency list for source file ValueExpressionParser.C
Making dependency list for source file ValueExpressionLexer.C
Making dependency list for source file ValueExpressionDriver.C
Making dependency list for source file funkySetFields.C
SOURCE=ValueExpressionParser.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -IMake/linux64GccDPOpt -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/meshTools/lnInclude -IlnInclude -I. -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/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.tab.cc: In member function ‘unsigned char ve::ValueExpressionParser::yytranslate_(int)’:
ValueExpressionParser.tab.cc:3207: warning: use of old-style cast
SOURCE=ValueExpressionLexer.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -IMake/linux64GccDPOpt -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/meshTools/lnInclude -IlnInclude -I. -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/ValueExpressionLexer.o
lex.ve.c:363: warning: use of old-style cast
lex.ve.c:433: warning: use of old-style cast
lex.ve.c:433: warning: use of old-style cast
In file included from location.hh:44,
                from ValueExpressionParser.tab.hh:65,
                from ValueExpressionDriver.H:14,
                from ValueExpressionLexer.ll:3:
position.hh: In function ‘bool ve::operator==(const ve::position&, const ve::position&)’:
position.hh:136: warning: suggest parentheses around && within ||
lex.ve.c: In function ‘int velex(ve::ValueExpressionParser::semantic_type*, ve::location*, ValueExpressionDriver&)’:
lex.ve.c:8888: warning: use of old-style cast
lex.ve.c:8888: warning: use of old-style cast
lex.ve.c:8905: warning: use of old-style cast
lex.ve.c:8918: warning: use of old-style cast
lex.ve.c:9368: warning: use of old-style cast
lex.ve.c: In function ‘int yy_get_next_buffer()’:
lex.ve.c:9547: warning: use of old-style cast
lex.ve.c:9570: warning: use of old-style cast
lex.ve.c:9583: warning: use of old-style cast
lex.ve.c:9583: warning: use of old-style cast
lex.ve.c:9604: warning: use of old-style cast
lex.ve.c:9604: warning: use of old-style cast
lex.ve.c:9629: warning: use of old-style cast
lex.ve.c:9632: warning: use of old-style cast
lex.ve.c:9632: warning: use of old-style cast
lex.ve.c: In function ‘yy_state_type yy_get_previous_state()’:
lex.ve.c:9667: warning: use of old-style cast
lex.ve.c:9667: warning: use of old-style cast
lex.ve.c: In function ‘int yyinput()’:
lex.ve.c:9785: warning: use of old-style cast
lex.ve.c: In function ‘yy_buffer_state* ve_create_buffer(FILE*, int)’:
lex.ve.c:9884: warning: use of old-style cast
lex.ve.c:9893: warning: use of old-style cast
lex.ve.c: In function ‘void ve_delete_buffer(yy_buffer_state*)’:
lex.ve.c:9919: warning: use of old-style cast
lex.ve.c:9922: warning: use of old-style cast
lex.ve.c:9924: warning: use of old-style cast
lex.ve.c: In function ‘void veensure_buffer_stack()’:
lex.ve.c:10091: warning: use of old-style cast
lex.ve.c:10111: warning: use of old-style cast
lex.ve.c: In function ‘yy_buffer_state* ve_scan_buffer(char*, yy_size_t)’:
lex.ve.c:10139: warning: use of old-style cast
lex.ve.c: In function ‘yy_buffer_state* ve_scan_bytes(const char*, int)’:
lex.ve.c:10192: warning: use of old-style cast
lex.ve.c: In function ‘void yy_push_state(int)’:
lex.ve.c:10228: warning: use of old-style cast
lex.ve.c:10231: warning: use of old-style cast
lex.ve.c:10231: warning: use of old-style cast
lex.ve.c: In function ‘int yy_init_globals()’:
lex.ve.c:10398: warning: use of old-style cast
lex.ve.c:10411: warning: use of old-style cast
lex.ve.c:10412: warning: use of old-style cast
lex.ve.c: In function ‘void* vealloc(yy_size_t)’:
lex.ve.c:10478: warning: use of old-style cast
lex.ve.c: In function ‘void* verealloc(void*, yy_size_t)’:
lex.ve.c:10490: warning: use of old-style cast
lex.ve.c:10490: warning: use of old-style cast
lex.ve.c: In function ‘void vefree(void*)’:
lex.ve.c:10495: warning: use of old-style cast
lex.ve.c: At global scope:
lex.ve.c:10215: warning: ‘void yy_push_state(int)’ defined but not used
lex.ve.c:10243: warning: ‘void yy_pop_state()’ defined but not used
lex.ve.c:10255: warning: ‘int yy_top_state()’ defined but not used
SOURCE=ValueExpressionDriver.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -IMake/linux64GccDPOpt -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/meshTools/lnInclude -IlnInclude -I. -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/ValueExpressionDriver.o
In file included from location.hh:44,
                from ValueExpressionParser.tab.hh:65,
                from ValueExpressionDriver.H:14,
                from ValueExpressionDriver.C:3:
position.hh: In function ‘bool ve::operator==(const ve::position&, const ve::position&)’:
position.hh:136: warning: suggest parentheses around && within ||
SOURCE=funkySetFields.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -IMake/linux64GccDPOpt -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/meshTools/lnInclude -IlnInclude -I. -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/funkySetFields.o
In file included from location.hh:44,
                from ValueExpressionParser.tab.hh:65,
                from ValueExpressionDriver.H:14,
                from funkySetFields.C:41:
position.hh: In function ‘bool ve::operator==(const ve::position&, const ve::position&)’:
position.hh:136: warning: suggest parentheses around && within ||
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -IMake/linux64GccDPOpt -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/meshTools/lnInclude -IlnInclude -I. -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude  -fPIC Make/linux64GccDPOpt/ValueExpressionParser.o Make/linux64GccDPOpt/ValueExpressionLexer.o Make/linux64GccDPOpt/ValueExpressionDriver.o Make/linux64GccDPOpt/funkySetFields.o -L/home/HiWi/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt \
        -lfiniteVolume -lmeshTools -lOpenFOAM -liberty -ldl  -lm -o /home/HiWi/OpenFOAM/hiwi-1.6/applications/bin/linux64GccDPOpt/funkySetFields
/usr/bin/ld: cannot open output file /home/HiWi/OpenFOAM/hiwi-1.6/applications/bin/linux64GccDPOpt/funkySetFields: Permission denied
collect2: ld returned 1 exit status
make: *** [/home/HiWi/OpenFOAM/hiwi-1.6/applications/bin/linux64GccDPOpt/funkySetFields] Fehler 1

Looks like a completely different error to me. Hope u can help me anyway. :o
Thanks.

gschaider May 18, 2010 05:48

Quote:

Originally Posted by querdynamik (Post 259090)
At first, thx for your answer and sorry for my late reply.

No, i did not even try to compile any OF-utility before. But i realised, that i was trying to install the funkySetFields-Tool from the POSTprocressing-directory. I don't know if that made any difference.

No.
Quote:

Originally Posted by querdynamik (Post 259090)
Anyway, now i tried to install it from the PREprocessing directory and got these lines :

Code:

g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -IMake/linux64GccDPOpt -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/meshTools/lnInclude -IlnInclude -I. -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/HiWi/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude  -fPIC Make/linux64GccDPOpt/ValueExpressionParser.o Make/linux64GccDPOpt/ValueExpressionLexer.o Make/linux64GccDPOpt/ValueExpressionDriver.o Make/linux64GccDPOpt/funkySetFields.o -L/home/HiWi/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt \
        -lfiniteVolume -lmeshTools -lOpenFOAM -liberty -ldl  -lm -o /home/HiWi/OpenFOAM/hiwi-1.6/applications/bin/linux64GccDPOpt/funkySetFields
/usr/bin/ld: cannot open output file /home/HiWi/OpenFOAM/hiwi-1.6/applications/bin/linux64GccDPOpt/funkySetFields: Permission denied
collect2: ld returned 1 exit status
make: *** [/home/HiWi/OpenFOAM/hiwi-1.6/applications/bin/linux64GccDPOpt/funkySetFields] Fehler 1

Looks like a completely different error to me. Hope u can help me anyway. :o
Thanks.

Compilation runs alright (forget about the warnings). Your just not allowed to write the resulting binary. That is a OS/configuration problem

Bernhard

querdynamik May 18, 2010 06:56

Quote:

Originally Posted by gschaider (Post 259244)

Compilation runs alright (forget about the warnings). Your just not allowed to write the resulting binary. That is a OS/configuration problem

Bernhard

Ok, got it now. Simply had to give recursive write-permissions to that directory.
Now it compiled without errors.

Thank you very much, again ! :)

kel85uk August 11, 2010 03:18

funkySetFields and OpenFOAM 1.7.0
 
Hi all,

Tried to compile the FSF library and encountered the same error as the post previously about it being calling overloaded function. I can't figure out what's wrong... Anyone here willing to help?

Thanks.

Regards,
Kelvin

Code:

SOURCE=ValueExpressionDriver.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -IMake/linux64GccDPOpt    -I/home/kklloh/OpenFOAM/OpenFOAM-1.7.0/src/finiteVolume/lnInclude    -I/home/kklloh/OpenFOAM/OpenFOAM-1.7.0/src/meshTools/lnInclude -IlnInclude -I. -I/home/kklloh/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude -I/home/kklloh/OpenFOAM/OpenFOAM-1.7.0/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/ValueExpressionDriver.o
In file included from location.hh:44,
                from ValueExpressionParser.tab.hh:65,
                from ValueExpressionDriver.H:14,
                from ValueExpressionDriver.C:3:
position.hh: In function ‘bool ve::operator==(const ve::position&, const ve::position&)’:
position.hh:136: warning: suggest parentheses around ‘&&’ within ‘||’
ValueExpressionDriver.C: In member function ‘Foam::surfaceScalarField* ValueExpressionDriver::makeAreaField()’:
ValueExpressionDriver.C:462: error: call of overloaded ‘GeometricField(Foam::IOobject, const Foam::fvMesh&, int)’ is ambiguous
/home/kklloh/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude/GeometricField.C:420: note: candidates are: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dictionary&) [with Type = double, PatchField = Foam::fvsPatchField, GeoMesh = Foam::surfaceMesh]
/home/kklloh/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude/GeometricField.C:256: note:                Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensioned<Type>&, const Foam::word&) [with Type = double, PatchField = Foam::fvsPatchField, GeoMesh = Foam::surfaceMesh]
ValueExpressionDriver.C: In member function ‘Foam::volScalarField* ValueExpressionDriver::makeVolumeField()’:
ValueExpressionDriver.C:482: error: call of overloaded ‘GeometricField(Foam::IOobject, const Foam::fvMesh&, int)’ is ambiguous
/home/kklloh/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude/GeometricField.C:420: note: candidates are: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dictionary&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/home/kklloh/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude/GeometricField.C:256: note:                Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensioned<Type>&, const Foam::word&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
ValueExpressionDriver.C: In member function ‘Foam::volScalarField* ValueExpressionDriver::makeDistanceField()’:
ValueExpressionDriver.C:506: error: call of overloaded ‘GeometricField(Foam::IOobject, const Foam::fvMesh&, int)’ is ambiguous
/home/kklloh/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude/GeometricField.C:420: note: candidates are: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dictionary&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/home/kklloh/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude/GeometricField.C:256: note:                Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensioned<Type>&, const Foam::word&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
ValueExpressionDriver.C: In member function ‘Foam::volScalarField* ValueExpressionDriver::makeRDistanceField(const Foam::volVectorField&)’:
ValueExpressionDriver.C:529: error: call of overloaded ‘GeometricField(Foam::IOobject, const Foam::fvMesh&, int)’ is ambiguous
/home/kklloh/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude/GeometricField.C:420: note: candidates are: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dictionary&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/home/kklloh/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude/GeometricField.C:256: note:                Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensioned<Type>&, const Foam::word&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
make: *** [Make/linux64GccDPOpt/ValueExpressionDriver.o] Error 1


gschaider August 11, 2010 04:24

Quote:

Originally Posted by kel85uk (Post 271088)
Hi all,

Tried to compile the FSF library and encountered the same error as the post previously about it being calling overloaded function. I can't figure out what's wrong... Anyone here willing to help?

Thanks.

Regards,
Kelvin

The most interesing information required would be: version of bison and version of funkySetFields (where you got it from)

kel85uk August 11, 2010 04:35

Quote:

Originally Posted by gschaider (Post 271099)
The most interesing information required would be: version of bison and version of funkySetFields (where you got it from)

Hi all,

As added information, the bison version I have is 2.4.1, flex 2.5.35, and FSF from the OpenFOAM extend project, which I got from the source file

"ICE Revision: $Id: funkySetFields.C 7567 2007-06-20 12:38:50Z bgschaid $"

Am compiling FSF in OF 1.7.0 with 64-bit Fedora Core 13 OS.

Thanks.

Regards,
Kelvin

gschaider August 11, 2010 09:49

Quote:

Originally Posted by kel85uk (Post 271105)
As added information, the bison version I have is 2.4.1, flex 2.5.35, and FSF from the OpenFOAM extend project, which I got from the source file

That looks alright
Quote:

Originally Posted by kel85uk (Post 271105)
"ICE Revision: $Id: funkySetFields.C 7567 2007-06-20 12:38:50Z bgschaid $"

These tags were not updated for ages so they don't mean much
Quote:

Originally Posted by kel85uk (Post 271105)
Am compiling FSF in OF 1.7.0 with 64-bit Fedora Core 13 OS.

You're using the version from the OF 1.6-Breeder are you? That compiles on my 1.7 without problems. The error message indicates a version mismatch (a constructor is called which is not present in your current OF-version)

Disco_Caine August 24, 2010 13:09

yes, i'm back with more funky set fields trouble. This time im actually getting the same error as the original poster, i.e, floating point exception. And i know what is causing it exactly, i just can't fathom why.

ill write my funkysetfields dict here, the abbreviate version:

Code:

temperature1
    {   
        field T;
        expression "52.96281*(pow(pos().z,0.262054))+273";
        condition "pos().x <= 0.0105";
        keepPatches 1;
    }

now, that works perfectly for on a mesh with z (height in my case) of 25. However, when i change this to 15, i get the error, can anyone help me why?

This is the error message

Code:

#0  Foam::error::printStack(Foam::Ostream&) in "/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#1  Foam::sigFpe::sigFpeHandler(int) in "/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#2  in "/lib/libc.so.6"
#3  in "/lib/libm.so.6"
#4  Foam::pow(Foam::Field<double>&, Foam::UList<double> const&, double const&) in "/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#5 
 in "/home/gustavo/OpenFOAM/gustavo-1.6.x/applications/bin/linux64GccDPOpt/funkySetFields"
#6 
 in "/home/gustavo/OpenFOAM/gustavo-1.6.x/applications/bin/linux64GccDPOpt/funkySetFields"
#7 
 in "/home/gustavo/OpenFOAM/gustavo-1.6.x/applications/bin/linux64GccDPOpt/funkySetFields"
#8 
 in "/home/gustavo/OpenFOAM/gustavo-1.6.x/applications/bin/linux64GccDPOpt/funkySetFields"
#9 
 in "/home/gustavo/OpenFOAM/gustavo-1.6.x/applications/bin/linux64GccDPOpt/funkySetFields"
#10  __libc_start_main in "/lib/libc.so.6"
#11 
 at /build/buildd/eglibc-2.10.1/csu/../sysdeps/x86_64/elf/start.S:116
Floating point exceptio

The function im using is perfectly defined for positive real numbers. So, anyone has any ideas as to why i get this error when i change a value in blockmeshdict?

Thanks for your time
GB

gschaider August 24, 2010 18:22

Quote:

Originally Posted by Disco_Caine (Post 272542)
yes, i'm back with more funky set fields trouble. This time im actually getting the same error as the original poster, i.e, floating point exception. And i know what is causing it exactly, i just can't fathom why.

ill write my funkysetfields dict here, the abbreviate version:

Code:

temperature1
    {   
        field T;
        expression "52.96281*(pow(pos().z,0.262054))+273";
        condition "pos().x <= 0.0105";
        keepPatches 1;
    }

now, that works perfectly for on a mesh with z (height in my case) of 25. However, when i change this to 15, i get the error, can anyone help me why?

This is the error message

Code:

#0  Foam::error::printStack(Foam::Ostream&) in "/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#1  Foam::sigFpe::sigFpeHandler(int) in "/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#2  in "/lib/libc.so.6"
#3  in "/lib/libm.so.6"
#4  Foam::pow(Foam::Field<double>&, Foam::UList<double> const&, double const&) in "/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
 at /build/buildd/eglibc-2.10.1/csu/../sysdeps/x86_64/elf/start.S:116
Floating point exceptio

The function im using is perfectly defined for positive real numbers. So, anyone has any ideas as to why i get this error when i change a value in blockmeshdict?

Thanks for your time
GB

What I'd suggest is replacing your expression with this simpler version
pos().z
and check whether the result is definitely bigger than 0 for your mesh

Bernhard

Disco_Caine August 25, 2010 11:05

Hello Bernhard, thanks for your reply (and sorry for taking so much time). It indeed is positive as expected. Ill try other values of z to see how the problem develops. I still find it peculiar that it woudl work with 25 and not 15.

Thanks again

UPDATE: i discovered it works on funky set fields from 18 onwards. 17 already gives floating point exception. But ill post this here for everyone to see:

http://www.wolframalpha.com/input/?i=plot+52.96281*%28z^0.262054%29+from+0+to+0.15

Why is it giving floating point exception? This must have such a simple reason.

gschaider August 25, 2010 11:49

Quote:

Originally Posted by Disco_Caine (Post 272702)
Hello Bernhard, thanks for your reply (and sorry for taking so much time). It indeed is positive as expected. Ill try other values of z to see how the problem develops. I still find it peculiar that it woudl work with 25 and not 15.

Thanks again

UPDATE: i discovered it works on funky set fields from 18 onwards. 17 already gives floating point exception. But ill post this here for everyone to see:

http://www.wolframalpha.com/input/?i=plot+52.96281*%28z^0.262054%29+from+0+to+0.15

Why is it giving floating point exception? This must have such a simple reason.

No idea. The problem is occuring in the native pow function. So one of the value pairs offends it, To find out which there are two ways:

- modify OF-sources to print out intermediate results
- use a Debug-version of OF, a core-dump and gdb to have a look at the backtrace
- by trial and error try expressions of the form "pow(0.0345,0.262054)" to find a value that fails (start with the largest and smallest values from the previous experiment)

OK. That's three possibilities, but who's counting.

Anyway. As far as I can tell it is either a problem with pow or a problem with the expression (but you ruled that out) but not a problem of FSF per see

BTW: have you tried it with different powers? ( 0.1, 0, 1, 2 ...)


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