|
[Sponsors] |
libmymodel.so not created - issues with templates and GeometricScalarField.C |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 4, 2016, 10:32 |
libmymodel.so not created - issues with templates and GeometricScalarField.C
|
#1 |
Senior Member
Klaus
Join Date: Mar 2009
Posts: 250
Rep Power: 22 |
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 |
|
February 5, 2016, 10:27 |
|
#2 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
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 |
|
|
|
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 |