Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
b0d32ce1
Commit
b0d32ce1
authored
Jul 30, 2019
by
Mark OLESEN
Committed by
Andrew Heather
Jul 30, 2019
Browse files
STYLE: use 'operator>>' instead of readLabel and readScalar
parent
743311df
Changes
15
Hide whitespace changes
Inline
Side-by-side
applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C
View file @
b0d32ce1
...
...
@@ -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
)
{
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C
View file @
b0d32ce1
...
...
@@ -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
()
+
')'
);
...
...
src/finiteVolume/fvMatrices/solvers/MULES/CMULESTemplates.C
View file @
b0d32ce1
...
...
@@ -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
...
...
src/functionObjects/field/nearWallFields/findCellParticle.C
View file @
b0d32ce1
...
...
@@ -77,8 +77,7 @@ Foam::findCellParticle::findCellParticle
{
if
(
is
.
format
()
==
IOstream
::
ASCII
)
{
is
>>
start_
>>
end_
;
data_
=
readLabel
(
is
);
is
>>
start_
>>
end_
>>
data_
;
}
else
{
...
...
src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcelIO.C
View file @
b0d32ce1
...
...
@@ -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
{
...
...
src/lagrangian/basic/injectedParticle/injectedParticleIO.C
View file @
b0d32ce1
...
...
@@ -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
{
...
...
src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C
View file @
b0d32ce1
...
...
@@ -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
{
...
...
src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelIO.C
View file @
b0d32ce1
...
...
@@ -62,8 +62,7 @@ Foam::ThermoParcel<ParcelType>::ThermoParcel
{
if
(
is
.
format
()
==
IOstream
::
ASCII
)
{
T_
=
readScalar
(
is
);
Cp_
=
readScalar
(
is
);
is
>>
T_
>>
Cp_
;
}
else
{
...
...
src/lagrangian/molecularDynamics/molecule/molecule/moleculeIO.C
View file @
b0d32ce1
...
...
@@ -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
{
...
...
src/lagrangian/solidParticle/solidParticleIO.C
View file @
b0d32ce1
...
...
@@ -52,8 +52,7 @@ Foam::solidParticle::solidParticle
{
if
(
is
.
format
()
==
IOstream
::
ASCII
)
{
d_
=
readScalar
(
is
);
is
>>
U_
;
is
>>
d_
>>
U_
;
}
else
{
...
...
src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcelIO.C
View file @
b0d32ce1
...
...
@@ -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
{
...
...
src/mesh/snappyHexMesh/trackedParticle/trackedParticle.C
View file @
b0d32ce1
...
...
@@ -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
{
...
...
src/phaseSystemModels/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C
View file @
b0d32ce1
...
...
@@ -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_
);
...
...
src/phaseSystemModels/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C
View file @
b0d32ce1
...
...
@@ -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_
);
...
...
src/surfMesh/triSurface/patches/surfacePatch.C
View file @
b0d32ce1
...
...
@@ -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_
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment