libmymodel.so not created - issues with templates and GeometricScalarField.C
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::pow3(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::pow3(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::pow3(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 |
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. |
All times are GMT -4. The time now is 18:11. |