ENH: for-range, forAllIters() ... in applications/

- reduced clutter when iterating over containers
This commit is contained in:
Mark Olesen
2019-01-07 09:20:51 +01:00
committed by Andrew Heather
parent 20da89f8f6
commit 170041aaf5
6 changed files with 14 additions and 14 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd |
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2015-2016 OpenFOAM Foundation
@ -206,7 +206,7 @@ Foam::HeatAndMassTransferPhaseSystem<BasePhaseSystem>::dmdt
const phaseModel* phase1 = &pair.phase1();
const phaseModel* phase2 = &pair.phase2();
forAllConstIter(phasePair, pair, iter)
forAllConstIters(pair, iter)
{
if (phase1 == &phase)
{
@ -303,7 +303,7 @@ Foam::HeatAndMassTransferPhaseSystem<BasePhaseSystem>::heatTransfer() const
const volScalarField* K = &K1;
const volScalarField* otherK = &K2;
forAllConstIter(phasePair, pair, iter)
forAllConstIters(pair, iter)
{
const volScalarField& he(phase->thermo().he());
volScalarField Cpv(phase->thermo().Cpv());

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd |
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2015-2016 OpenFOAM Foundation
@ -131,7 +131,7 @@ Foam::HeatTransferPhaseSystem<BasePhaseSystem>::heatTransfer() const
const phaseModel* phase = &pair.phase1();
const phaseModel* otherPhase = &pair.phase2();
forAllConstIter(phasePair, pair, iter)
forAllConstIters(pair, iter)
{
const volScalarField& he(phase->thermo().he());
volScalarField Cpv(phase->thermo().Cpv());

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd |
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2015-2016 OpenFOAM Foundation
@ -181,7 +181,7 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Kd
const phaseModel* phase1 = &pair.phase1();
const phaseModel* phase2 = &pair.phase2();
forAllConstIter(phasePair, pair, iter)
forAllConstIters(pair, iter)
{
if (phase1 == &phase)
{
@ -403,7 +403,7 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::momentumTransfer() const
const phaseModel* phase = &pair.phase1();
const phaseModel* otherPhase = &pair.phase2();
forAllConstIter(phasePair, pair, iter)
forAllConstIters(pair, iter)
{
const volVectorField& U = phase->U();
@ -429,7 +429,7 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::momentumTransfer() const
const phaseModel* phase = &pair.phase1();
const phaseModel* otherPhase = &pair.phase2();
forAllConstIter(phasePair, pair, iter)
forAllConstIters(pair, iter)
{
const volVectorField& U = phase->U();
const surfaceScalarField& phi = phase->phi();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd |
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2015-2017 OpenFOAM Foundation
@ -282,7 +282,7 @@ Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::iDmdt
const phaseModel* phase1 = &pair.phase1();
const phaseModel* phase2 = &pair.phase2();
forAllConstIter(phasePair, pair, iter)
forAllConstIters(pair, iter)
{
if (phase1 == &phase)
{

View File

@ -226,7 +226,7 @@ while (pimple.correct())
const phaseModel* phase1 = &pair.phase1();
const phaseModel* phase2 = &pair.phase2();
forAllConstIter(phasePair, pair, iter)
forAllConstIters(pair, iter)
{
if (phase1 == &phase)
{