mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
- provide a lookupOrDefault constructor form, since this is a fairly
commonly used requirement and simplifies the calling sequence.
Before
dimensionedScalar rhoMax
(
dimensionedScalar::lookupOrDefault
(
"rhoMax",
pimple.dict(),
dimDensity,
GREAT
)
);
After
dimensionedScalar rhoMax("rhoMax", dimDensity, GREAT, pimple.dict());
- read, readIfPresent methods with alternative lookup names.
- Mark the Istream related constructors with compile-time deprecated
warnings.
BUG: read, readIfPresent methods not handling optional dimensions (#1148)
This commit is contained in:
@ -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
|
||||
@ -36,16 +36,7 @@ bool Foam::functionObjects::reference::calcType()
|
||||
{
|
||||
const VolFieldType& vf = *vfPtr;
|
||||
|
||||
dimensioned<Type> offset
|
||||
(
|
||||
dimensioned<Type>::lookupOrDefault
|
||||
(
|
||||
"offset",
|
||||
localDict_,
|
||||
vf.dimensions(),
|
||||
Zero
|
||||
)
|
||||
);
|
||||
dimensioned<Type> offset("offset", vf.dimensions(), Zero, localDict_);
|
||||
|
||||
dimensioned<Type> cellValue("value", vf.dimensions(), Zero);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user