STYLE: use writeEntry(), beginBlock(), endBlock() methods

- use dictionary::get<..> instead of lookup in a few more places
This commit is contained in:
Mark Olesen
2020-04-23 16:17:38 +02:00
parent 81bd0aa09f
commit 79048eb68f
106 changed files with 421 additions and 410 deletions

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2015-2019 OpenCFD Ltd.
Copyright (C) 2015-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -149,7 +149,7 @@ SourceFiles
#include "timeFunctionObject.H"
#include "externalFileCoupler.H"
#include "DynamicList.H"
#include "wordReList.H"
#include "wordRes.H"
#include "scalarField.H"
#include "UPtrList.H"

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2018 OpenCFD Ltd.
Copyright (C) 2018-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -135,7 +135,7 @@ bool Foam::functionObjects::fieldExtents::read(const dictionary& dict)
patchIDs_.clear();
const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
wordReList patchNames;
wordRes patchNames;
if (dict.readIfPresent("patches", patchNames))
{
for (const wordRe& name : patchNames)

View File

@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017-2019 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -256,7 +257,7 @@ bool Foam::functionObjects::interfaceHeight::read(const dictionary& dict)
dict.readIfPresent("alpha", alphaName_);
dict.readIfPresent("liquid", liquid_);
dict.lookup("locations") >> locations_;
dict.readEntry("locations", locations_);
dict.readIfPresent("interpolationScheme", interpolationScheme_);
dict.readIfPresent("direction", direction_);

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2015-2019 OpenCFD Ltd.
Copyright (C) 2015-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -27,7 +27,7 @@ License
\*---------------------------------------------------------------------------*/
#include "nearWallFields.H"
#include "wordReList.H"
#include "wordRes.H"
#include "findCellParticle.H"
#include "mappedPatchBase.H"
#include "OBJstream.H"

View File

@ -157,7 +157,7 @@ bool Foam::functionObjects::wallHeatFlux::read(const dictionary& dict)
patchSet_ =
mesh_.boundaryMesh().patchSet
(
wordReList(dict.lookupOrDefault("patches", wordReList()))
dict.getOrDefault<wordRes>("patches", wordRes())
);
dict.readIfPresent("qr", qrName_);

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2013-2016 OpenFOAM Foundation
Copyright (C) 2017-2018 OpenCFD Ltd.
Copyright (C) 2017-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -136,7 +136,7 @@ bool Foam::functionObjects::wallShearStress::read(const dictionary& dict)
patchSet_ =
mesh_.boundaryMesh().patchSet
(
wordReList(dict.lookupOrDefault("patches", wordReList()))
dict.getOrDefault<wordRes>("patches", wordRes())
);
Info<< type() << " " << name() << ":" << nl;