From 90ea219f77861f5daa783368ffa27477e10114f9 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 17 Dec 2010 15:24:15 +0100 Subject: [PATCH] COMP: 'template' keyword for specialization with '.' or '->' --- .../GeometricField/GeometricField.C | 9 +- .../GeometricField/MapGeometricFields.H | 4 +- src/OpenFOAM/meshes/MeshObject/MeshObject.C | 85 +++++++++++++++---- .../derived/advective/advectiveFvPatchField.C | 28 +++--- .../outletMappedUniformInletFvPatchField.C | 4 +- .../waveTransmissiveFvPatchField.C | 2 +- .../CrankNicholsonDdtScheme.C | 6 +- .../ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C | 9 +- .../localEulerDdtScheme/localEulerDdtScheme.C | 3 +- .../gradSchemes/gradScheme/gradScheme.C | 16 ++-- .../fvPatch/fvPatchFvMeshTemplates.C | 3 +- .../limitedSchemes/LimitedScheme/LimitFuncs.C | 4 +- .../limitedSchemes/PhiScheme/PhiScheme.C | 4 +- .../schemes/localBlended/localBlended.H | 6 +- .../schemes/weighted/weighted.H | 9 +- .../cellMotion/cellMotionFvPatchField.C | 8 +- .../Templates/ThermoParcel/ThermoParcelI.H | 3 +- .../DispersionRASModel/DispersionRASModel.C | 5 +- .../FieldActivatedInjection.C | 4 +- .../SurfaceFilmModel/SurfaceFilmModel.C | 2 +- .../ThermoSurfaceFilm/ThermoSurfaceFilm.C | 7 +- 21 files changed, 151 insertions(+), 70 deletions(-) diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C index 10c6d9c300..1062ac0954 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C @@ -941,7 +941,14 @@ void Foam::GeometricField::relax() { word name = this->name(); - if (this->mesh().data::lookupOrDefault("finalIteration", false)) + if + ( + this->mesh().data::template lookupOrDefault + ( + "finalIteration", + false + ) + ) { name += "Final"; } diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/MapGeometricFields.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/MapGeometricFields.H index 849dd3d6db..78cb5d5ad0 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/MapGeometricFields.H +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/MapGeometricFields.H @@ -74,8 +74,8 @@ void MapGeometricFields { HashTable*> fields ( - mapper.thisDb().objectRegistry::lookupClass - >() + mapper.thisDb().objectRegistry::template + lookupClass >() ); // It is necessary to enforce that all old-time fields are stored diff --git a/src/OpenFOAM/meshes/MeshObject/MeshObject.C b/src/OpenFOAM/meshes/MeshObject/MeshObject.C index 4950476a24..e9eac11a32 100644 --- a/src/OpenFOAM/meshes/MeshObject/MeshObject.C +++ b/src/OpenFOAM/meshes/MeshObject/MeshObject.C @@ -52,13 +52,22 @@ const Type& Foam::MeshObject::New const Mesh& mesh ) { - if (!mesh.thisDb().objectRegistry::foundObject(Type::typeName)) + if + ( + mesh.thisDb().objectRegistry::template foundObject + ( + Type::typeName + ) + ) { - return store(new Type(mesh)); + return mesh.thisDb().objectRegistry::template lookupObject + ( + Type::typeName + ); } else { - return mesh.thisDb().objectRegistry::lookupObject(Type::typeName); + return store(new Type(mesh)); } } @@ -71,13 +80,22 @@ const Type& Foam::MeshObject::New const Data1& d ) { - if (!mesh.thisDb().objectRegistry::foundObject(Type::typeName)) + if + ( + mesh.thisDb().objectRegistry::template foundObject + ( + Type::typeName + ) + ) { - return store(new Type(mesh, d)); + return mesh.thisDb().objectRegistry::template lookupObject + ( + Type::typeName + ); } else { - return mesh.thisDb().objectRegistry::lookupObject(Type::typeName); + return store(new Type(mesh, d)); } } @@ -91,13 +109,22 @@ const Type& Foam::MeshObject::New const Data2& d2 ) { - if (!mesh.thisDb().objectRegistry::foundObject(Type::typeName)) + if + ( + mesh.thisDb().objectRegistry::template foundObject + ( + Type::typeName + ) + ) { - return store(new Type(mesh, d1, d2)); + return mesh.thisDb().objectRegistry::template lookupObject + ( + Type::typeName + ); } else { - return mesh.thisDb().objectRegistry::lookupObject(Type::typeName); + return store(new Type(mesh, d1, d2)); } } @@ -112,13 +139,22 @@ const Type& Foam::MeshObject::New const Data3& d3 ) { - if (!mesh.thisDb().objectRegistry::foundObject(Type::typeName)) + if + ( + mesh.thisDb().objectRegistry::template foundObject + ( + Type::typeName + ) + ) { - return store(new Type(mesh, d1, d2, d3)); + return mesh.thisDb().objectRegistry::template lookupObject + ( + Type::typeName + ); } else { - return mesh.thisDb().objectRegistry::lookupObject(Type::typeName); + return store(new Type(mesh, d1, d2, d3)); } } @@ -134,13 +170,22 @@ const Type& Foam::MeshObject::New const Data4& d4 ) { - if (!mesh.thisDb().objectRegistry::foundObject(Type::typeName)) + if + ( + mesh.thisDb().objectRegistry::template foundObject + ( + Type::typeName + ) + ) { - return store(new Type(mesh, d1, d2, d3, d4)); + return mesh.thisDb().objectRegistry::template lookupObject + ( + Type::typeName + ); } else { - return mesh.thisDb().objectRegistry::lookupObject(Type::typeName); + return store(new Type(mesh, d1, d2, d3, d4)); } } @@ -150,13 +195,19 @@ const Type& Foam::MeshObject::New template bool Foam::MeshObject::Delete(const Mesh& mesh) { - if (mesh.thisDb().objectRegistry::foundObject(Type::typeName)) + if + ( + mesh.thisDb().objectRegistry::template foundObject + ( + Type::typeName + ) + ) { return mesh.thisDb().checkOut ( const_cast ( - mesh.thisDb().objectRegistry::lookupObject + mesh.thisDb().objectRegistry::template lookupObject ( Type::typeName ) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C index 108dc8e432..16386e646a 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C @@ -158,23 +158,23 @@ Foam::tmp Foam::advectiveFvPatchField::advectionSpeed() const { const surfaceScalarField& phi = - this->db().objectRegistry::lookupObject(phiName_); + this->db().objectRegistry::template lookupObject + (phiName_); + + fvsPatchField phip = + this->patch().template lookupPatchField + ( + phiName_ + ); - fvsPatchField phip = this->patch().lookupPatchField - ( - phiName_, - reinterpret_cast(0), - reinterpret_cast(0) - ); if (phi.dimensions() == dimDensity*dimVelocity*dimArea) { - const fvPatchScalarField& rhop = this->patch().lookupPatchField - ( - rhoName_, - reinterpret_cast(0), - reinterpret_cast(0) - ); + const fvPatchScalarField& rhop = + this->patch().template lookupPatchField + ( + rhoName_ + ); return phip/(rhop*this->patch().magSf()); } @@ -201,7 +201,7 @@ void Foam::advectiveFvPatchField::updateCoeffs() scalar deltaT = this->db().time().deltaTValue(); const GeometricField& field = - this->db().objectRegistry:: + this->db().objectRegistry::template lookupObject > ( this->dimensionedInternalField().name() diff --git a/src/finiteVolume/fields/fvPatchFields/derived/outletMappedUniformInlet/outletMappedUniformInletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/outletMappedUniformInlet/outletMappedUniformInletFvPatchField.C index cf370754e8..fb2d250205 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/outletMappedUniformInlet/outletMappedUniformInletFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/outletMappedUniformInlet/outletMappedUniformInletFvPatchField.C @@ -139,7 +139,9 @@ void Foam::outletMappedUniformInletFvPatchField::updateCoeffs() f.boundaryField()[outletPatchID]; const surfaceScalarField& phi = - this->db().objectRegistry::lookupObject(phiName_); + this->db().objectRegistry::template lookupObject + (phiName_); + const scalarField& outletPatchPhi = phi.boundaryField()[outletPatchID]; scalar sumOutletPatchPhi = gSum(outletPatchPhi); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C index 81530009e7..a05d3f3fc5 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C @@ -115,7 +115,7 @@ Foam::waveTransmissiveFvPatchField::advectionSpeed() const ); const surfaceScalarField& phi = - this->db().objectRegistry::lookupObject + this->db().objectRegistry::template lookupObject (this->phiName_); fvsPatchField phip = this->patch().lookupPatchField diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholsonDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholsonDdtScheme.C index 8adf1fb479..6facd5a8c7 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholsonDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholsonDdtScheme.C @@ -50,7 +50,7 @@ CrankNicholsonDdtScheme::DDt0Field::DDt0Field : GeoField(io, mesh), startTimeIndex_(-2) // This field is for a restart and thus correct so set - // the start time-index to corespond to a previous run + // the start time-index to correspond to a previous run { // Set the time-index to the beginning of the run to ensure the field // is updated during the first time-step @@ -108,7 +108,7 @@ CrankNicholsonDdtScheme::ddt0_ const dimensionSet& dims ) { - if (!mesh().objectRegistry::foundObject(name)) + if (!mesh().objectRegistry::template foundObject(name)) { const Time& runTime = mesh().time(); word startTimeName = runTime.timeName(runTime.startTime().value()); @@ -173,7 +173,7 @@ CrankNicholsonDdtScheme::ddt0_ ( const_cast ( - mesh().objectRegistry::lookupObject(name) + mesh().objectRegistry::template lookupObject(name) ) ); diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C index 8b5fe573a2..be05934359 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C @@ -90,7 +90,8 @@ template tmp SLTSDdtScheme::SLrDeltaT() const { const surfaceScalarField& phi = - mesh().objectRegistry::lookupObject(phiName_); + mesh().objectRegistry::template + lookupObject(phiName_); const dimensionedScalar& deltaT = mesh().time().deltaT(); @@ -125,8 +126,10 @@ tmp SLTSDdtScheme::SLrDeltaT() const else if (phi.dimensions() == dimensionSet(1, 0, -1, 0, 0)) { const volScalarField& rho = - mesh().objectRegistry::lookupObject(rhoName_) - .oldTime(); + mesh().objectRegistry::template lookupObject + ( + rhoName_ + ).oldTime(); rDeltaT.internalField() = max ( diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C index b0e2f9bb11..60fc42a119 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C @@ -42,7 +42,8 @@ namespace fv template const volScalarField& localEulerDdtScheme::localRDeltaT() const { - return mesh().objectRegistry::lookupObject(rDeltaTName_); + return mesh().objectRegistry::template lookupObject + (rDeltaTName_); } diff --git a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C index 1b58aca6d1..5860dbec76 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C @@ -127,7 +127,7 @@ Foam::fv::gradScheme::grad if (!this->mesh().changing() && this->mesh().cache(name)) { - if (!mesh().objectRegistry::foundObject(name)) + if (!mesh().objectRegistry::template foundObject(name)) { cachePrintMessage("Calculating and caching", name, vsf); tmp tgGrad = calcGrad(vsf, name); @@ -137,7 +137,7 @@ Foam::fv::gradScheme::grad cachePrintMessage("Retreiving", name, vsf); GradFieldType& gGrad = const_cast ( - mesh().objectRegistry::lookupObject(name) + mesh().objectRegistry::template lookupObject(name) ); if (gGrad.upToDate(vsf)) @@ -157,7 +157,10 @@ Foam::fv::gradScheme::grad regIOobject::store(tgGrad.ptr()); GradFieldType& gGrad = const_cast ( - mesh().objectRegistry::lookupObject(name) + mesh().objectRegistry::template lookupObject + ( + name + ) ); return gGrad; @@ -165,11 +168,14 @@ Foam::fv::gradScheme::grad } else { - if (mesh().objectRegistry::foundObject(name)) + if (mesh().objectRegistry::template foundObject(name)) { GradFieldType& gGrad = const_cast ( - mesh().objectRegistry::lookupObject(name) + mesh().objectRegistry::template lookupObject + ( + name + ) ); if (gGrad.ownedByRegistry()) diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchFvMeshTemplates.C b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchFvMeshTemplates.C index 127ea95348..f1ee779d3a 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchFvMeshTemplates.C +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchFvMeshTemplates.C @@ -37,7 +37,8 @@ const typename GeometricField::PatchFieldType& Foam::fvPatch::lookupPatchField { return patchField ( - boundaryMesh().mesh().objectRegistry::lookupObject(name) + boundaryMesh().mesh().objectRegistry::template + lookupObject(name) ); } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitFuncs.C b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitFuncs.C index cdcabd8dc9..fb46762e10 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitFuncs.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitFuncs.C @@ -72,7 +72,7 @@ inline tmp rhoMagSqr::operator() ) const { const volScalarField& rho = - phi.db().objectRegistry::lookupObject("rho"); + phi.db().objectRegistry::template lookupObject("rho"); return Foam::magSqr(phi/rho); } @@ -84,7 +84,7 @@ inline tmp rhoMagSqr::operator() ) const { const volScalarField& rho = - phi.db().objectRegistry::lookupObject("rho"); + phi.db().objectRegistry::template lookupObject("rho"); return phi/rho; } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/PhiScheme/PhiScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/PhiScheme/PhiScheme.C index c003dcafe1..8e19f84fe6 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/PhiScheme/PhiScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/PhiScheme/PhiScheme.C @@ -69,7 +69,9 @@ Foam::PhiScheme::limiter if (this->faceFlux_.dimensions() == dimDensity*dimVelocity*dimArea) { const volScalarField& rho = - phi.db().objectRegistry::lookupObject("rho"); + phi.db().objectRegistry::template lookupObject + ("rho"); + tUflux = this->faceFlux_/fvc::interpolate(rho); } else if (this->faceFlux_.dimensions() != dimVelocity*dimArea) diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localBlended/localBlended.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localBlended/localBlended.H index 9be5eaf087..38c5205c32 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localBlended/localBlended.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localBlended/localBlended.H @@ -124,7 +124,7 @@ public: ) const { const surfaceScalarField& blendingFactor = - this->mesh().objectRegistry:: + this->mesh().objectRegistry::template lookupObject ( word(vf.name() + "BlendingFactor") @@ -142,7 +142,7 @@ public: { const surfaceScalarField& blendingFactor = ( - this->mesh().objectRegistry:: + this->mesh().objectRegistry::template lookupObject ( word(vf.name() + "BlendingFactor") @@ -171,7 +171,7 @@ public: ) const { const surfaceScalarField& blendingFactor = - this->mesh().objectRegistry:: + this->mesh().objectRegistry::template lookupObject ( word(vf.name() + "BlendingFactor") diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/weighted/weighted.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/weighted/weighted.H index 6e540fee3a..d51433a3e3 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/weighted/weighted.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/weighted/weighted.H @@ -84,8 +84,11 @@ public: surfaceInterpolationScheme(mesh), weights_ ( - this->mesh().objectRegistry:: - lookupObject(word(is)) + this->mesh().objectRegistry::template + lookupObject + ( + word(is) + ) ) {} @@ -100,7 +103,7 @@ public: surfaceInterpolationScheme(mesh), weights_ ( - this->mesh().objectRegistry:: + this->mesh().objectRegistry::template lookupObject ( word(is) diff --git a/src/fvMotionSolver/fvPatchFields/derived/cellMotion/cellMotionFvPatchField.C b/src/fvMotionSolver/fvPatchFields/derived/cellMotion/cellMotionFvPatchField.C index a5bf7b9412..f0a97e2805 100644 --- a/src/fvMotionSolver/fvPatchFields/derived/cellMotion/cellMotionFvPatchField.C +++ b/src/fvMotionSolver/fvPatchFields/derived/cellMotion/cellMotionFvPatchField.C @@ -109,11 +109,9 @@ void Foam::cellMotionFvPatchField::updateCoeffs() pfName.replace("cell", "point"); const GeometricField& pointMotion = - this->db().objectRegistry:: - lookupObject > - ( - pfName - ); + this->db().objectRegistry::template + lookupObject > + (pfName); forAll(p, i) { diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H index d588e69fd3..1773a82db7 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H @@ -116,7 +116,8 @@ inline Foam::ThermoParcel::trackData::trackData interpolation::New ( cloud.solution().interpolationSchemes(), - cloud.mesh().objectRegistry::lookupObject("G") + cloud.mesh().objectRegistry::template + lookupObject("G") ).ptr() ); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C index 250074a975..22f1140270 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C @@ -38,7 +38,10 @@ Foam::DispersionRASModel::DispersionRASModel DispersionModel(owner), turbulence_ ( - owner.mesh().objectRegistry::lookupObject + owner.mesh().objectRegistry::template lookupObject + < + compressible::RASModel + > ( "RASProperties" ) diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C index 40f7b61be5..75f34af8eb 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C @@ -80,14 +80,14 @@ Foam::FieldActivatedInjection::FieldActivatedInjection factor_(readScalar(this->coeffDict().lookup("factor"))), referenceField_ ( - owner.db().objectRegistry::lookupObject + owner.db().objectRegistry::template lookupObject ( this->coeffDict().lookup("referenceField") ) ), thresholdField_ ( - owner.db().objectRegistry::lookupObject + owner.db().objectRegistry::template lookupObject ( this->coeffDict().lookup("thresholdField") ) diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C index f1ef48de9d..a454c5daad 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C @@ -134,7 +134,7 @@ void Foam::SurfaceFilmModel::inject(TrackData& td) // Retrieve the film model from the owner database const surfaceFilmModels::surfaceFilmModel& filmModel = - this->owner().db().objectRegistry::lookupObject + this->owner().db().objectRegistry::template lookupObject ( "surfaceFilmProperties" diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C index 1a037fdc77..c0d9f69e77 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C @@ -492,7 +492,10 @@ Foam::ThermoSurfaceFilm::ThermoSurfaceFilm : SurfaceFilmModel(dict, owner, g, typeName), rndGen_(owner.rndGen()), - thermo_(owner.db().objectRegistry::lookupObject("SLGThermo")), + thermo_ + ( + owner.db().objectRegistry::template lookupObject("SLGThermo") + ), TFilmPatch_(0), CpFilmPatch_(0), interactionType_ @@ -567,7 +570,7 @@ bool Foam::ThermoSurfaceFilm::transferParcel surfaceFilmModels::surfaceFilmModel& filmModel = const_cast ( - this->owner().db().objectRegistry:: + this->owner().db().objectRegistry::template lookupObject ( "surfaceFilmProperties"