diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C index a9224f59eb72840118e350d3e5e98f5e91ff8c14..9f42a4cc97a4c8fc9b11d04e3b9c0a1a14f0abdc 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 8aac1f6b7e978f23d10c4c15dfe6116374c013f8..a4b33b97dde4994f8aab8483985daf096c997874 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/containers/Lists/DynamicList/DynamicList.H b/src/OpenFOAM/containers/Lists/DynamicList/DynamicList.H index 47e7c4b200936d6457ff63c985ae32e3a4379da1..6ad83c809a45207a85b4b25642c6b4f3c82ff0ce 100644 --- a/src/OpenFOAM/containers/Lists/DynamicList/DynamicList.H +++ b/src/OpenFOAM/containers/Lists/DynamicList/DynamicList.H @@ -192,9 +192,14 @@ public: //- Assignment of all addressed entries to the given value inline void operator=(const T&); - //- Assignment from List<T>. Also handles assignment from DynamicList. - inline void operator=(const UList<T>&); + //- Assignment from DynamicList + inline void operator= + ( + const DynamicList<T, SizeInc, SizeMult, SizeDiv>& + ); + //- Assignment from List<T>. + inline void operator=(const UList<T>&); // IOstream operators diff --git a/src/OpenFOAM/containers/Lists/DynamicList/DynamicListI.H b/src/OpenFOAM/containers/Lists/DynamicList/DynamicListI.H index 5fe561e0f2820504e0ca50e99af96357ddf9da11..5ee9a3ce870b32560cff251debf66617649b4ce0 100644 --- a/src/OpenFOAM/containers/Lists/DynamicList/DynamicListI.H +++ b/src/OpenFOAM/containers/Lists/DynamicList/DynamicListI.H @@ -386,13 +386,36 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator= ( const UList<T>& lst ) +{ + if (capacity_ >= lst.size()) + { + // can copy w/o reallocating, match initial size to avoid reallocation + List<T>::size(lst.size()); + List<T>::operator=(lst); + } + else + { + // make everything available for the copy operation + List<T>::size(capacity_); + + List<T>::operator=(lst); + capacity_ = List<T>::size(); + } +} + + +template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv> +inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator= +( + const DynamicList<T, SizeInc, SizeMult, SizeDiv>& lst +) { if (this == &lst) { FatalErrorIn ( "DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator=" - "(const UList<T>&)" + "(const DynamicList<T, SizeInc, SizeMult, SizeDiv>&)" ) << "attempted assignment to self" << abort(FatalError); } diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/MapGeometricFields.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/MapGeometricFields.H index b85d27c8ad3a78ed172e6357b5ec1f88404b623e..5f5896893bb22544fd7f1ce03381d0c3bfdb0626 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 e1df085914ba626949f74d9ee624ab90b20a97d1..633b8e2f37adbe55e66975642a62db9ee80e61cd 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 eeec9ac71e928287979128963d2fa5f155664f5f..847844e21b5375d4e19b664e114f1a6f9bfc728c 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 232929e295fa90bdbf9a9f716ee4353caa0f6f9c..68f05c2f82b58136ab9ac14c8865287369cec943 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 ac9a65fe64639a738ecc7a057e75337035cbed0c..135b74c6abd34814474c09fa8fbc7e0e4048e42e 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 1176f77bc91cddfc57ecf0ced3833ecdb24ee7c5..5c6f39e7782102bd5de66b623ae0812accff6070 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 16f80727e5e7c869bd575fea6251f278b625da5c..a41f725c459022d507a616417b90642563ca84de 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 0274524887a44aa523e5e9cf6b0c02baf6855a07..3f73e8225c29da47c10caaf896faf967dfa8e857 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 a1b10f0d8a6cc9a9ddff2454e269775937d8b034..c3a789e54dc091536f74bc351d7180ae239e7c3f 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 0dfd7685c84548c6728809d570950666652b16b6..588394d1c230e771d5155e537dd81673befd4925 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 644d4a446a94aa33b8d27e2d256bffb96b13ab3c..24d9ebbb136d1f7d751d2f30549d43d34896c533 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 b384902710536955ebe0cbf93440b0441b97f46d..8d3c0e1e76bc2adaa66e67ffbc402c8c0f87fa43 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.time(), // 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 f6023764612f9cf3710397026f093e3bb003c081..e53c4e041a9b204b259ce65f53acfd32a5e345c1 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 859c76020c0d7f7e751b226209d0c31d7bc4438f..37d38cac4886291b8f836ecb64a595013a087027 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 a16ea2fd04e0b0980251c8c09e0159a94dacaea7..394be20d2e070bd152dab33fd1d971d7a101ace9 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 914fe229788bd5260de9a0c0393d6c728a68fa5a..ff94172db043b22a9b09bc1c04a363234683b430 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 1192ef23577a5419231b10e9c23fe54aec6b8b19..d9c775a68ba3b93062e2bfb9fc301f3703fc35e4 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 819dd3051479ce3df411a444706d62f8c8202534..64e4d87f3e69dc9f91fd45745438d4b7527f8596 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 1a277a14b958b3bd3e43c9d8d1091c3852011e78..0f9784affd556ea502cff6dbf0ebb7d43829db68 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 32749e52334208ee94899cb0290450d2b62696dd..9ad70db6473e14811f34450c8904704009c00480 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 7986cfc665b74c5905b24ce94b3fc7847e9a3047..f95b7a9dfef29901b0d8fc03828aeb0dabf7e20c 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 405fb59be08a7f6c24f9aa500a15f7e2af9f57be..1adc4046c73819ced0e64c00090a69d7286a06f7 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/sampling/Make/files b/src/sampling/Make/files index c20d4aa7a6838ded07b2abede4248a20094bd485..43bc910a3cc2b67b1a314a3f095885c09399a868 100644 --- a/src/sampling/Make/files +++ b/src/sampling/Make/files @@ -22,8 +22,8 @@ $(setWriters)/xmgrace/xmgraceSetWriterRunTime.C cuttingPlane/cuttingPlane.C -sampledSurface/patch/sampledPatch.C -sampledSurface/plane/sampledPlane.C +sampledSurface/sampledPatch/sampledPatch.C +sampledSurface/sampledPlane/sampledPlane.C sampledSurface/isoSurface/isoSurface.C sampledSurface/isoSurface/sampledIsoSurface.C sampledSurface/isoSurface/isoSurfaceCell.C diff --git a/src/sampling/sampledSurface/patch/sampledPatch.C b/src/sampling/sampledSurface/sampledPatch/sampledPatch.C similarity index 100% rename from src/sampling/sampledSurface/patch/sampledPatch.C rename to src/sampling/sampledSurface/sampledPatch/sampledPatch.C diff --git a/src/sampling/sampledSurface/patch/sampledPatch.H b/src/sampling/sampledSurface/sampledPatch/sampledPatch.H similarity index 100% rename from src/sampling/sampledSurface/patch/sampledPatch.H rename to src/sampling/sampledSurface/sampledPatch/sampledPatch.H diff --git a/src/sampling/sampledSurface/patch/sampledPatchTemplates.C b/src/sampling/sampledSurface/sampledPatch/sampledPatchTemplates.C similarity index 100% rename from src/sampling/sampledSurface/patch/sampledPatchTemplates.C rename to src/sampling/sampledSurface/sampledPatch/sampledPatchTemplates.C diff --git a/src/sampling/sampledSurface/plane/sampledPlane.C b/src/sampling/sampledSurface/sampledPlane/sampledPlane.C similarity index 100% rename from src/sampling/sampledSurface/plane/sampledPlane.C rename to src/sampling/sampledSurface/sampledPlane/sampledPlane.C diff --git a/src/sampling/sampledSurface/plane/sampledPlane.H b/src/sampling/sampledSurface/sampledPlane/sampledPlane.H similarity index 100% rename from src/sampling/sampledSurface/plane/sampledPlane.H rename to src/sampling/sampledSurface/sampledPlane/sampledPlane.H diff --git a/src/sampling/sampledSurface/plane/sampledPlaneTemplates.C b/src/sampling/sampledSurface/sampledPlane/sampledPlaneTemplates.C similarity index 100% rename from src/sampling/sampledSurface/plane/sampledPlaneTemplates.C rename to src/sampling/sampledSurface/sampledPlane/sampledPlaneTemplates.C diff --git a/src/thermophysicalModels/radiation/radiationModel/radiationModel/newRadiationModel.C b/src/thermophysicalModels/radiation/radiationModel/radiationModel/newRadiationModel.C index a30d7946f4c94b03eb76aeb056a22d56f3cdbf1a..0a213f03d3a6ef3cfd72ec9e508363076dbceb9d 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 5fec3f003fea1be928dcb989137f8f53fea60512..adc5c53558d63697d7220a54692e283329eabfe3 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 2ebc9f7ff0b4de983076571b682b3aeea1bef5dd..2f3804afdec02b029f572c2f884f2d086c0c3075 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;