Commit 4860d31c authored by Mark Olesen's avatar Mark Olesen

STYLE: use updated HashTable iterator names

parent ceb54d68
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd. \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -67,7 +67,7 @@ void Foam::catalyst::faMeshInput::update() ...@@ -67,7 +67,7 @@ void Foam::catalyst::faMeshInput::update()
if (!backends_.found(areaName)) if (!backends_.found(areaName))
{ {
auto backend = auto backend =
autoPtr<Foam::vtk::faMeshAdaptor>::New(*(iter.object())); autoPtr<Foam::vtk::faMeshAdaptor>::New(*(iter.val()));
// Apply any configuration options // Apply any configuration options
// ... // ...
...@@ -187,7 +187,7 @@ Foam::label Foam::catalyst::faMeshInput::addChannels(dataQuery& dataq) ...@@ -187,7 +187,7 @@ Foam::label Foam::catalyst::faMeshInput::addChannels(dataQuery& dataq)
wordHashSet allFields; wordHashSet allFields;
forAllConstIters(backends_, iter) forAllConstIters(backends_, iter)
{ {
allFields += iter.object()->knownFields(selectFields_); allFields += iter.val()->knownFields(selectFields_);
} }
dataq.set(name(), allFields); dataq.set(name(), allFields);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd. \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -75,8 +75,8 @@ void Foam::vtk::faMeshAdaptor::updateContent(const wordRes& selectFields) ...@@ -75,8 +75,8 @@ void Foam::vtk::faMeshAdaptor::updateContent(const wordRes& selectFields)
// Eliminate cached values that would be unreliable // Eliminate cached values that would be unreliable
forAllIters(cachedVtp_, iter) forAllIters(cachedVtp_, iter)
{ {
iter.object().clearGeom(); iter.val().clearGeom();
iter.object().clear(); iter.val().clear();
} }
} }
...@@ -111,9 +111,9 @@ Foam::vtk::faMeshAdaptor::output(const wordRes& select) ...@@ -111,9 +111,9 @@ Foam::vtk::faMeshAdaptor::output(const wordRes& select)
{ {
const auto& longName = internalName; const auto& longName = internalName;
auto iter = cachedVtp_.find(longName); auto iter = cachedVtp_.find(longName);
if (iter.found() && iter.object().dataset) if (iter.found() && iter.val().dataset)
{ {
vtkmesh = iter.object().dataset; vtkmesh = iter.val().dataset;
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd. \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -66,12 +66,12 @@ void Foam::vtk::faMeshAdaptor::convertAreaField ...@@ -66,12 +66,12 @@ void Foam::vtk::faMeshAdaptor::convertAreaField
const auto& longName = internalName; const auto& longName = internalName;
auto iter = cachedVtp_.find(longName); auto iter = cachedVtp_.find(longName);
if (!iter.found() || !iter.object().dataset) if (!iter.found() || !iter.val().dataset)
{ {
// Should not happen, but for safety require a vtk geometry // Should not happen, but for safety require a vtk geometry
return; return;
} }
foamVtpData& vtpData = iter.object(); foamVtpData& vtpData = iter.val();
auto dataset = vtpData.dataset; auto dataset = vtpData.dataset;
vtkSmartPointer<vtkFloatArray> cdata = convertAreaFieldToVTK vtkSmartPointer<vtkFloatArray> cdata = convertAreaFieldToVTK
......
...@@ -53,7 +53,7 @@ Foam::wordHashSet Foam::vtk::faMeshAdaptor::knownFields ...@@ -53,7 +53,7 @@ Foam::wordHashSet Foam::vtk::faMeshAdaptor::knownFields
if (fieldTypes::area.found(clsName)) if (fieldTypes::area.found(clsName))
{ {
allFields += iter.object(); allFields += iter.val();
} }
} }
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd. \\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2018 CINECA \\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2018 CINECA
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd. \\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2018 CINECA \\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2018 CINECA
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd. \\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2018 CINECA \\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2018 CINECA
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
......
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd. \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2018 CINECA \\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2018 CINECA
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -67,7 +69,7 @@ void Foam::catalyst::fvMeshInput::update() ...@@ -67,7 +69,7 @@ void Foam::catalyst::fvMeshInput::update()
auto backend = auto backend =
autoPtr<Foam::vtk::fvMeshAdaptor>::New autoPtr<Foam::vtk::fvMeshAdaptor>::New
( (
*(iter.object()), *(iter.val()),
channelOpt_, channelOpt_,
selectPatches_ selectPatches_
); );
...@@ -203,7 +205,7 @@ Foam::label Foam::catalyst::fvMeshInput::addChannels(dataQuery& dataq) ...@@ -203,7 +205,7 @@ Foam::label Foam::catalyst::fvMeshInput::addChannels(dataQuery& dataq)
wordHashSet allFields; wordHashSet allFields;
forAllConstIters(backends_, iter) forAllConstIters(backends_, iter)
{ {
allFields += iter.object()->knownFields(selectFields_); allFields += iter.val()->knownFields(selectFields_);
} }
dataq.set(name(), allFields); dataq.set(name(), allFields);
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd. \\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2018 CINECA \\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2018 CINECA
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd. \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -251,13 +251,13 @@ void Foam::vtk::fvMeshAdaptor::updateContent(const wordRes& selectFields) ...@@ -251,13 +251,13 @@ void Foam::vtk::fvMeshAdaptor::updateContent(const wordRes& selectFields)
// Eliminate cached values that would be unreliable // Eliminate cached values that would be unreliable
forAllIters(cachedVtp_, iter) forAllIters(cachedVtp_, iter)
{ {
iter.object().clearGeom(); iter.val().clearGeom();
iter.object().clear(); iter.val().clear();
} }
forAllIters(cachedVtu_, iter) forAllIters(cachedVtu_, iter)
{ {
iter.object().clearGeom(); iter.val().clearGeom();
iter.object().clear(); iter.val().clear();
} }
definePatchIds(); definePatchIds();
...@@ -267,8 +267,8 @@ void Foam::vtk::fvMeshAdaptor::updateContent(const wordRes& selectFields) ...@@ -267,8 +267,8 @@ void Foam::vtk::fvMeshAdaptor::updateContent(const wordRes& selectFields)
// poly-decompose changed - dispose of cached values // poly-decompose changed - dispose of cached values
forAllIters(cachedVtu_, iter) forAllIters(cachedVtu_, iter)
{ {
iter.object().clearGeom(); iter.val().clearGeom();
iter.object().clear(); iter.val().clear();
} }
} }
...@@ -310,13 +310,13 @@ Foam::vtk::fvMeshAdaptor::output(const wordRes& select) ...@@ -310,13 +310,13 @@ Foam::vtk::fvMeshAdaptor::output(const wordRes& select)
{ {
const auto& longName = internalName(); const auto& longName = internalName();
auto iter = cachedVtu_.find(longName); auto iter = cachedVtu_.find(longName);
if (!iter.found() || !iter.object().dataset) if (!iter.found() || !iter.val().dataset)
{ {
Pout<<"Cache miss for VTU " << longName << endl; Pout<<"Cache miss for VTU " << longName << endl;
break; // Should never happen break; // Should never happen
} }
foamVtuData& vtuData = iter.object(); foamVtuData& vtuData = iter.val();
auto pieces = vtkSmartPointer<vtkMultiPieceDataSet>::New(); auto pieces = vtkSmartPointer<vtkMultiPieceDataSet>::New();
...@@ -350,13 +350,13 @@ Foam::vtk::fvMeshAdaptor::output(const wordRes& select) ...@@ -350,13 +350,13 @@ Foam::vtk::fvMeshAdaptor::output(const wordRes& select)
const word& longName = pp.name(); const word& longName = pp.name();
auto iter = cachedVtp_.find(longName); auto iter = cachedVtp_.find(longName);
if (!iter.found() || !iter.object().dataset) if (!iter.found() || !iter.val().dataset)
{ {
Pout<<"Cache miss for VTP patch " << longName << endl; Pout<<"Cache miss for VTP patch " << longName << endl;
break; // Should never happen break; // Should never happen
} }
foamVtpData& vtpData = iter.object(); foamVtpData& vtpData = iter.val();
auto pieces = vtkSmartPointer<vtkMultiPieceDataSet>::New(); auto pieces = vtkSmartPointer<vtkMultiPieceDataSet>::New();
......
...@@ -75,14 +75,14 @@ void Foam::vtk::fvMeshAdaptor::convertVolField ...@@ -75,14 +75,14 @@ void Foam::vtk::fvMeshAdaptor::convertVolField
const word& longName = pp.name(); const word& longName = pp.name();
auto iter = cachedVtp_.find(longName); auto iter = cachedVtp_.find(longName);
if (!iter.found() || !iter.object().dataset) if (!iter.found() || !iter.val().dataset)
{ {
// Should not happen, but for safety require a vtk geometry // Should not happen, but for safety require a vtk geometry
Pout<<"Cache miss for VTP patch " << longName << endl; Pout<<"Cache miss for VTP patch " << longName << endl;
continue; continue;
} }
foamVtpData& vtpData = iter.object(); foamVtpData& vtpData = iter.val();
auto dataset = vtpData.dataset; auto dataset = vtpData.dataset;
// This is slightly roundabout, but we deal with groups and with // This is slightly roundabout, but we deal with groups and with
...@@ -207,13 +207,13 @@ void Foam::vtk::fvMeshAdaptor::convertVolFieldInternal ...@@ -207,13 +207,13 @@ void Foam::vtk::fvMeshAdaptor::convertVolFieldInternal
const auto& longName = internalName(); const auto& longName = internalName();
auto iter = cachedVtu_.find(longName); auto iter = cachedVtu_.find(longName);
if (!iter.found() || !iter.object().dataset) if (!iter.found() || !iter.val().dataset)
{ {
// Should not happen, but for safety require a vtk geometry // Should not happen, but for safety require a vtk geometry
Pout<<"Cache miss for VTU " << longName << endl; Pout<<"Cache miss for VTU " << longName << endl;
return; return;
} }
foamVtuData& vtuData = iter.object(); foamVtuData& vtuData = iter.val();
auto dataset = vtuData.dataset; auto dataset = vtuData.dataset;
dataset->GetCellData()->AddArray dataset->GetCellData()->AddArray
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd. \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -56,7 +56,7 @@ Foam::wordHashSet Foam::vtk::fvMeshAdaptor::knownFields ...@@ -56,7 +56,7 @@ Foam::wordHashSet Foam::vtk::fvMeshAdaptor::knownFields
// || fieldTypes::internal.found(clsName) // || fieldTypes::internal.found(clsName)
) )
{ {
allFields += iter.object(); allFields += iter.val();
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd. \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -155,13 +155,13 @@ void Foam::vtk::fvMeshAdaptor::applyGhostingInternal(const labelUList& types) ...@@ -155,13 +155,13 @@ void Foam::vtk::fvMeshAdaptor::applyGhostingInternal(const labelUList& types)
const auto& longName = internalName(); const auto& longName = internalName();
auto iter = cachedVtu_.find(longName); auto iter = cachedVtu_.find(longName);
if (!iter.found() || !iter.object().dataset) if (!iter.found() || !iter.val().dataset)
{ {
// Should not happen, but for safety require a vtk geometry // Should not happen, but for safety require a vtk geometry
Pout<<"Cache miss for VTU " << longName << endl; Pout<<"Cache miss for VTU " << longName << endl;
return; return;
} }
foamVtuData& vtuData = iter.object(); foamVtuData& vtuData = iter.val();
auto dataset = vtuData.dataset; auto dataset = vtuData.dataset;
const labelUList& cellMap = vtuData.cellMap(); const labelUList& cellMap = vtuData.cellMap();
...@@ -231,14 +231,14 @@ void Foam::vtk::fvMeshAdaptor::applyGhostingBoundary(const labelUList& types) ...@@ -231,14 +231,14 @@ void Foam::vtk::fvMeshAdaptor::applyGhostingBoundary(const labelUList& types)
const word& longName = pp.name(); const word& longName = pp.name();
auto iter = cachedVtp_.find(longName); auto iter = cachedVtp_.find(longName);
if (!iter.found() || !iter.object().dataset) if (!iter.found() || !iter.val().dataset)
{ {
// Should not happen, but for safety require a vtk geometry // Should not happen, but for safety require a vtk geometry
Pout<<"Cache miss for VTP patch " << longName << endl; Pout<<"Cache miss for VTP patch " << longName << endl;
continue; continue;
} }
foamVtpData& vtpData = iter.object(); foamVtpData& vtpData = iter.val();
auto dataset = vtpData.dataset; auto dataset = vtpData.dataset;
auto vtkgcell = dataset->GetCellGhostArray(); auto vtkgcell = dataset->GetCellGhostArray();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment