From 45bfb91afb3b9d3e4c79d8c846f582e2482cd02c Mon Sep 17 00:00:00 2001 From: mattijs <mattijs@hunt.opencfd.co.uk> Date: Fri, 23 Jan 2009 08:46:54 +0000 Subject: [PATCH] thisDb to get at objectRegistry --- .../SCOPE/SCOPELaminarFlameSpeed.C | 2 +- .../splitMeshRegions/splitMeshRegions.C | 4 +-- .../GeometricField/MapGeometricFields.H | 4 +-- .../GAMGAgglomeration/GAMGAgglomeration.C | 8 ++--- src/OpenFOAM/meshes/GeoMesh/GeoMesh.H | 2 +- src/OpenFOAM/meshes/MeshObject/MeshObject.C | 30 +++++++++---------- src/OpenFOAM/meshes/lduMesh/lduMesh.C | 4 +-- src/OpenFOAM/meshes/lduMesh/lduMesh.H | 2 +- src/OpenFOAM/meshes/pointMesh/pointMesh.H | 6 ++-- .../pointMeshMapper/pointMeshMapper.H | 2 +- src/OpenFOAM/meshes/polyMesh/polyMesh.C | 12 ++------ src/OpenFOAM/meshes/polyMesh/polyMesh.H | 5 ++++ src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C | 10 ++----- .../autoHexMeshDriver/autoLayerDriver.C | 8 ++--- .../autoHexMeshDriver/autoRefineDriver.C | 2 +- .../meshRefinementProblemCells.C | 2 +- .../general/SRF/SRFModel/SRFModel/SRFModel.C | 4 +-- .../SRF/SRFModel/SRFModel/newSRFModel.C | 4 +-- src/finiteVolume/fvMesh/fvMesh.C | 10 ++----- src/finiteVolume/fvMesh/fvMesh.H | 6 ++-- .../fvMesh/fvMeshMapper/fvMeshMapper.H | 2 +- .../fvMesh/fvMeshSubset/fvMeshSubset.H | 1 - .../fvMeshSubset/fvMeshSubsetInterpolate.C | 4 +-- .../volPointInterpolate.C | 8 +++-- .../radiationModel/newRadiationModel.C | 4 +-- .../radiationModel/radiationModel.C | 4 +-- .../movingConeTopoFvMesh.C | 4 +-- 27 files changed, 70 insertions(+), 84 deletions(-) diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C index a9224f59eb7..9f42a4cc97a 100644 --- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C +++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C @@ -395,7 +395,7 @@ Foam::laminarFlameSpeedModels::SCOPE::Ma() const ( "Ma", mesh.time().timeName(), - mesh.db(), + mesh, IOobject::NO_READ, IOobject::NO_WRITE ), diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index 8aac1f6b7e9..a4b33b97dde 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -613,7 +613,7 @@ autoPtr<mapPolyMesh> createRegionMesh "fvSchemes", mesh.time().system(), regionName, - mesh.db(), + mesh, IOobject::NO_READ, IOobject::NO_WRITE, false @@ -642,7 +642,7 @@ autoPtr<mapPolyMesh> createRegionMesh "fvSolution", mesh.time().system(), regionName, - mesh.db(), + mesh, IOobject::NO_READ, IOobject::NO_WRITE, false diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/MapGeometricFields.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/MapGeometricFields.H index b85d27c8ad3..5f5896893bb 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/MapGeometricFields.H +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/MapGeometricFields.H @@ -75,7 +75,7 @@ void MapGeometricFields { HashTable<const GeometricField<Type, PatchField, GeoMesh>*> fields ( - mapper.db().objectRegistry::lookupClass + mapper.thisDb().objectRegistry::lookupClass <GeometricField<Type, PatchField, GeoMesh> >() ); @@ -145,7 +145,7 @@ void MapGeometricFields ); } - field.instance() = field.mesh().db().time().timeName(); + field.instance() = field.time().timeName(); } else if (polyMesh::debug) { diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C index e1df085914b..633b8e2f37a 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C @@ -97,7 +97,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New { if ( - !mesh.db().objectRegistry::foundObject<GAMGAgglomeration> + !mesh.thisDb().foundObject<GAMGAgglomeration> ( GAMGAgglomeration::typeName ) @@ -134,7 +134,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New } else { - return mesh.db().objectRegistry::lookupObject<GAMGAgglomeration> + return mesh.thisDb().lookupObject<GAMGAgglomeration> ( GAMGAgglomeration::typeName ); @@ -152,7 +152,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New if ( - !mesh.db().objectRegistry::foundObject<GAMGAgglomeration> + !mesh.thisDb().foundObject<GAMGAgglomeration> ( GAMGAgglomeration::typeName ) @@ -185,7 +185,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New } else { - return mesh.db().objectRegistry::lookupObject<GAMGAgglomeration> + return mesh.thisDb().lookupObject<GAMGAgglomeration> ( GAMGAgglomeration::typeName ); diff --git a/src/OpenFOAM/meshes/GeoMesh/GeoMesh.H b/src/OpenFOAM/meshes/GeoMesh/GeoMesh.H index eeec9ac71e9..847844e21b5 100644 --- a/src/OpenFOAM/meshes/GeoMesh/GeoMesh.H +++ b/src/OpenFOAM/meshes/GeoMesh/GeoMesh.H @@ -76,7 +76,7 @@ public: // Member Functions //- Return the object registry - const objectRegistry& db() const + const objectRegistry& thisDb() const { return mesh_; } diff --git a/src/OpenFOAM/meshes/MeshObject/MeshObject.C b/src/OpenFOAM/meshes/MeshObject/MeshObject.C index 232929e295f..68f05c2f82b 100644 --- a/src/OpenFOAM/meshes/MeshObject/MeshObject.C +++ b/src/OpenFOAM/meshes/MeshObject/MeshObject.C @@ -37,8 +37,8 @@ Foam::MeshObject<Mesh, Type>::MeshObject(const Mesh& mesh) IOobject ( Type::typeName, - mesh.db().instance(), - mesh.db() + mesh.thisDb().instance(), + mesh.thisDb() ) ), mesh_(mesh) @@ -53,13 +53,13 @@ const Type& Foam::MeshObject<Mesh, Type>::New const Mesh& mesh ) { - if (!mesh.db().objectRegistry::foundObject<Type>(Type::typeName)) + if (!mesh.thisDb().objectRegistry::foundObject<Type>(Type::typeName)) { return store(new Type(mesh)); } else { - return mesh.db().objectRegistry::lookupObject<Type>(Type::typeName); + return mesh.thisDb().objectRegistry::lookupObject<Type>(Type::typeName); } } @@ -72,13 +72,13 @@ const Type& Foam::MeshObject<Mesh, Type>::New const Data1& d ) { - if (!mesh.db().objectRegistry::foundObject<Type>(Type::typeName)) + if (!mesh.thisDb().objectRegistry::foundObject<Type>(Type::typeName)) { return store(new Type(mesh, d)); } else { - return mesh.db().objectRegistry::lookupObject<Type>(Type::typeName); + return mesh.thisDb().objectRegistry::lookupObject<Type>(Type::typeName); } } @@ -92,13 +92,13 @@ const Type& Foam::MeshObject<Mesh, Type>::New const Data2& d2 ) { - if (!mesh.db().objectRegistry::foundObject<Type>(Type::typeName)) + if (!mesh.thisDb().objectRegistry::foundObject<Type>(Type::typeName)) { return store(new Type(mesh, d1, d2)); } else { - return mesh.db().objectRegistry::lookupObject<Type>(Type::typeName); + return mesh.thisDb().objectRegistry::lookupObject<Type>(Type::typeName); } } @@ -113,13 +113,13 @@ const Type& Foam::MeshObject<Mesh, Type>::New const Data3& d3 ) { - if (!mesh.db().objectRegistry::foundObject<Type>(Type::typeName)) + if (!mesh.thisDb().objectRegistry::foundObject<Type>(Type::typeName)) { return store(new Type(mesh, d1, d2, d3)); } else { - return mesh.db().objectRegistry::lookupObject<Type>(Type::typeName); + return mesh.thisDb().objectRegistry::lookupObject<Type>(Type::typeName); } } @@ -135,13 +135,13 @@ const Type& Foam::MeshObject<Mesh, Type>::New const Data4& d4 ) { - if (!mesh.db().objectRegistry::foundObject<Type>(Type::typeName)) + if (!mesh.thisDb().objectRegistry::foundObject<Type>(Type::typeName)) { return store(new Type(mesh, d3, d4)); } else { - return mesh.db().objectRegistry::lookupObject<Type>(Type::typeName); + return mesh.thisDb().objectRegistry::lookupObject<Type>(Type::typeName); } } @@ -151,13 +151,13 @@ const Type& Foam::MeshObject<Mesh, Type>::New template<class Mesh, class Type> bool Foam::MeshObject<Mesh, Type>::Delete(const Mesh& mesh) { - if (mesh.db().objectRegistry::foundObject<Type>(Type::typeName)) + if (mesh.thisDb().objectRegistry::foundObject<Type>(Type::typeName)) { - return mesh.db().objectRegistry::checkOut + return mesh.thisDb().checkOut ( const_cast<Type&> ( - mesh.db().objectRegistry::lookupObject<Type> + mesh.thisDb().objectRegistry::lookupObject<Type> ( Type::typeName ) diff --git a/src/OpenFOAM/meshes/lduMesh/lduMesh.C b/src/OpenFOAM/meshes/lduMesh/lduMesh.C index ac9a65fe646..135b74c6abd 100644 --- a/src/OpenFOAM/meshes/lduMesh/lduMesh.C +++ b/src/OpenFOAM/meshes/lduMesh/lduMesh.C @@ -36,9 +36,9 @@ namespace Foam // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -const Foam::objectRegistry& Foam::lduMesh::db() const +const Foam::objectRegistry& Foam::lduMesh::thisDb() const { - notImplemented("lduMesh::db() const"); + notImplemented("lduMesh::thisDb() const"); const objectRegistry* orPtr_ = NULL; return *orPtr_; } diff --git a/src/OpenFOAM/meshes/lduMesh/lduMesh.H b/src/OpenFOAM/meshes/lduMesh/lduMesh.H index 1176f77bc91..5c6f39e7782 100644 --- a/src/OpenFOAM/meshes/lduMesh/lduMesh.H +++ b/src/OpenFOAM/meshes/lduMesh/lduMesh.H @@ -71,7 +71,7 @@ public: // Access //- Return the object registry - virtual const objectRegistry& db() const; + virtual const objectRegistry& thisDb() const; //- Return ldu addressing virtual const lduAddressing& lduAddr() const = 0; diff --git a/src/OpenFOAM/meshes/pointMesh/pointMesh.H b/src/OpenFOAM/meshes/pointMesh/pointMesh.H index 16f80727e5e..a41f725c459 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointMesh.H +++ b/src/OpenFOAM/meshes/pointMesh/pointMesh.H @@ -112,10 +112,10 @@ public: return GeoMesh<polyMesh>::mesh_.globalData(); } - //- Return database (only needed for compilation purposes) - const objectRegistry& db() const + //- Return database. For now is its polyMesh. + const objectRegistry& thisDb() const { - return GeoMesh<polyMesh>::mesh_.db(); + return GeoMesh<polyMesh>::mesh_.thisDb(); } diff --git a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMeshMapper.H b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMeshMapper.H index 0274524887a..3f73e8225c2 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMeshMapper.H +++ b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMeshMapper.H @@ -100,7 +100,7 @@ public: //- Return reference to objectRegistry storing fields. Can be // removed once fields stored on pointMesh. - const objectRegistry& db() const + const objectRegistry& thisDb() const { return mesh_(); } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index a1b10f0d8a6..c3a789e54dc 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -1042,17 +1042,11 @@ Foam::tmp<Foam::scalarField> Foam::polyMesh::movePoints // movePoints function. // pointMesh - if - ( - db().objectRegistry::foundObject<pointMesh> - ( - pointMesh::typeName - ) - ) + if (thisDb().foundObject<pointMesh>(pointMesh::typeName)) { const_cast<pointMesh&> ( - db().objectRegistry::lookupObject<pointMesh> + thisDb().lookupObject<pointMesh> ( pointMesh::typeName ) @@ -1094,7 +1088,7 @@ const Foam::globalMeshData& Foam::polyMesh::globalData() const // Remove all files and some subdirs (eg, sets) void Foam::polyMesh::removeFiles(const fileName& instanceDir) const { - fileName meshFilesPath = db().path()/instanceDir/meshDir(); + fileName meshFilesPath = thisDb().path()/instanceDir/meshDir(); rm(meshFilesPath/"points"); rm(meshFilesPath/"faces"); diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.H b/src/OpenFOAM/meshes/polyMesh/polyMesh.H index 0dfd7685c84..588394d1c23 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.H @@ -343,6 +343,11 @@ public: //- Return parallel info const globalMeshData& globalData() const; + //- Return the object registry + const objectRegistry& thisDb() const + { + return *this; + } // Mesh motion diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C b/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C index 644d4a446a9..24d9ebbb136 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C @@ -71,17 +71,11 @@ void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm) // Hack until proper callbacks. Below are all the polyMesh-MeshObjects. // pointMesh - if - ( - db().objectRegistry::foundObject<pointMesh> - ( - pointMesh::typeName - ) - ) + if (thisDb().foundObject<pointMesh>(pointMesh::typeName)) { const_cast<pointMesh&> ( - db().objectRegistry::lookupObject<pointMesh> + thisDb().lookupObject<pointMesh> ( pointMesh::typeName ) diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C index b3849027105..bbe715eff0f 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C @@ -2889,12 +2889,12 @@ void Foam::autoLayerDriver::addLayers //mesh.name()+"_layer", mesh.name(), static_cast<polyMesh&>(mesh).instance(), - mesh.db(), + mesh.db(), // register with runTime static_cast<polyMesh&>(mesh).readOpt(), static_cast<polyMesh&>(mesh).writeOpt() - ), // io params from original mesh but new name - mesh, // original mesh - true // parallel sync + ), // io params from original mesh but new name + mesh, // original mesh + true // parallel sync ); fvMesh& newMesh = newMeshPtr(); diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C index f6023764612..e53c4e041a9 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C @@ -80,7 +80,7 @@ Foam::label Foam::autoRefineDriver::readFeatureEdges featFileName, // name mesh.time().constant(), // directory "triSurface", // instance - mesh.db(), // registry + mesh.time(), // registry IOobject::MUST_READ, IOobject::NO_WRITE, false diff --git a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C index fd5a7bdffa9..ff1d5fc3a43 100644 --- a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C +++ b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C @@ -443,7 +443,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells { const labelList& cPoints = mesh_.cellPoints(cellI, dynCPoints); - // Get number of anchor points (pointLevel == cellLevel) + // Get number of anchor points (pointLevel <= cellLevel) label nBoundaryAnchors = 0; label nNonAnchorBoundary = 0; diff --git a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C index a16ea2fd04e..394be20d2e0 100644 --- a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C +++ b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C @@ -56,8 +56,8 @@ Foam::SRF::SRFModel::SRFModel IOobject ( "SRFProperties", - Urel.mesh().time().constant(), - Urel.mesh().db(), + Urel.time().constant(), + Urel.db(), IOobject::MUST_READ, IOobject::NO_WRITE ) diff --git a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/newSRFModel.C b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/newSRFModel.C index 914fe229788..ff94172db04 100644 --- a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/newSRFModel.C +++ b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/newSRFModel.C @@ -53,8 +53,8 @@ autoPtr<SRFModel> SRFModel::New IOobject ( "SRFProperties", - Urel.mesh().time().constant(), - Urel.mesh().db(), + Urel.time().constant(), + Urel.db(), IOobject::MUST_READ, IOobject::NO_WRITE ) diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index 1192ef23577..d9c775a68ba 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -485,17 +485,11 @@ void Foam::fvMesh::mapFields(const mapPolyMesh& meshMap) template<class Type> void MeshObjectMovePoints(const Foam::fvMesh& mesh) { - if - ( - mesh.db().objectRegistry::foundObject<Type> - ( - Type::typeName - ) - ) + if (mesh.thisDb().foundObject<Type>(Type::typeName)) { const_cast<Type&> ( - mesh.db().objectRegistry::lookupObject<Type> + mesh.thisDb().lookupObject<Type> ( Type::typeName ) diff --git a/src/finiteVolume/fvMesh/fvMesh.H b/src/finiteVolume/fvMesh/fvMesh.H index 819dd305147..64e4d87f3e6 100644 --- a/src/finiteVolume/fvMesh/fvMesh.H +++ b/src/finiteVolume/fvMesh/fvMesh.H @@ -221,10 +221,10 @@ public: return polyMesh::time(); } - //- Return the object registry - virtual const objectRegistry& db() const + //- Return the object registry - resolve conflict polyMesh/lduMesh + virtual const objectRegistry& thisDb() const { - return *this; + return polyMesh::thisDb(); } //- Return reference to name diff --git a/src/finiteVolume/fvMesh/fvMeshMapper/fvMeshMapper.H b/src/finiteVolume/fvMesh/fvMeshMapper/fvMeshMapper.H index 1a277a14b95..0f9784affd5 100644 --- a/src/finiteVolume/fvMesh/fvMeshMapper/fvMeshMapper.H +++ b/src/finiteVolume/fvMesh/fvMeshMapper/fvMeshMapper.H @@ -108,7 +108,7 @@ public: //- Return reference to objectRegistry storing fields. Can be // removed once fields stored on pointMesh. - const objectRegistry& db() const + const objectRegistry& thisDb() const { return mesh_; } diff --git a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.H b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.H index 32749e52334..9ad70db6473 100644 --- a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.H +++ b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.H @@ -335,7 +335,6 @@ public: ( const GeometricField<Type, pointPatchField, pointMesh>&, const pointMesh& sMesh, - const objectRegistry& reg, const labelList& patchMap, const labelList& pointMap ); diff --git a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C index 7986cfc665b..f95b7a9dfef 100644 --- a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C +++ b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C @@ -299,7 +299,6 @@ fvMeshSubset::interpolate ( const GeometricField<Type, pointPatchField, pointMesh>& vf, const pointMesh& sMesh, - const objectRegistry& reg, const labelList& patchMap, const labelList& pointMap ) @@ -385,7 +384,7 @@ fvMeshSubset::interpolate ( "subset"+vf.name(), vf.time().timeName(), - reg, + sMesh.thisDb(), IOobject::NO_READ, IOobject::NO_WRITE ), @@ -410,7 +409,6 @@ tmp<GeometricField<Type, pointPatchField, pointMesh> > fvMeshSubset::interpolate ( sf, pointMesh::New(subMesh()), // subsetted point mesh - subMesh(), // registry (pointfields are stored on the polyMesh) patchMap(), pointMap() ); diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C index 405fb59be08..1adc4046c73 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C @@ -128,7 +128,7 @@ volPointInterpolation::interpolate ( "volPointInterpolate(" + vf.name() + ')', vf.instance(), - vf.db() + pMesh.thisDb() ), pMesh, vf.dimensions(), @@ -168,6 +168,8 @@ volPointInterpolation::interpolate const GeometricField<Type, fvPatchField, volMesh>& vf ) const { + const pointMesh& pm = pointMesh::New(vf.mesh()); + tmp<GeometricField<Type, pointPatchField, pointMesh> > tpf ( new GeometricField<Type, pointPatchField, pointMesh> @@ -176,9 +178,9 @@ volPointInterpolation::interpolate ( "volPointInterpolate(" + vf.name() + ')', vf.instance(), - vf.db() + pm.thisDb() ), - pointMesh::New(vf.mesh()), + pm, vf.dimensions() ) ); diff --git a/src/thermophysicalModels/radiation/radiationModel/radiationModel/newRadiationModel.C b/src/thermophysicalModels/radiation/radiationModel/radiationModel/newRadiationModel.C index a30d7946f4c..0a213f03d3a 100644 --- a/src/thermophysicalModels/radiation/radiationModel/radiationModel/newRadiationModel.C +++ b/src/thermophysicalModels/radiation/radiationModel/radiationModel/newRadiationModel.C @@ -52,8 +52,8 @@ autoPtr<radiationModel> radiationModel::New IOobject ( "radiationProperties", - T.mesh().time().constant(), - T.mesh().db(), + T.time().constant(), + T.db(), IOobject::MUST_READ, IOobject::NO_WRITE ) diff --git a/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C index 5fec3f003fe..adc5c53558d 100644 --- a/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C +++ b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C @@ -54,8 +54,8 @@ Foam::radiation::radiationModel::radiationModel IOobject ( "radiationProperties", - T.mesh().time().constant(), - T.mesh().db(), + T.time().constant(), + T.db(), IOobject::MUST_READ, IOobject::NO_WRITE ) diff --git a/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C b/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C index 2ebc9f7ff0b..2f3804afdec 100644 --- a/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C +++ b/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C @@ -343,7 +343,7 @@ bool Foam::movingConeTopoFvMesh::update() // << endl; { - OFstream str(db().path()/"meshPoints.obj"); + OFstream str(thisDb().path()/"meshPoints.obj"); Pout<< "Writing mesh with meshPoints to " << str.name() << endl; @@ -361,7 +361,7 @@ bool Foam::movingConeTopoFvMesh::update() } } { - OFstream str(db().path()/"preMotionPoints.obj"); + OFstream str(thisDb().path()/"preMotionPoints.obj"); Pout<< "Writing mesh with preMotionPoints to " << str.name() << endl; -- GitLab