From ed94a2714d2646a438621544afb98f2879feeea5 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Fri, 18 Jan 2019 16:26:50 +0100 Subject: [PATCH] STYLE: use HashTable iterator 'val()' method instead of 'object()' --- .../laserDTRM/laserDTRM.C | 2 +- .../phaseSystem/phaseSystemTemplates.H | 4 ++-- .../HeatAndMassTransferPhaseSystem.C | 8 +++---- ...terfaceCompositionPhaseChangePhaseSystem.C | 10 ++++----- .../ThermalPhaseChangePhaseSystem.C | 10 ++++----- .../phaseSystem/phaseSystemTemplates.C | 2 +- .../test/HashPtrTable/Test-HashPtrTable.C | 2 +- .../test/HashTable1/Test-HashTable1.C | 2 +- applications/test/PtrMap/Test-PtrMap.C | 2 +- .../HashTables/HashTable/HashTable.H | 1 + src/OpenFOAM/db/IOobjectList/IOobjectList.C | 11 +++++----- .../db/IOobjectList/IOobjectListTemplates.C | 22 +++++++++---------- src/OpenFOAM/db/dictionary/dictionarySearch.C | 6 ++--- .../db/objectRegistry/objectRegistry.C | 4 ++-- .../objectRegistry/objectRegistryTemplates.C | 18 +++++++-------- .../Fields/transformList/transformList.C | 4 ++-- src/OpenFOAM/global/argList/argList.C | 2 +- .../Identifiers/patch/coupleGroupIdentifier.C | 2 +- .../polyMesh/globalMeshData/globalPoints.C | 2 +- .../polyBoundaryMesh/polyBoundaryMesh.C | 4 ++-- .../polyMesh/syncTools/syncToolsTemplates.C | 10 ++++----- src/OpenFOAM/primitives/enums/NamedEnum.C | 8 +++---- .../ccm/reader/ccmInterfaceDefinitions.H | 4 ++-- src/conversion/ccm/reader/ccmReaderAux.C | 2 +- src/conversion/ccm/reader/ccmReaderMesh.C | 10 ++++----- src/conversion/common/tables/cellTable.C | 2 +- .../dynamicRefineFvMesh/dynamicRefineFvMesh.C | 2 +- .../boundaryCutter/boundaryCutter.C | 9 +++----- .../meshCutAndRemove/meshCutAndRemove.C | 6 ++--- .../meshModifiers/meshCutter/meshCutter.C | 6 ++--- .../undoableMeshCutter/undoableMeshCutter.C | 8 +++---- .../polyTopoChange/polyTopoChange.C | 18 +++++++-------- .../polyTopoChange/polyTopoChangeTemplates.C | 2 +- src/fileFormats/stl/STLAsciiParseI.H | 4 ++-- .../solutionControl/loopControl/loopControl.C | 2 +- .../nearWallFields/nearWallFieldsTemplates.C | 2 +- .../LocalInteraction/LocalInteraction.C | 2 +- .../StandardWallInteraction.C | 2 +- .../meshRefinement/meshRefinement.C | 2 +- .../snappyHexMeshDriver/snappyRefineDriver.C | 2 +- src/meshTools/regionSplit/regionSplit.C | 4 ++-- .../triSurfaceMesh/triSurfaceMesh.C | 2 +- .../sets/cellSources/faceToCell/faceToCell.C | 2 +- .../faceSources/pointToFace/pointToFace.C | 2 +- .../intersectedSurface/edgeSurface.C | 2 +- .../surfaceIntersection/surfaceIntersection.C | 6 ++--- .../regionProperties/regionProperties.C | 4 ++-- src/sampling/meshToMesh/meshToMesh.C | 2 +- src/sampling/probes/probesGrouping.C | 2 +- .../sampledSets/sampledSetsGrouping.C | 2 +- .../sampledSurfaces/sampledSurfacesGrouping.C | 2 +- .../cutting/cuttingSurfaceBaseTemplates.C | 10 ++++----- .../surface/isoSurface/isoSurfaceCell.C | 2 +- .../surfaceFormats/nas/NASsurfaceFormat.C | 2 +- src/surfMesh/surfaceFormats/tri/TRIReader.C | 4 ++-- .../greyMeanAbsorptionEmission.C | 2 +- .../wideBandAbsorptionEmission.C | 2 +- 57 files changed, 134 insertions(+), 139 deletions(-) diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C index e57cc8df7a9..e43b9037495 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C @@ -142,7 +142,7 @@ void Foam::radiation::laserDTRM::initialiseReflection() key, reflectionModel::New ( - iter.object(), + iter.val(), mesh_ ) ); diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystemTemplates.H b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystemTemplates.H index 642c88c3e09..0cffbf066f0 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystemTemplates.H +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystemTemplates.H @@ -46,7 +46,7 @@ void Foam::phaseSystem::createSubModels key, modelType::New ( - iter.object(), + iter.val(), phasePairs_[key] ) ); @@ -76,7 +76,7 @@ void Foam::phaseSystem::createSubModels key, modelType::New ( - iter.object(), + iter.val(), mesh ) ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C index 95cb33d1a2f..f895a15de3f 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C @@ -61,7 +61,7 @@ HeatAndMassTransferPhaseSystem forAllConstIters(this->phasePairs_, phasePairIter) { - const phasePair& pair = *(phasePairIter.object()); + const phasePair& pair = *(phasePairIter.val()); if (pair.ordered()) { @@ -194,7 +194,7 @@ Foam::HeatAndMassTransferPhaseSystem<BasePhaseSystem>::dmdt forAllConstIters(this->phasePairs_, phasePairIter) { - const phasePair& pair = *(phasePairIter.object()); + const phasePair& pair = *(phasePairIter.val()); if (pair.ordered()) { @@ -231,7 +231,7 @@ Foam::HeatAndMassTransferPhaseSystem<BasePhaseSystem>::momentumTransfer() const // Source term due to mass transfer forAllConstIters(this->phasePairs_, phasePairIter) { - const phasePair& pair = *(phasePairIter.object()); + const phasePair& pair = *(phasePairIter.val()); if (pair.ordered()) { @@ -318,7 +318,7 @@ Foam::HeatAndMassTransferPhaseSystem<BasePhaseSystem>::heatTransfer() const // Source term due to mass transfer forAllConstIters(this->phasePairs_, phasePairIter) { - const phasePair& pair = *(phasePairIter.object()); + const phasePair& pair = *(phasePairIter.val()); if (pair.ordered()) { diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C index 2a213d61f52..c52a1f9e2e0 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C @@ -82,7 +82,7 @@ massTransfer() const // Reset the interfacial mass flow rates forAllConstIters(this->phasePairs_, phasePairIter) { - const phasePair& pair = *(phasePairIter.object()); + const phasePair& pair = *(phasePairIter.val()); if (pair.ordered()) { @@ -99,11 +99,9 @@ massTransfer() const // Sum up the contribution from each interface composition model forAllConstIters(interfaceCompositionModels_, modelIter) { - const phasePair& pair = - *(this->phasePairs_[modelIter.key()]); + const phasePair& pair = *(this->phasePairs_[modelIter.key()]); - const interfaceCompositionModel& compositionModel = - *(modelIter.object()); + const interfaceCompositionModel& compositionModel = *(modelIter.val()); const phaseModel& phase = pair.phase1(); const phaseModel& otherPhase = pair.phase2(); @@ -185,7 +183,7 @@ correctThermo() forAllConstIters(this->phasePairs_, phasePairIter) { - const phasePair& pair = *(phasePairIter.object()); + const phasePair& pair = *(phasePairIter.val()); if (pair.ordered()) { diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C index 88c8725a0a3..cba9c2d830e 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C @@ -44,7 +44,7 @@ ThermalPhaseChangePhaseSystem forAllConstIters(this->phasePairs_, phasePairIter) { - const phasePair& pair = *(phasePairIter.object()); + const phasePair& pair = *(phasePairIter.val()); if (pair.ordered()) { @@ -106,7 +106,7 @@ Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::heatTransfer() const // Accumulate mDotL contributions from boundaries forAllConstIters(this->phasePairs_, phasePairIter) { - const phasePair& pair = *(phasePairIter.object()); + const phasePair& pair = *(phasePairIter.val()); if (pair.ordered()) { @@ -201,7 +201,7 @@ Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::massTransfer() const forAllConstIters(this->phasePairs_, phasePairIter) { - const phasePair& pair = *(phasePairIter.object()); + const phasePair& pair = *(phasePairIter.val()); if (pair.ordered()) { @@ -270,7 +270,7 @@ Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::iDmdt forAllConstIters(this->phasePairs_, phasePairIter) { - const phasePair& pair = *(phasePairIter.object()); + const phasePair& pair = *(phasePairIter.val()); if (pair.ordered()) { @@ -305,7 +305,7 @@ void Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctThermo() forAllConstIters(this->phasePairs_, phasePairIter) { - const phasePair& pair = *(phasePairIter.object()); + const phasePair& pair = *(phasePairIter.val()); if (pair.ordered()) { diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C index 824f98b33cb..2e3478c769d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C @@ -48,7 +48,7 @@ void Foam::phaseSystem::createSubModels key, modelType::New ( - iter.object(), + iter.val(), phasePairs_[key]() ) ); diff --git a/applications/test/HashPtrTable/Test-HashPtrTable.C b/applications/test/HashPtrTable/Test-HashPtrTable.C index 79ef9f3d39e..d16f7b56f76 100644 --- a/applications/test/HashPtrTable/Test-HashPtrTable.C +++ b/applications/test/HashPtrTable/Test-HashPtrTable.C @@ -39,7 +39,7 @@ void printTable(const HashPtrTable<T>& table) forAllConstIters(table, iter) { - const T* ptr = iter.object(); + const T* ptr = iter.val(); Info<< iter.key() << " = "; if (ptr) { diff --git a/applications/test/HashTable1/Test-HashTable1.C b/applications/test/HashTable1/Test-HashTable1.C index 26171deee04..0997aa64b05 100644 --- a/applications/test/HashTable1/Test-HashTable1.C +++ b/applications/test/HashTable1/Test-HashTable1.C @@ -112,7 +112,7 @@ int main() Info<< "\nerase table2 by iterator" << nl; forAllIters(table2, iter) { - Info<< "erasing " << iter.key() << " => " << iter.object() << " ... "; + Info<< "erasing " << iter.key() << " => " << iter.val() << " ... "; table2.erase(iter); Info<< "erased" << endl; } diff --git a/applications/test/PtrMap/Test-PtrMap.C b/applications/test/PtrMap/Test-PtrMap.C index 6d5866bc6d3..6e575d7ff6e 100644 --- a/applications/test/PtrMap/Test-PtrMap.C +++ b/applications/test/PtrMap/Test-PtrMap.C @@ -38,7 +38,7 @@ void printTable(const PtrMap<T>& table) forAllConstIters(table, iter) { - const T* ptr = iter.object(); + const T* ptr = iter.val(); Info<< iter.key() << " = "; if (ptr) { diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H index d7bdadc46f5..05c3af81503 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H @@ -652,6 +652,7 @@ protected: } //- The object (value) associated with the iterator + // \deprecated(2019-01) use val() method inline mapped_type& object() const { return entry_->mapped(); diff --git a/src/OpenFOAM/db/IOobjectList/IOobjectList.C b/src/OpenFOAM/db/IOobjectList/IOobjectList.C index e9899964bda..e86c395acf6 100644 --- a/src/OpenFOAM/db/IOobjectList/IOobjectList.C +++ b/src/OpenFOAM/db/IOobjectList/IOobjectList.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2019 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -194,7 +194,7 @@ Foam::label Foam::IOobjectList::append(const IOobjectList& other) InfoInFunction << "Copy append " << iter.key() << nl; } - set(iter.key(), new IOobject(*(iter.object()))); + set(iter.key(), new IOobject(*(iter.val()))); ++count; } } @@ -253,7 +253,7 @@ const Foam::IOobject* Foam::IOobjectList::cfindObject InfoInFunction << "Found " << objName << endl; } - return iter.object(); + return iter.val(); } else if (IOobject::debug) { @@ -422,9 +422,10 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const IOobjectList& list) { os << nl << list.size() << nl << token::BEGIN_LIST << nl; - forAllConstIters(list, it) + forAllConstIters(list, iter) { - os << it.key() << token::SPACE << it.object()->headerClassName() << nl; + os << iter.key() << token::SPACE + << iter.val()->headerClassName() << nl; } os << token::END_LIST; diff --git a/src/OpenFOAM/db/IOobjectList/IOobjectListTemplates.C b/src/OpenFOAM/db/IOobjectList/IOobjectListTemplates.C index d3f5e9a9bd1..5ebedcbd993 100644 --- a/src/OpenFOAM/db/IOobjectList/IOobjectListTemplates.C +++ b/src/OpenFOAM/db/IOobjectList/IOobjectListTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,7 +42,7 @@ Foam::HashTable<Foam::wordHashSet> Foam::IOobjectList::classesImpl forAllConstIters(list, iter) { const word& key = iter.key(); - const IOobject* io = iter.object(); + const IOobject* io = iter.val(); if (matchName(key)) { @@ -68,7 +68,7 @@ Foam::label Foam::IOobjectList::countImpl forAllConstIters(list, iter) { - const IOobject* io = iter.object(); + const IOobject* io = iter.val(); if (matchClass(io->headerClassName()) && matchName(io->name())) { @@ -92,7 +92,7 @@ Foam::label Foam::IOobjectList::countTypeImpl forAllConstIters(list, iter) { - const IOobject* io = iter.object(); + const IOobject* io = iter.val(); if (io->isHeaderClassName<Type>() && matchName(io->name())) { @@ -120,7 +120,7 @@ Foam::wordList Foam::IOobjectList::namesImpl forAllConstIters(list, iter) { const word& key = iter.key(); - const IOobject* io = iter.object(); + const IOobject* io = iter.val(); if (matchClass(io->headerClassName()) && matchName(key)) { @@ -155,7 +155,7 @@ Foam::wordList Foam::IOobjectList::namesTypeImpl forAllConstIters(list, iter) { const word& key = iter.key(); - const IOobject* io = iter.object(); + const IOobject* io = iter.val(); if (io->isHeaderClassName<Type>() && matchName(key)) { @@ -188,7 +188,7 @@ Foam::IOobjectList Foam::IOobjectList::lookupImpl forAllConstIters(list, iter) { const word& key = iter.key(); - const IOobject* io = iter.object(); + const IOobject* io = iter.val(); if (matchName(key)) { @@ -219,7 +219,7 @@ Foam::IOobjectList Foam::IOobjectList::lookupClassImpl forAllConstIters(list, iter) { const word& key = iter.key(); - const IOobject* io = iter.object(); + const IOobject* io = iter.val(); if (matchClass(io->headerClassName()) && matchName(key)) { @@ -249,7 +249,7 @@ Foam::IOobjectList Foam::IOobjectList::lookupClassTypeImpl forAllConstIters(list, iter) { const word& key = iter.key(); - const IOobject* io = iter.object(); + const IOobject* io = iter.val(); if (io->isHeaderClassName<Type>() && matchName(key)) { @@ -278,7 +278,7 @@ const Foam::IOobject* Foam::IOobjectList::cfindObject if (iter.found()) { - const IOobject* io = iter.object(); + const IOobject* io = iter.val(); if (io->isHeaderClassName<Type>()) { @@ -635,7 +635,7 @@ Foam::label Foam::IOobjectList::filterClasses // Matches? either prune (pruning) or keep (!pruning) if ( - (pred(iter.object()->headerClassName()) ? pruning : !pruning) + (pred(iter.val()->headerClassName()) ? pruning : !pruning) && erase(iter) ) { diff --git a/src/OpenFOAM/db/dictionary/dictionarySearch.C b/src/OpenFOAM/db/dictionary/dictionarySearch.C index 28895987365..56460f28dd9 100644 --- a/src/OpenFOAM/db/dictionary/dictionarySearch.C +++ b/src/OpenFOAM/db/dictionary/dictionarySearch.C @@ -271,7 +271,7 @@ Foam::dictionary::const_searcher Foam::dictionary::csearch if (iter.found()) { - finder.set(iter.object()); + finder.set(iter.val()); return finder; } @@ -427,7 +427,7 @@ const Foam::dictionary* Foam::dictionary::cfindScopedDict if (iter.found()) { - const entry *eptr = iter.object(); + const entry *eptr = iter.val(); if (eptr->isDict()) { @@ -534,7 +534,7 @@ Foam::dictionary* Foam::dictionary::makeScopedDict(const fileName& dictPath) if (iter.found()) { - entry *eptr = iter.object(); + entry *eptr = iter.val(); if (eptr->isDict()) { diff --git a/src/OpenFOAM/db/objectRegistry/objectRegistry.C b/src/OpenFOAM/db/objectRegistry/objectRegistry.C index a747de2c83a..e3310a4007e 100644 --- a/src/OpenFOAM/db/objectRegistry/objectRegistry.C +++ b/src/OpenFOAM/db/objectRegistry/objectRegistry.C @@ -90,9 +90,9 @@ Foam::objectRegistry::~objectRegistry() for (iterator iter = begin(); iter != end(); ++iter) { - if (iter.object()->ownedByRegistry()) + if (iter.val()->ownedByRegistry()) { - myObjects[nObjects++] = iter.object(); + myObjects[nObjects++] = iter.val(); } } diff --git a/src/OpenFOAM/db/objectRegistry/objectRegistryTemplates.C b/src/OpenFOAM/db/objectRegistry/objectRegistryTemplates.C index e75a304edae..f2ecbf6c573 100644 --- a/src/OpenFOAM/db/objectRegistry/objectRegistryTemplates.C +++ b/src/OpenFOAM/db/objectRegistry/objectRegistryTemplates.C @@ -42,12 +42,12 @@ Foam::HashTable<Foam::wordHashSet> Foam::objectRegistry::classesImpl // Summary (key,val) = (class-name, object-names) forAllConstIters(list, iter) { - const regIOobject* obj = iter.object(); + const regIOobject* obj = iter.val(); if (matchName(obj->name())) { // Create entry (if needed) and insert - summary(iter.object()->type()).insert(obj->name()); + summary(iter.val()->type()).insert(obj->name()); } } @@ -68,7 +68,7 @@ Foam::label Foam::objectRegistry::countImpl forAllConstIters(list, iter) { - const regIOobject* obj = iter.object(); + const regIOobject* obj = iter.val(); if (matchClass(obj->type()) && matchName(obj->name())) { @@ -92,7 +92,7 @@ Foam::label Foam::objectRegistry::countTypeImpl forAllConstIters(list, iter) { - const regIOobject* obj = iter.object(); + const regIOobject* obj = iter.val(); if ( @@ -123,7 +123,7 @@ Foam::wordList Foam::objectRegistry::namesImpl label count=0; forAllConstIters(list, iter) { - const regIOobject* obj = iter.object(); + const regIOobject* obj = iter.val(); if (matchClass(obj->type()) && matchName(obj->name())) { @@ -157,7 +157,7 @@ Foam::wordList Foam::objectRegistry::namesTypeImpl label count = 0; forAllConstIters(list, iter) { - const regIOobject* obj = iter.object(); + const regIOobject* obj = iter.val(); if ( @@ -235,7 +235,7 @@ Foam::label Foam::objectRegistry::count forAllConstIters(*this, iter) { - const regIOobject* obj = iter.object(); + const regIOobject* obj = iter.val(); if ( @@ -337,7 +337,7 @@ Foam::HashTable<const Type*> Foam::objectRegistry::lookupClass forAllConstIters(*this, iter) { - const regIOobject* obj = iter.object(); + const regIOobject* obj = iter.val(); if (strict ? isType<Type>(*obj) : bool(isA<Type>(*obj))) { @@ -359,7 +359,7 @@ Foam::HashTable<Type*> Foam::objectRegistry::lookupClass forAllIters(*this, iter) { - regIOobject* obj = iter.object(); + regIOobject* obj = iter.val(); if (strict ? isType<Type>(*obj) : bool(isA<Type>(*obj))) { diff --git a/src/OpenFOAM/fields/Fields/transformList/transformList.C b/src/OpenFOAM/fields/Fields/transformList/transformList.C index 7088bcd7e07..675fef4ba1d 100644 --- a/src/OpenFOAM/fields/Fields/transformList/transformList.C +++ b/src/OpenFOAM/fields/Fields/transformList/transformList.C @@ -84,7 +84,7 @@ void Foam::transformList(const tensor& rotTensor, Map<T>& field) { forAllIters(field, iter) { - T& value = iter.object(); + T& value = iter.val(); value = transform(rotTensor, value); } } @@ -112,7 +112,7 @@ void Foam::transformList(const tensor& rotTensor, EdgeMap<T>& field) { forAllIters(field, iter) { - T& value = iter.object(); + T& value = iter.val(); value = transform(rotTensor, value); } } diff --git a/src/OpenFOAM/global/argList/argList.C b/src/OpenFOAM/global/argList/argList.C index 94aa51ca8dc..9323af8bd00 100644 --- a/src/OpenFOAM/global/argList/argList.C +++ b/src/OpenFOAM/global/argList/argList.C @@ -646,7 +646,7 @@ void Foam::argList::setCasePaths() if (optIter.found()) { - caseDir = optIter.object(); + caseDir = optIter.val(); caseDir.clean(); if (caseDir.empty() || caseDir == ".") diff --git a/src/OpenFOAM/meshes/Identifiers/patch/coupleGroupIdentifier.C b/src/OpenFOAM/meshes/Identifiers/patch/coupleGroupIdentifier.C index 0f9a8c11143..28d8683b027 100644 --- a/src/OpenFOAM/meshes/Identifiers/patch/coupleGroupIdentifier.C +++ b/src/OpenFOAM/meshes/Identifiers/patch/coupleGroupIdentifier.C @@ -65,7 +65,7 @@ Foam::label Foam::coupleGroupIdentifier::findOtherPatchID } // Mesh has patch group - const labelList& patchIDs = fnd.object(); + const labelList& patchIDs = fnd.val(); if (&mesh == &thisPatch.boundaryMesh().mesh()) { diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C index f32a551c514..81b8c4a2e26 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C @@ -739,7 +739,7 @@ void Foam::globalPoints::remove forAllConstIters(oldMeshToProcPoint, iter) { const label localPointi = iter.key(); - const labelPairList& pointInfo = oldProcPoints[iter.object()]; + const labelPairList& pointInfo = oldProcPoints[iter.val()]; if (pointInfo.size() == 2) { diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C index 741aeef3e81..bfdda54c351 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C @@ -390,7 +390,7 @@ Foam::polyBoundaryMesh::neighbourEdges() const else { // Second occurrence. Store. - const labelPair& edgeInfo = fnd.object(); + const labelPair& edgeInfo = fnd.val(); neighbourEdges[patchi][edgei - pp.nInternalEdges()] = edgeInfo; @@ -704,7 +704,7 @@ Foam::labelList Foam::polyBoundaryMesh::indices if (iter.found()) { // Hash the patch ids for the group - labelHashSet groupIndices(iter.object()); + labelHashSet groupIndices(iter.val()); groupIndices.erase(patchIndices); // Skip existing patchIndices.append(groupIndices.sortedToc()); diff --git a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C index c0b15c78dae..2655247eaa9 100644 --- a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C +++ b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C @@ -189,7 +189,7 @@ void Foam::syncTools::syncPointMap pointValues, cop, meshPts[nbrIter.key()], - nbrIter.object() + nbrIter.val() ); } } @@ -307,7 +307,7 @@ void Foam::syncTools::syncPointMap sharedPointValues, cop, iter.key(), // edge - iter.object() // value + iter.val() // value ); } } @@ -465,7 +465,7 @@ void Foam::syncTools::syncEdgeMap edgeValues, cop, meshEdge, // edge - nbrIter.object() // value + nbrIter.val() // value ); } } @@ -672,7 +672,7 @@ void Foam::syncTools::syncEdgeMap sharedEdgeValues, cop, iter.key(), // edge - iter.object() // value + iter.val() // value ); } } @@ -721,7 +721,7 @@ void Foam::syncTools::syncEdgeMap forAllConstIters(potentialSharedEdge, iter) { const edge& sharedEdge = iter.key(); - const edge& meshEdge = iter.object(); + const edge& meshEdge = iter.val(); // Do I have a value for the shared edge? const auto sharedFnd = sharedEdgeValues.cfind(sharedEdge); diff --git a/src/OpenFOAM/primitives/enums/NamedEnum.C b/src/OpenFOAM/primitives/enums/NamedEnum.C index 7b5cc701de3..8bd7aa16b71 100644 --- a/src/OpenFOAM/primitives/enums/NamedEnum.C +++ b/src/OpenFOAM/primitives/enums/NamedEnum.C @@ -96,7 +96,7 @@ Foam::List<int> Foam::NamedEnum<EnumType, nEnum>::values() const if (iter.found()) { - lst[count++] = iter.object(); + lst[count++] = iter.val(); } } } @@ -113,7 +113,7 @@ bool Foam::NamedEnum<EnumType, nEnum>::hasName(const EnumType e) const forAllConstIters(lookup_, iter) { - if (iter.object() == enumValue) + if (iter.val() == enumValue) { return true; } @@ -140,7 +140,7 @@ EnumType Foam::NamedEnum<EnumType, nEnum>::lookup << exit(FatalIOError); } - return EnumType(iter.object()); + return EnumType(iter.val()); } @@ -177,7 +177,7 @@ EnumType Foam::NamedEnum<EnumType, nEnum>::read(Istream& is) const << exit(FatalIOError); } - return EnumType(iter.object()); + return EnumType(iter.val()); } diff --git a/src/conversion/ccm/reader/ccmInterfaceDefinitions.H b/src/conversion/ccm/reader/ccmInterfaceDefinitions.H index 066340be806..1b0dd864a73 100644 --- a/src/conversion/ccm/reader/ccmInterfaceDefinitions.H +++ b/src/conversion/ccm/reader/ccmInterfaceDefinitions.H @@ -224,7 +224,7 @@ public: { forAllConstIters(map(), iter) { - if (iter.object().inInterface(bndId)) + if (iter.val().inInterface(bndId)) { return true; } @@ -240,7 +240,7 @@ public: word ifname; forAllConstIters(map(), iter) { - ifname = iter.object().canonicalName(bndId); + ifname = iter.val().canonicalName(bndId); if (!ifname.empty()) { break; diff --git a/src/conversion/ccm/reader/ccmReaderAux.C b/src/conversion/ccm/reader/ccmReaderAux.C index eead7bb1c98..9523416c57c 100644 --- a/src/conversion/ccm/reader/ccmReaderAux.C +++ b/src/conversion/ccm/reader/ccmReaderAux.C @@ -94,7 +94,7 @@ void Foam::ccm::reader::warnDuplicates Info << nl << "WARNING: " << context << " with identical names:"; forAllConstIters(hashed, iter) { - if (iter.object() > 1) + if (iter.val() > 1) { Info << " " << iter.key(); } diff --git a/src/conversion/ccm/reader/ccmReaderMesh.C b/src/conversion/ccm/reader/ccmReaderMesh.C index eb03312b8cb..1a1616c50f0 100644 --- a/src/conversion/ccm/reader/ccmReaderMesh.C +++ b/src/conversion/ccm/reader/ccmReaderMesh.C @@ -480,7 +480,7 @@ void Foam::ccm::reader::readCells auto dictIter = boundaryRegion_.find(info.ccmIndex); if (dictIter.found()) { - dictionary& dict = dictIter.object(); + dictionary& dict = dictIter.val(); const word patchName(dict.get<word>("Label")); const word patchType(dict.get<word>("BoundaryType")); @@ -1263,7 +1263,7 @@ void Foam::ccm::reader::removeUnwanted() forAllConstIters(removeMap, iter) { Info<< " zone " - << iter.key() << " : " << iter.object() << nl; + << iter.key() << " : " << iter.val() << nl; } Info<<"retain "<< (nCells_ - nRemove) << " cells in " @@ -1272,7 +1272,7 @@ void Foam::ccm::reader::removeUnwanted() forAllConstIters(keepMap, iter) { Info<< " zone " - << iter.key() << " : " << iter.object() << nl; + << iter.key() << " : " << iter.val() << nl; } } } @@ -1826,7 +1826,7 @@ void Foam::ccm::reader::mergeInplaceInterfaces() forAllConstIters(interfaceDefinitions_, iter) { - const interfaceEntry& ifentry = iter.object(); + const interfaceEntry& ifentry = iter.val(); labelPair patchPair ( @@ -2366,7 +2366,7 @@ void Foam::ccm::reader::reorderMesh() forAllIters(monitoringSets_, iter) { - labelList& lst = iter.object(); + labelList& lst = iter.val(); inplaceRenumber(oldToNew, lst); // disallow monitoring on boundaries diff --git a/src/conversion/common/tables/cellTable.C b/src/conversion/common/tables/cellTable.C index d01749d1394..cd547c3b7be 100644 --- a/src/conversion/common/tables/cellTable.C +++ b/src/conversion/common/tables/cellTable.C @@ -239,7 +239,7 @@ Foam::Map<Foam::word> Foam::cellTable::selectType(const word& matl) const forAllConstIter(Map<dictionary>, *this, iter) { const label index = iter.key(); - const dictionary& dict = iter.object(); + const dictionary& dict = iter.val(); if ( diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C index abc72e686f0..833ca52505f 100644 --- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C +++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C @@ -589,7 +589,7 @@ Foam::dynamicRefineFvMesh::unrefine forAllConstIters(faceToSplitPoint, iter) { const label oldFacei = iter.key(); - const label oldPointi = iter.object(); + const label oldPointi = iter.val(); if (reversePointMap[oldPointi] < 0) { diff --git a/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.C b/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.C index 6edc19c243c..8319a43162d 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.C +++ b/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.C @@ -42,9 +42,6 @@ defineTypeNameAndDebug(boundaryCutter, 0); } -// * * * * * * * * * * * * * Private Static Functions * * * * * * * * * * * // - - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void Foam::boundaryCutter::getFaceInfo @@ -874,10 +871,10 @@ void Foam::boundaryCutter::updateMesh(const mapPolyMesh& morphMap) forAllConstIters(edgeAddedPoints_, iter) { const edge& e = iter.key(); + const labelList& addedPoints = iter.val(); - label newStart = morphMap.reversePointMap()[e.start()]; - - label newEnd = morphMap.reversePointMap()[e.end()]; + const label newStart = morphMap.reversePointMap()[e.start()]; + const label newEnd = morphMap.reversePointMap()[e.end()]; if (newStart >= 0 && newEnd >= 0) { diff --git a/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C b/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C index b6549c9dcb3..80c9e7c2948 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C +++ b/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C @@ -485,7 +485,7 @@ Foam::face Foam::meshCutAndRemove::addEdgeCutsToFace(const label facei) const if (fnd.found()) { // edge has been cut. Introduce new vertex. - newFace[newFp++] = fnd.object(); + newFace[newFp++] = fnd.val(); } } @@ -546,7 +546,7 @@ Foam::face Foam::meshCutAndRemove::loopToFace if (fnd.found()) { - newFace[newFacei++] = fnd.object(); + newFace[newFacei++] = fnd.val(); } } } @@ -1307,7 +1307,7 @@ void Foam::meshCutAndRemove::updateMesh(const mapPolyMesh& map) forAllConstIters(addedPoints_, iter) { const edge& e = iter.key(); - const label addedPointi = iter.object(); + const label addedPointi = iter.val(); label newStart = map.reversePointMap()[e.start()]; diff --git a/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C b/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C index bae27fde251..d9d07ed8f25 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C +++ b/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C @@ -431,7 +431,7 @@ Foam::face Foam::meshCutter::addEdgeCutsToFace(const label facei) const if (fnd.found()) { // edge has been cut. Introduce new vertex. - newFace[newFp++] = fnd.object(); + newFace[newFp++] = fnd.val(); } } @@ -489,7 +489,7 @@ Foam::face Foam::meshCutter::loopToFace if (fnd.found()) { - newFace[newFacei++] = fnd.object(); + newFace[newFacei++] = fnd.val(); } } } @@ -1074,7 +1074,7 @@ void Foam::meshCutter::updateMesh(const mapPolyMesh& morphMap) forAllConstIters(addedPoints_, iter) { const edge& e = iter.key(); - const label addedPointi = iter.object(); + const label addedPointi = iter.val(); label newStart = morphMap.reversePointMap()[e.start()]; diff --git a/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C b/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C index 71623907fde..b982f738ff1 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C +++ b/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C @@ -237,12 +237,10 @@ void Foam::undoableMeshCutter::setRefinement if (undoable_) { // Use cells cut in this iteration to update splitCell tree. - forAllConstIter(Map<label>, addedCells(), iter) + forAllConstIters(addedCells(), iter) { - label celli = iter.key(); - - label addedCelli = iter(); - + const label celli = iter.key(); + const label addedCelli = iter.val(); // Newly created split cell. (celli -> celli + addedCelli) diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C index 0c7f9d570db..80696c0912e 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C @@ -1363,7 +1363,7 @@ void Foam::polyTopoChange::calcFaceInflationMaps forAllConstIters(faceFromPoint_, iter) { const label facei = iter.key(); - const label pointi = iter.object(); + const label pointi = iter.val(); // Get internal or patch faces using point on old mesh const bool internal = (region_[facei] == -1); @@ -1395,7 +1395,7 @@ void Foam::polyTopoChange::calcFaceInflationMaps forAllConstIters(faceFromEdge_, iter) { const label facei = iter.key(); - const label edgei = iter.object(); + const label edgei = iter.val(); // Get internal or patch faces using edge on old mesh const bool internal = (region_[facei] == -1); @@ -1445,7 +1445,7 @@ void Foam::polyTopoChange::calcCellInflationMaps forAllConstIters(cellFromPoint_, iter) { const label celli = iter.key(); - const label pointi = iter.object(); + const label pointi = iter.val(); cellsFromPoints[nCellsFromPoints++] = objectMap ( @@ -1466,7 +1466,7 @@ void Foam::polyTopoChange::calcCellInflationMaps forAllConstIters(cellFromEdge_, iter) { const label celli = iter.key(); - const label edgei = iter.object(); + const label edgei = iter.val(); cellsFromEdges[nCellsFromEdges++] = objectMap ( @@ -1489,7 +1489,7 @@ void Foam::polyTopoChange::calcCellInflationMaps forAllConstIters(cellFromFace_, iter) { const label celli = iter.key(); - const label oldFacei = iter.object(); + const label oldFacei = iter.val(); if (mesh.isInternalFace(oldFacei)) { @@ -1548,7 +1548,7 @@ void Foam::polyTopoChange::resetZones forAllConstIters(pointZone_, iter) { const label pointi = iter.key(); - const label zonei = iter.object(); + const label zonei = iter.val(); if (zonei < 0 || zonei >= pointZones.size()) { @@ -1572,7 +1572,7 @@ void Foam::polyTopoChange::resetZones forAllConstIters(pointZone_, iter) { const label pointi = iter.key(); - const label zonei = iter.object(); + const label zonei = iter.val(); addressing[zonei][nPoints[zonei]++] = pointi; } @@ -1634,7 +1634,7 @@ void Foam::polyTopoChange::resetZones forAllConstIters(faceZone_, iter) { const label facei = iter.key(); - const label zonei = iter.object(); + const label zonei = iter.val(); if (zonei < 0 || zonei >= faceZones.size()) { @@ -1659,7 +1659,7 @@ void Foam::polyTopoChange::resetZones forAllConstIters(faceZone_, iter) { const label facei = iter.key(); - const label zonei = iter.object(); + const label zonei = iter.val(); const label index = nFaces[zonei]++; diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChangeTemplates.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChangeTemplates.C index 731d0beb018..1c3f97d0a1c 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChangeTemplates.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChangeTemplates.C @@ -86,7 +86,7 @@ void Foam::polyTopoChange::renumberKey if (newKey >= 0) { - newMap.insert(newKey, iter.object()); + newMap.insert(newKey, iter.val()); } } diff --git a/src/fileFormats/stl/STLAsciiParseI.H b/src/fileFormats/stl/STLAsciiParseI.H index 4479ef44e73..b2f5c583291 100644 --- a/src/fileFormats/stl/STLAsciiParseI.H +++ b/src/fileFormats/stl/STLAsciiParseI.H @@ -35,10 +35,10 @@ inline void Foam::Detail::STLAsciiParse::beginSolid(word solidName) auto iter = nameLookup_.cfind(solidName); if (iter.found()) { - if (groupId_ != iter.object()) + if (groupId_ != iter.val()) { sorted_ = false; // Group appeared out of order - groupId_ = iter.object(); + groupId_ = iter.val(); } } else diff --git a/src/finiteVolume/cfdTools/general/solutionControl/loopControl/loopControl.C b/src/finiteVolume/cfdTools/general/solutionControl/loopControl/loopControl.C index e8b4d8551a9..62384ee0ab9 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/loopControl/loopControl.C +++ b/src/finiteVolume/cfdTools/general/solutionControl/loopControl/loopControl.C @@ -106,7 +106,7 @@ bool Foam::loopControl::checkConverged() const forAllConstIters(meshes, meshIter) { - const fvMesh& regionMesh = *(meshIter.object()); + const fvMesh& regionMesh = *(meshIter.val()); const dictionary& solverDict = regionMesh.solverPerformanceDict(); diff --git a/src/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C b/src/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C index b72e13a2aa9..0c598837ae6 100644 --- a/src/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C +++ b/src/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C @@ -39,7 +39,7 @@ void Foam::functionObjects::nearWallFields::createFields forAllConstIters(flds, iter) { - const VolFieldType& fld = *(iter.object()); + const VolFieldType& fld = *(iter.val()); if (fieldMap_.found(fld.name())) { diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C index 83e0d7f9474..8c3c1bc232a 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C @@ -358,7 +358,7 @@ void Foam::LocalInteraction<CloudType>::info(Ostream& os) labelList indexToInjector(injIdToIndex_.size()); forAllConstIters(injIdToIndex_, iter) { - indexToInjector[iter.object()] = iter.key(); + indexToInjector[iter.val()] = iter.key(); } forAll(patchData_, i) diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C index e8d9ceb2203..1d2ad910ad0 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C @@ -271,7 +271,7 @@ void Foam::StandardWallInteraction<CloudType>::info(Ostream& os) labelList indexToInjector(injIdToIndex_.size()); forAllConstIters(injIdToIndex_, iter) { - indexToInjector[iter.object()] = iter.key(); + indexToInjector[iter.val()] = iter.key(); } forAll(npe, i) diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C index 97c8708a4a4..404042246b2 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C @@ -2696,7 +2696,7 @@ void Foam::meshRefinement::updateMesh if (newFacei >= 0) { - newFaceToPatch.insert(newFacei, iter.object()); + newFaceToPatch.insert(newFacei, iter.val()); } } faceToCoupledPatch_.transfer(newFaceToPatch); diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C index 7d4f171a8d3..8bd94a084e3 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C @@ -2609,7 +2609,7 @@ void Foam::snappyRefineDriver::addFaceZones forAllConstIters(faceZoneToPatches, iter) { const word& fzName = iter.key(); - const Pair<word>& patchNames = iter.object(); + const Pair<word>& patchNames = iter.val(); // Get any user-defined faceZone data surfaceZonesInfo::faceZoneType fzType; diff --git a/src/meshTools/regionSplit/regionSplit.C b/src/meshTools/regionSplit/regionSplit.C index 47056b2092a..c35d7ec1576 100644 --- a/src/meshTools/regionSplit/regionSplit.C +++ b/src/meshTools/regionSplit/regionSplit.C @@ -660,7 +660,7 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::reduceRegions forAllConstIters(localToGlobal, iter) { - const label regioni = iter.object(); + const label regioni = iter.val(); if (globalRegions.isLocal(regioni)) { @@ -706,7 +706,7 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::reduceRegions forAllConstIters(localToGlobal, iter) { - const label regioni = iter.object(); + const label regioni = iter.val(); if (globalRegions.isLocal(regioni)) { diff --git a/src/meshTools/searchableSurfaces/triSurfaceMesh/triSurfaceMesh.C b/src/meshTools/searchableSurfaces/triSurfaceMesh/triSurfaceMesh.C index 03e36f1ed40..2ffe223fcfa 100644 --- a/src/meshTools/searchableSurfaces/triSurfaceMesh/triSurfaceMesh.C +++ b/src/meshTools/searchableSurfaces/triSurfaceMesh/triSurfaceMesh.C @@ -219,7 +219,7 @@ bool Foam::triSurfaceMesh::isSurfaceClosed() const // Check for any edges used only once. forAllConstIters(facesPerEdge, iter) { - if (iter.object() != 2) + if (iter.val() != 2) { return false; } diff --git a/src/meshTools/sets/cellSources/faceToCell/faceToCell.C b/src/meshTools/sets/cellSources/faceToCell/faceToCell.C index d423639a2f1..d5dbecce9fe 100644 --- a/src/meshTools/sets/cellSources/faceToCell/faceToCell.C +++ b/src/meshTools/sets/cellSources/faceToCell/faceToCell.C @@ -120,7 +120,7 @@ void Foam::faceToCell::combine forAllConstIters(facesPerCell, iter) { const label celli = iter.key(); - const label count = iter.object(); + const label count = iter.val(); if (count == mesh_.cells()[celli].size()) { diff --git a/src/meshTools/sets/faceSources/pointToFace/pointToFace.C b/src/meshTools/sets/faceSources/pointToFace/pointToFace.C index f3fe6f9e970..2cfa498e7f3 100644 --- a/src/meshTools/sets/faceSources/pointToFace/pointToFace.C +++ b/src/meshTools/sets/faceSources/pointToFace/pointToFace.C @@ -126,7 +126,7 @@ void Foam::pointToFace::combine forAllConstIters(numPoints, iter) { const label facei = iter.key(); - const label count = iter.object(); + const label count = iter.val(); if (count == mesh_.faces()[facei].size()) { diff --git a/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C b/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C index 00fbac4214a..a155c9cebbd 100644 --- a/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C +++ b/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C @@ -247,7 +247,7 @@ Foam::edgeSurface::edgeSurface const label facei = iter.key()[isFirstSurface ? 0 : 1]; // Edge label in intersection - const label edgeI = iter.object(); + const label edgeI = iter.val(); // Store on face-edge addressing. (note: offset edge) allFaceEdges[facei].append(edgeI + nSurfaceEdges_); diff --git a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C index 8eb4827f684..356b473f64d 100644 --- a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C +++ b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C @@ -982,7 +982,7 @@ void Foam::surfaceIntersection::joinDisconnected forAllConstIters(facePairToEdge_, iter) { const labelPair& twoFaces = iter.key(); - const edge& e = iter.object(); + const edge& e = iter.val(); if (e.count() == 1) { @@ -1012,7 +1012,7 @@ void Foam::surfaceIntersection::joinDisconnected forAllConstIters(mapping, iter) { - const auto& connect = iter.object(); + const auto& connect = iter.val(); if (connect.size() == 2) { @@ -1553,7 +1553,7 @@ void Foam::surfaceIntersection::mergeEdges() // // Additional safety, in case the edge was replaced? // forAllIters(facePairToEdge_, iter) // { - // iter.object() = edgeNumbering[iter.object()]; + // iter.val() = edgeNumbering[iter.val()]; // } // } diff --git a/src/regionModels/regionModel/regionProperties/regionProperties.C b/src/regionModels/regionModel/regionProperties/regionProperties.C index 6d91d2bf341..23edbd1e9cf 100644 --- a/src/regionModels/regionModel/regionProperties/regionProperties.C +++ b/src/regionModels/regionModel/regionProperties/regionProperties.C @@ -76,7 +76,7 @@ Foam::label Foam::regionProperties::count() const forAllConstIters(props, iter) { - n += iter.object().size(); + n += iter.val().size(); } return n; @@ -114,7 +114,7 @@ Foam::wordList Foam::regionProperties::sortedNames() const forAllConstIters(props, iter) { - for (const word& name : iter.object()) + for (const word& name : iter.val()) { list[n] = name; ++n; diff --git a/src/sampling/meshToMesh/meshToMesh.C b/src/sampling/meshToMesh/meshToMesh.C index f240c98d0c4..bae74315311 100644 --- a/src/sampling/meshToMesh/meshToMesh.C +++ b/src/sampling/meshToMesh/meshToMesh.C @@ -800,7 +800,7 @@ void Foam::meshToMesh::constructFromCuttingPatches forAllConstIters(patchMap, iter) { const word& tgtPatchName = iter.key(); - const word& srcPatchName = iter.object(); + const word& srcPatchName = iter.val(); const polyPatch& srcPatch = srcBm[srcPatchName]; diff --git a/src/sampling/probes/probesGrouping.C b/src/sampling/probes/probesGrouping.C index 946cc93d304..2ee7976773b 100644 --- a/src/sampling/probes/probesGrouping.C +++ b/src/sampling/probes/probesGrouping.C @@ -62,7 +62,7 @@ Foam::label Foam::probes::classifyFields() forAllConstIters(available, iter) { const word& fieldType = iter.key(); - const wordList fieldNames = iter.object().sortedToc(); + const wordList fieldNames = iter.val().sortedToc(); const label count = fieldNames.size(); // pre-filtered, so non-empty diff --git a/src/sampling/sampledSet/sampledSets/sampledSetsGrouping.C b/src/sampling/sampledSet/sampledSets/sampledSetsGrouping.C index 4d57af3ebee..95bbb39107b 100644 --- a/src/sampling/sampledSet/sampledSets/sampledSetsGrouping.C +++ b/src/sampling/sampledSet/sampledSets/sampledSetsGrouping.C @@ -88,7 +88,7 @@ Foam::label Foam::sampledSets::classifyFields() forAllConstIters(available, iter) { const word& fieldType = iter.key(); - const wordList fieldNames = iter.object().sortedToc(); + const wordList fieldNames = iter.val().sortedToc(); const label count = fieldNames.size(); // pre-filtered, so non-empty diff --git a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfacesGrouping.C b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfacesGrouping.C index 233bb65e104..2190dbecc26 100644 --- a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfacesGrouping.C +++ b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfacesGrouping.C @@ -77,7 +77,7 @@ Foam::label Foam::sampledSurfaces::classifyFields() // Total number selected forAllConstIters(available, iter) { - nFields += iter.object().size(); + nFields += iter.val().size(); } return nFields; diff --git a/src/sampling/surface/cutting/cuttingSurfaceBaseTemplates.C b/src/sampling/surface/cutting/cuttingSurfaceBaseTemplates.C index 9249d6f7dc3..ed5bc803147 100644 --- a/src/sampling/surface/cutting/cuttingSurfaceBaseTemplates.C +++ b/src/sampling/surface/cutting/cuttingSurfaceBaseTemplates.C @@ -257,7 +257,7 @@ void Foam::cuttingSurfaceBase::walkCellCuts // they can also be used to determine the correct face orientation. const edge refEdge = localFaces.begin().key(); - label nextFace = localFaces.begin().object()[0]; + label nextFace = localFaces.begin().val()[0]; DebugInfo << "search face " << nextFace << " IN " << localEdges << endl; @@ -274,23 +274,23 @@ void Foam::cuttingSurfaceBase::walkCellCuts forAllIters(localFaces, iter) { DebugInfo - << "lookup " << nextFace << " in " << iter.object() << nl; + << "lookup " << nextFace << " in " << iter.val() << nl; // Find local index (0,1) or -1 on failure - const label got = iter.object().which(nextFace); + const label got = iter.val().which(nextFace); if (got != -1) { ok = true; // The other face - nextFace = iter.object()[(got?0:1)]; + nextFace = iter.val()[(got?0:1)]; // The edge -> cut point localFaceLoop.append(localEdges[iter.key()]); DebugInfo - <<" faces " << iter.object() + <<" faces " << iter.val() << " point " << localFaceLoop.last() << " edge=" << iter.key() << " nextFace=" << nextFace << nl; diff --git a/src/sampling/surface/isoSurface/isoSurfaceCell.C b/src/sampling/surface/isoSurface/isoSurfaceCell.C index f34a43a9c0e..95bc6d62003 100644 --- a/src/sampling/surface/isoSurface/isoSurfaceCell.C +++ b/src/sampling/surface/isoSurface/isoSurfaceCell.C @@ -1185,7 +1185,7 @@ Foam::label Foam::isoSurfaceCell::markDanglingTriangles // with only one connected edge (= this edge) const label edgeI = iter.key(); - const labelList& otherEdgeFaces = iter.object(); + const labelList& otherEdgeFaces = iter.val(); // Remove all dangling triangles if (danglingTriangle(faceEdges[edgeFace0[edgeI]], edgeFace1)) diff --git a/src/surfMesh/surfaceFormats/nas/NASsurfaceFormat.C b/src/surfMesh/surfaceFormats/nas/NASsurfaceFormat.C index fcd7e1c3be5..8c2783a9b61 100644 --- a/src/surfMesh/surfaceFormats/nas/NASsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/nas/NASsurfaceFormat.C @@ -386,7 +386,7 @@ bool Foam::fileFormats::NASsurfaceFormat<Face>::read forAllConstIters(zoneLookup, iter) { const label groupId = iter.key(); - const label zoneId = iter.object(); + const label zoneId = iter.val(); const auto iterName = nameLookup.cfind(groupId); if (iterName.found()) diff --git a/src/surfMesh/surfaceFormats/tri/TRIReader.C b/src/surfMesh/surfaceFormats/tri/TRIReader.C index 2c0b926f918..95a244f740f 100644 --- a/src/surfMesh/surfaceFormats/tri/TRIReader.C +++ b/src/surfMesh/surfaceFormats/tri/TRIReader.C @@ -114,10 +114,10 @@ bool Foam::fileFormats::TRIReader::readFile(const fileName& filename) const auto iter = lookup.cfind(name); if (iter.found()) { - if (zoneI != iter.object()) + if (zoneI != iter.val()) { sorted_ = false; // Group appeared out of order - zoneI = iter.object(); + zoneI = iter.val(); } } else diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C index a5dc91ff2eb..c00f149fbcc 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C @@ -123,7 +123,7 @@ Foam::radiation::greyMeanAbsorptionEmission::greyMeanAbsorptionEmission forAllConstIters(speciesNames_, iter) { const word& specieName = iter.key(); - const label index = iter.object(); + const label index = iter.val(); volScalarField* fldPtr = mesh.getObjectPtr<volScalarField>(specieName); diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C index e8b2f17a709..6717674e614 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C @@ -134,7 +134,7 @@ Foam::radiation::wideBandAbsorptionEmission::wideBandAbsorptionEmission forAllConstIters(speciesNames_, iter) { const word& specieName = iter.key(); - const label index = iter.object(); + const label index = iter.val(); volScalarField* fldPtr = mesh.getObjectPtr<volScalarField>(specieName); -- GitLab