Commit b0d32ce1 authored by Mark OLESEN's avatar Mark OLESEN Committed by Andrew Heather
Browse files

STYLE: use 'operator>>' instead of readLabel and readScalar

parent 743311df
......@@ -831,7 +831,7 @@ void Foam::multiphaseSystem::solve()
const Time& runTime = mesh_.time();
const dictionary& alphaControls = mesh_.solverDict("alpha");
label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")));
label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles"));
if (nAlphaSubCycles > 1)
{
......
......@@ -363,8 +363,8 @@ void Foam::twoPhaseSystem::solve()
alpha1.name()
);
label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")));
label nAlphaCorr(readLabel(alphaControls.lookup("nAlphaCorr")));
label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles"));
label nAlphaCorr(alphaControls.get<label>("nAlphaCorr"));
word alphaScheme("div(phi," + alpha1.name() + ')');
word alpharScheme("div(phir," + alpha1.name() + ')');
......
......@@ -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) 2013-2017 OpenFOAM Foundation
......@@ -222,7 +222,7 @@ void Foam::MULES::limiterCorr
const label nLimiterIter
(
readLabel(MULEScontrols.lookup("nLimiterIter"))
MULEScontrols.get<label>("nLimiterIter")
);
const scalar smoothLimiter
......
......@@ -77,8 +77,7 @@ Foam::findCellParticle::findCellParticle
{
if (is.format() == IOstream::ASCII)
{
is >> start_ >> end_;
data_ = readLabel(is);
is >> start_ >> end_ >> data_;
}
else
{
......
......@@ -59,9 +59,7 @@ Foam::DSMCParcel<ParcelType>::DSMCParcel
{
if (is.format() == IOstream::ASCII)
{
is >> U_;
Ei_ = readScalar(is);
typeId_ = readLabel(is);
is >> U_ >> Ei_ >> typeId_;
}
else
{
......
......@@ -67,10 +67,7 @@ Foam::injectedParticle::injectedParticle
if (is.format() == IOstream::ASCII)
{
tag_ = readLabel(is);
soi_ = readScalar(is);
d_ = readScalar(is);
is >> U_;
is >> tag_ >> soi_ >> d_ >> U_;
}
else
{
......
......@@ -72,16 +72,16 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
{
if (is.format() == IOstream::ASCII)
{
active_ = readBool(is);
typeId_ = readLabel(is);
nParticle_ = readScalar(is);
d_ = readScalar(is);
dTarget_ = readScalar(is);
is >> U_;
rho_ = readScalar(is);
age_ = readScalar(is);
tTurb_ = readScalar(is);
is >> UTurb_;
is >> active_
>> typeId_
>> nParticle_
>> d_
>> dTarget_
>> U_
>> rho_
>> age_
>> tTurb_
>> UTurb_;
}
else
{
......
......@@ -62,8 +62,7 @@ Foam::ThermoParcel<ParcelType>::ThermoParcel
{
if (is.format() == IOstream::ASCII)
{
T_ = readScalar(is);
Cp_ = readScalar(is);
is >> T_ >> Cp_;
}
else
{
......
......@@ -65,18 +65,18 @@ Foam::molecule::molecule
{
if (is.format() == IOstream::ASCII)
{
is >> Q_;
is >> v_;
is >> a_;
is >> pi_;
is >> tau_;
is >> specialPosition_;
potentialEnergy_ = readScalar(is);
is >> rf_;
special_ = readLabel(is);
id_ = readLabel(is);
is >> siteForces_;
is >> sitePositions_;
is >> Q_
>> v_
>> a_
>> pi_
>> tau_
>> specialPosition_
>> potentialEnergy_
>> rf_
>> special_
>> id_
>> siteForces_
>> sitePositions_;
}
else
{
......
......@@ -52,8 +52,7 @@ Foam::solidParticle::solidParticle
{
if (is.format() == IOstream::ASCII)
{
d_ = readScalar(is);
is >> U_;
is >> d_ >> U_;
}
else
{
......
......@@ -72,19 +72,19 @@ Foam::SprayParcel<ParcelType>::SprayParcel
{
if (is.format() == IOstream::ASCII)
{
d0_ = readScalar(is);
is >> position0_;
sigma_ = readScalar(is);
mu_ = readScalar(is);
liquidCore_ = readScalar(is);
KHindex_ = readScalar(is);
y_ = readScalar(is);
yDot_ = readScalar(is);
tc_ = readScalar(is);
ms_ = readScalar(is);
injector_ = readScalar(is);
tMom_ = readScalar(is);
user_ = readScalar(is);
is >> d0_
>> position0_
>> sigma_
>> mu_
>> liquidCore_
>> KHindex_
>> y_
>> yDot_
>> tc_
>> ms_
>> injector_
>> tMom_
>> user_;
}
else
{
......
......@@ -98,11 +98,7 @@ Foam::trackedParticle::trackedParticle
{
if (is.format() == IOstream::ASCII)
{
is >> start_ >> end_;
level_ = readLabel(is);
i_ = readLabel(is);
j_ = readLabel(is);
k_ = readLabel(is);
is >> start_ >> end_ >> level_ >> i_ >> j_ >> k_;
}
else
{
......
......@@ -624,7 +624,7 @@ void Foam::multiphaseSystem::solve()
const Time& runTime = mesh_.time();
const dictionary& alphaControls = mesh_.solverDict("alpha");
label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")));
label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles"));
bool LTS = fv::localEulerDdt::enabled(mesh_);
......
......@@ -127,8 +127,8 @@ void Foam::twoPhaseSystem::solve()
const dictionary& alphaControls = mesh_.solverDict(alpha1.name());
label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")));
label nAlphaCorr(readLabel(alphaControls.lookup("nAlphaCorr")));
label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles"));
label nAlphaCorr(alphaControls.get<label>("nAlphaCorr"));
bool LTS = fv::localEulerDdt::enabled(mesh_);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2016 OpenFOAM Foundation
......@@ -76,8 +76,7 @@ Foam::surfacePatch::surfacePatch(Istream& is, const label index)
size_(0),
start_(0)
{
size_ = readLabel(is);
start_ = readLabel(is);
is >> size_ >> start_;
}
......
Supports Markdown
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