STYLE: use HashTable iterator 'val()' method instead of 'object()'

This commit is contained in:
Mark Olesen
2019-01-18 16:26:50 +01:00
parent 53efb24a8d
commit ed94a2714d
57 changed files with 134 additions and 139 deletions

View File

@ -142,7 +142,7 @@ void Foam::radiation::laserDTRM::initialiseReflection()
key,
reflectionModel::New
(
iter.object(),
iter.val(),
mesh_
)
);

View File

@ -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
)
);

View File

@ -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())
{

View File

@ -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())
{

View File

@ -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())
{

View File

@ -48,7 +48,7 @@ void Foam::phaseSystem::createSubModels
key,
modelType::New
(
iter.object(),
iter.val(),
phasePairs_[key]()
)
);

View File

@ -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)
{

View File

@ -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;
}

View File

@ -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)
{

View File

@ -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();

View File

@ -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;

View File

@ -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)
)
{

View File

@ -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())
{

View File

@ -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();
}
}

View File

@ -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)))
{

View File

@ -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);
}
}

View File

@ -646,7 +646,7 @@ void Foam::argList::setCasePaths()
if (optIter.found())
{
caseDir = optIter.object();
caseDir = optIter.val();
caseDir.clean();
if (caseDir.empty() || caseDir == ".")

View File

@ -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())
{

View File

@ -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)
{

View File

@ -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());

View File

@ -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);

View File

@ -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());
}

View File

@ -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;

View File

@ -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();
}

View File

@ -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

View File

@ -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
(

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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()];

View File

@ -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()];

View File

@ -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)

View File

@ -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]++;

View File

@ -86,7 +86,7 @@ void Foam::polyTopoChange::renumberKey
if (newKey >= 0)
{
newMap.insert(newKey, iter.object());
newMap.insert(newKey, iter.val());
}
}

View File

@ -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

View File

@ -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();

View File

@ -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()))
{

View File

@ -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)

View File

@ -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)

View File

@ -2696,7 +2696,7 @@ void Foam::meshRefinement::updateMesh
if (newFacei >= 0)
{
newFaceToPatch.insert(newFacei, iter.object());
newFaceToPatch.insert(newFacei, iter.val());
}
}
faceToCoupledPatch_.transfer(newFaceToPatch);

View File

@ -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;

View File

@ -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))
{

View File

@ -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;
}

View File

@ -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())
{

View File

@ -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())
{

View File

@ -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_);

View File

@ -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()];
// }
// }

View File

@ -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;

View File

@ -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];

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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))

View File

@ -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())

View File

@ -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

View File

@ -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);

View File

@ -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);