CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

libmymodel.so not created - issues with templates and GeometricScalarField.C

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 4, 2016, 10:32
Default libmymodel.so not created - issues with templates and GeometricScalarField.C
  #1
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 250
Rep Power: 22
klausb will become famous soon enough
I am trying to compile an alternative turbulence model on OF 3.0.1

At first there were problems as the folder /opt/openfoam30/src/turbulenceModels was missing so I copied the one from a previous OF 2.4 installation.

Now there's a problem which seems to be related to issues with templates and GeometricScalarField.C

How can I fix that?



relevant terminal output:

...
/opt/openfoam30/src/OpenFOAM/lnInclude/GeometricScalarField.C:755:32: note: template<template<class> class PatchField, class GeoMesh> Foam::tmp<Foam::GeometricField<double, PatchField, GeoMesh> > Foam:ow3(const Foam::GeometricField<double, PatchField, GeoMesh>&)
UNARY_FUNCTION(scalar, scalar, pow3, pow3)
^
/opt/openfoam30/src/OpenFOAM/lnInclude/GeometricFieldFunctionsM.C:49:55: note: in definition of macro ‘UNARY_FUNCTION’
tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func \
^
/opt/openfoam30/src/OpenFOAM/lnInclude/GeometricScalarField.C:755:32: note: template argument deduction/substitution failed:
UNARY_FUNCTION(scalar, scalar, pow3, pow3)
^
/opt/openfoam30/src/OpenFOAM/lnInclude/GeometricFieldFunctionsM.C:49:55: note: in definition of macro ‘UNARY_FUNCTION’
tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func \
^
myTurbulenceModel/myTurbulenceModel.C:1169:57: note: ‘Foam::wallDist’ is not derived from ‘const Foam::GeometricField<double, PatchField, GeoMesh>’
+ Cw3_*fOmega_*alphaTEff*sqr(fw)*sqrt(kt_)/pow3(y_)
^
In file included from /opt/openfoam30/src/OpenFOAM/lnInclude/GeometricScalarField.C:29:0,
from /opt/openfoam30/src/OpenFOAM/lnInclude/GeometricScalarField.H:171,
from /opt/openfoam30/src/OpenFOAM/lnInclude/GeometricFields.H:34,
from /opt/openfoam30/src/finiteVolume/lnInclude/volFields.H:37,
from /opt/openfoam30/src/finiteVolume/lnInclude/nearWallDist.H:39,
from /opt/openfoam30/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H:51,
from /opt/openfoam30/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H:47,
from myTurbulenceModel/myTurbulenceModel.H:80,
from myTurbulenceModel/myTurbulenceModel.C:26:
/opt/openfoam30/src/OpenFOAM/lnInclude/GeometricScalarField.C:755:32: note: template<template<class> class PatchField, class GeoMesh> Foam::tmp<Foam::GeometricField<double, PatchField, GeoMesh> > Foam:ow3(const Foam::tmp<Foam::GeometricField<double, PatchField, GeoMesh> >&)
UNARY_FUNCTION(scalar, scalar, pow3, pow3)
^
/opt/openfoam30/src/OpenFOAM/lnInclude/GeometricFieldFunctionsM.C:77:55: note: in definition of macro ‘UNARY_FUNCTION’
tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func \
^
/opt/openfoam30/src/OpenFOAM/lnInclude/GeometricScalarField.C:755:32: note: template argument deduction/substitution failed:
UNARY_FUNCTION(scalar, scalar, pow3, pow3)
^
/opt/openfoam30/src/OpenFOAM/lnInclude/GeometricFieldFunctionsM.C:77:55: note: in definition of macro ‘UNARY_FUNCTION’
tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func \
^
myTurbulenceModel/myTurbulenceModel.C:1169:57: note: ‘Foam::wallDist’ is not derived from ‘const Foam::tmp<Foam::GeometricField<double, PatchField, GeoMesh> >’
+ Cw3_*fOmega_*alphaTEff*sqr(fw)*sqrt(kt_)/pow3(y_)
^
In file included from /opt/openfoam30/src/OpenFOAM/lnInclude/GeometricScalarField.C:29:0,
from /opt/openfoam30/src/OpenFOAM/lnInclude/GeometricScalarField.H:171,
from /opt/openfoam30/src/OpenFOAM/lnInclude/GeometricFields.H:34,
from /opt/openfoam30/src/finiteVolume/lnInclude/volFields.H:37,
from /opt/openfoam30/src/finiteVolume/lnInclude/nearWallDist.H:39,
from /opt/openfoam30/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H:51,
from /opt/openfoam30/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H:47,
from myTurbulenceModel/myTurbulenceModel.H:80,
from myTurbulenceModel/myTurbulenceModel.C:26:
/opt/openfoam30/src/OpenFOAM/lnInclude/GeometricScalarField.C:755:32: note: template<template<class> class PatchField, class GeoMesh> void Foam:ow3(Foam::GeometricField<double, PatchField, GeoMesh>&, const Foam::GeometricField<double, PatchField, GeoMesh>&)
UNARY_FUNCTION(scalar, scalar, pow3, pow3)
^
/opt/openfoam30/src/OpenFOAM/lnInclude/GeometricFieldFunctionsM.C:38:6: note: in definition of macro ‘UNARY_FUNCTION’
void Func \
^
/opt/openfoam30/src/OpenFOAM/lnInclude/GeometricScalarField.C:755:32: note: template argument deduction/substitution failed:
UNARY_FUNCTION(scalar, scalar, pow3, pow3)
^
/opt/openfoam30/src/OpenFOAM/lnInclude/GeometricFieldFunctionsM.C:38:6: note: in definition of macro ‘UNARY_FUNCTION’
void Func \
^
myTurbulenceModel/myTurbulenceModel.C:1169:57: note: ‘Foam::wallDist’ is not derived from ‘Foam::GeometricField<double, PatchField, GeoMesh>’
+ Cw3_*fOmega_*alphaTEff*sqr(fw)*sqrt(kt_)/pow3(y_)
^
myTurbulenceModel/myTurbulenceModel.C: In member function ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::incompressible::RASModels::myTurbulenceModel ::gammaBP(const volScalarField&) const’:
myTurbulenceModel/myTurbulenceModel.C:185:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make: *** [Make/linux64GccDPInt32Opt/myTurbulenceModel/myTurbulenceModel.o] Fehler 1
klausb is offline   Reply With Quote

Old   February 5, 2016, 10:27
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22
marupio is on a distinguished road
The turbulenceModel structure has changed. You have to adapt the new code for the new structure, rather than copying the old folder into the new version.

I don't know the details of the change, but you would need to go through each issue one at a time.
__________________
~~~
Follow me on twitter @DavidGaden
marupio is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] Merge created block resulting in not connected mesh imamwfgf ANSYS Meshing & Geometry 2 October 20, 2013 06:22
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 flakid OpenFOAM Installation 16 December 28, 2010 08:48
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 02:32
Regarding FoamX running Kindly help out hariya03 OpenFOAM Pre-Processing 0 April 18, 2008 04:26
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19


All times are GMT -4. The time now is 16:54.