Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Development
openfoam
Commits
c0ba7bf0
Commit
c0ba7bf0
authored
Nov 06, 2017
by
Mark Olesen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
STYLE: use Ostream writeEntry when writing key/value entries
- makes for clearer code ENH: make writeIfDifferent part of Ostream
parent
0ca0a626
Changes
232
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
259 additions
and
391 deletions
+259
-391
applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C
...hoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C
+6
-8
applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C
...ble/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C
+9
-11
applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.C
...sible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.C
+2
-2
applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
...o/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
+1
-2
applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
...m/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
+1
-2
applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
...e/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
+1
-2
applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
...m/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
+1
-2
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C
...lphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C
+3
-3
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C
...hatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C
+4
-4
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C
...unction/alphatWallBoilingWallFunctionFvPatchScalarField.C
+12
-18
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.C
...lds/copiedFixedValue/copiedFixedValueFvPatchScalarField.C
+1
-2
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C
...PhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C
+1
-1
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C
...odels/KocamustafaogullariIshii/KocamustafaogullariIshii.C
+1
-1
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.C
...iameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.C
+3
-3
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C
...terModels/departureDiameterModel/departureDiameterModel.C
+1
-1
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C
...yModels/departureFrequencyModel/departureFrequencyModel.C
+1
-1
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C
...ationSiteModels/nucleationSiteModel/nucleationSiteModel.C
+1
-1
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C
...ilingSubModels/partitioningModels/Lavieville/Lavieville.C
+1
-1
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C
...s/wallBoilingSubModels/partitioningModels/cosine/cosine.C
+2
-4
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.C
...s/wallBoilingSubModels/partitioningModels/linear/linear.C
+2
-4
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C
.../partitioningModels/partitioningModel/partitioningModel.C
+1
-1
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C
...rticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C
+1
-2
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C
...icleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C
+2
-4
applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C
...rticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C
+1
-2
applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C
...icleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C
+2
-4
etc/codeTemplates/BC/BC.C
etc/codeTemplates/BC/BC.C
+3
-3
src/OSspecific/POSIX/cpuInfo/cpuInfo.C
src/OSspecific/POSIX/cpuInfo/cpuInfo.C
+6
-20
src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H
src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H
+21
-1
src/OpenFOAM/fields/Fields/Field/Field.C
src/OpenFOAM/fields/Fields/Field/Field.C
+2
-3
src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C
...fields/UniformDimensionedFields/UniformDimensionedField.C
+2
-4
src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.C
.../derived/codedFixedValue/codedFixedValuePointPatchField.C
+2
-4
src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.C
.../derived/fixedNormalSlip/fixedNormalSlipPointPatchField.C
+1
-2
src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C
...fields/pointPatchFields/pointPatchField/pointPatchField.C
+2
-20
src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H
...fields/pointPatchFields/pointPatchField/pointPatchField.H
+0
-11
src/OpenFOAM/global/profiling/profilingInformation.C
src/OpenFOAM/global/profiling/profilingInformation.C
+2
-8
src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C
...tions/interpolationLookUpTable/interpolationLookUpTable.C
+3
-7
src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C
...ions/interpolationTable/tableReaders/csv/csvTableReader.C
+7
-6
src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C
...erpolations/interpolationTable/tableReaders/tableReader.C
+1
-4
src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.C
...hes/polyMesh/polyPatches/basic/generic/genericPolyPatch.C
+3
-3
src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
.../polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
+4
-8
src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C
...esh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C
+7
-11
src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C
...esh/polyPatches/constraint/processor/processorPolyPatch.C
+2
-4
src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C
...hes/constraint/processorCyclic/processorCyclicPolyPatch.C
+2
-7
src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C
...penFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C
+3
-3
src/OpenFOAM/primitives/functions/Function1/Scale/Scale.C
src/OpenFOAM/primitives/functions/Function1/Scale/Scale.C
+5
-3
src/OpenFOAM/primitives/functions/Function1/Table/TableBase.C
...OpenFOAM/primitives/functions/Function1/Table/TableBase.C
+13
-12
src/OpenFOAM/primitives/functions/Function1/ramp/ramp.C
src/OpenFOAM/primitives/functions/Function1/ramp/ramp.C
+7
-5
src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C
...veHeatTransfer/convectiveHeatTransferFvPatchScalarField.C
+1
-1
src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/lumpedMassWallTemperature/lumpedMassWallTemperatureFvPatchScalarField.C
...Temperature/lumpedMassWallTemperatureFvPatchScalarField.C
+2
-3
src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMappedUniformInletHeatAddition/outletMappedUniformInletHeatAdditionFvPatchField.C
...dition/outletMappedUniformInletHeatAdditionFvPatchField.C
+5
-6
src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C
...ields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C
+2
-3
src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C
...usive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C
+3
-4
src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
...urbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
+1
-2
src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C
...d/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C
+4
-5
src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C
...unction/alphatJayatillekeWallFunctionFvPatchScalarField.C
+4
-4
src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C
...alphatWallFunction/alphatWallFunctionFvPatchScalarField.C
+1
-1
src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C
...unction/alphatJayatillekeWallFunctionFvPatchScalarField.C
+4
-4
src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C
.../derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C
+6
-12
src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
...ulentMixingLengthDissipationRateInletFvPatchScalarField.C
+3
-4
src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C
...t/turbulentMixingLengthFrequencyInletFvPatchScalarField.C
+3
-4
src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C
...lds/fixedShearStress/fixedShearStressFvPatchVectorField.C
+1
-1
src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C
...s/porousBafflePressure/porousBafflePressureFvPatchField.C
+4
-5
src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C
...silonWallFunction/epsilonWallFunctionFvPatchScalarField.C
+3
-3
src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C
...Functions/fWallFunction/fWallFunctionFvPatchScalarField.C
+3
-3
src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C
...kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C
+4
-4
src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C
...ughWallFunction/nutURoughWallFunctionFvPatchScalarField.C
+3
-6
src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C
...allFunction/nutUTabulatedWallFunctionFvPatchScalarField.C
+1
-2
src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C
...tions/nutWallFunction/nutWallFunctionFvPatchScalarField.C
+3
-3
src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C
...s/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C
+5
-5
src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C
...nctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C
+3
-3
src/dynamicMesh/attachDetach/attachDetach.C
src/dynamicMesh/attachDetach/attachDetach.C
+12
-16
src/dynamicMesh/boundaryPatch/boundaryPatch.C
src/dynamicMesh/boundaryPatch/boundaryPatch.C
+2
-2
src/dynamicMesh/motionSolvers/displacement/solidBody/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.C
...cement/solidBodyMotionDisplacementPointPatchVectorField.C
+2
-2
src/dynamicMesh/perfectInterface/perfectInterface.C
src/dynamicMesh/perfectInterface/perfectInterface.C
+9
-27
src/dynamicMesh/setUpdater/setUpdater.C
src/dynamicMesh/setUpdater/setUpdater.C
+6
-21
No files found.
applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C
View file @
c0ba7bf0
...
...
@@ -209,16 +209,14 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const
{
fvPatchScalarField
::
write
(
os
);
writeEntryIfDifferent
<
word
>
(
os
,
"U"
,
"U"
,
UName_
);
writeEntryIfDifferent
<
word
>
(
os
,
"rho"
,
"rho"
,
rhoName_
);
writeEntryIfDifferent
<
word
>
(
os
,
"psi"
,
"thermo:psi"
,
psiName_
);
writeEntryIfDifferent
<
word
>
(
os
,
"mu"
,
"thermo:mu"
,
muName_
);
os
.
writeEntryIfDifferent
<
word
>
(
"U"
,
"U"
,
UName_
);
os
.
writeEntryIfDifferent
<
word
>
(
"rho"
,
"rho"
,
rhoName_
);
os
.
writeEntryIfDifferent
<
word
>
(
"psi"
,
"thermo:psi"
,
psiName_
);
os
.
writeEntryIfDifferent
<
word
>
(
"mu"
,
"thermo:mu"
,
muName_
);
os
.
writeKeyword
(
"accommodationCoeff"
)
<<
accommodationCoeff_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeEntry
(
"accommodationCoeff"
,
accommodationCoeff_
);
Twall_
.
writeEntry
(
"Twall"
,
os
);
os
.
writeKeyword
(
"gamma"
)
<<
gamma_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeEntry
(
"gamma"
,
gamma_
);
writeEntry
(
"value"
,
os
);
}
...
...
applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C
View file @
c0ba7bf0
...
...
@@ -200,18 +200,16 @@ void Foam::maxwellSlipUFvPatchVectorField::updateCoeffs()
void
Foam
::
maxwellSlipUFvPatchVectorField
::
write
(
Ostream
&
os
)
const
{
fvPatchVectorField
::
write
(
os
);
writeEntryIfDifferent
<
word
>
(
os
,
"T"
,
"T"
,
TName_
);
writeEntryIfDifferent
<
word
>
(
os
,
"rho"
,
"rho"
,
rhoName_
);
writeEntryIfDifferent
<
word
>
(
os
,
"psi"
,
"thermo:psi"
,
psiName_
);
writeEntryIfDifferent
<
word
>
(
os
,
"mu"
,
"thermo:mu"
,
muName_
);
writeEntryIfDifferent
<
word
>
(
os
,
"tauMC"
,
"tauMC"
,
tauMCName_
);
os
.
writeKeyword
(
"accommodationCoeff"
)
<<
accommodationCoeff_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeEntryIfDifferent
<
word
>
(
"T"
,
"T"
,
TName_
);
os
.
writeEntryIfDifferent
<
word
>
(
"rho"
,
"rho"
,
rhoName_
);
os
.
writeEntryIfDifferent
<
word
>
(
"psi"
,
"thermo:psi"
,
psiName_
);
os
.
writeEntryIfDifferent
<
word
>
(
"mu"
,
"thermo:mu"
,
muName_
);
os
.
writeEntryIfDifferent
<
word
>
(
"tauMC"
,
"tauMC"
,
tauMCName_
);
os
.
writeEntry
(
"accommodationCoeff"
,
accommodationCoeff_
);
Uwall_
.
writeEntry
(
"Uwall"
,
os
);
os
.
writeKeyword
(
"thermalCreep"
)
<<
thermalCreep_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeKeyword
(
"curvature"
)
<<
curvature_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeEntry
(
"thermalCreep"
,
thermalCreep_
);
os
.
writeEntry
(
"curvature"
,
curvature_
);
refValue
().
writeEntry
(
"refValue"
,
os
);
valueFraction
().
writeEntry
(
"valueFraction"
,
os
);
...
...
applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.C
View file @
c0ba7bf0
...
...
@@ -117,8 +117,8 @@ void Foam::fixedRhoFvPatchScalarField::write(Ostream& os) const
{
fvPatchScalarField
::
write
(
os
);
writeEntryIfDifferent
<
word
>
(
os
,
"p"
,
"p"
,
this
->
pName_
);
writeEntryIfDifferent
<
word
>
(
os
,
"psi"
,
"thermo:psi"
,
psiName_
);
os
.
writeEntryIfDifferent
<
word
>
(
"p"
,
"p"
,
pName_
);
os
.
writeEntryIfDifferent
<
word
>
(
"psi"
,
"thermo:psi"
,
psiName_
);
writeEntry
(
"value"
,
os
);
}
...
...
applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
View file @
c0ba7bf0
...
...
@@ -125,8 +125,7 @@ alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
void
alphaContactAngleFvPatchScalarField
::
write
(
Ostream
&
os
)
const
{
fvPatchScalarField
::
write
(
os
);
os
.
writeKeyword
(
"thetaProperties"
)
<<
thetaProps_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeEntry
(
"thetaProperties"
,
thetaProps_
);
writeEntry
(
"value"
,
os
);
}
...
...
applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
View file @
c0ba7bf0
...
...
@@ -125,8 +125,7 @@ alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
void
alphaContactAngleFvPatchScalarField
::
write
(
Ostream
&
os
)
const
{
fvPatchScalarField
::
write
(
os
);
os
.
writeKeyword
(
"thetaProperties"
)
<<
thetaProps_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeEntry
(
"thetaProperties"
,
thetaProps_
);
writeEntry
(
"value"
,
os
);
}
...
...
applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
View file @
c0ba7bf0
...
...
@@ -125,8 +125,7 @@ alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
void
alphaContactAngleFvPatchScalarField
::
write
(
Ostream
&
os
)
const
{
fvPatchScalarField
::
write
(
os
);
os
.
writeKeyword
(
"thetaProperties"
)
<<
thetaProps_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeEntry
(
"thetaProperties"
,
thetaProps_
);
writeEntry
(
"value"
,
os
);
}
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
View file @
c0ba7bf0
...
...
@@ -125,8 +125,7 @@ alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
void
alphaContactAngleFvPatchScalarField
::
write
(
Ostream
&
os
)
const
{
fvPatchScalarField
::
write
(
os
);
os
.
writeKeyword
(
"thetaProperties"
)
<<
thetaProps_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeEntry
(
"thetaProperties"
,
thetaProps_
);
writeEntry
(
"value"
,
os
);
}
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C
View file @
c0ba7bf0
...
...
@@ -138,9 +138,9 @@ void alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::write
)
const
{
fvPatchField
<
scalar
>::
write
(
os
);
os
.
write
Keyword
(
"relax"
)
<<
relax_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Keyword
(
"fixedDmdt"
)
<<
fixedDmdt_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Keyword
(
"L"
)
<<
L_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Entry
(
"relax"
,
relax_
)
;
os
.
write
Entry
(
"fixedDmdt"
,
fixedDmdt_
)
;
os
.
write
Entry
(
"L"
,
L_
)
;
dmdt_
.
writeEntry
(
"dmdt"
,
os
);
writeEntry
(
"value"
,
os
);
}
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C
View file @
c0ba7bf0
...
...
@@ -334,10 +334,10 @@ void alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::write
)
const
{
fvPatchField
<
scalar
>::
write
(
os
);
os
.
write
Keyword
(
"Prt"
)
<<
Prt_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Keyword
(
"Cmu"
)
<<
Cmu_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Keyword
(
"kappa"
)
<<
kappa_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Keyword
(
"E"
)
<<
E_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Entry
(
"Prt"
,
Prt_
)
;
os
.
write
Entry
(
"Cmu"
,
Cmu_
)
;
os
.
write
Entry
(
"kappa"
,
kappa_
)
;
os
.
write
Entry
(
"E"
,
E_
)
;
dmdt_
.
writeEntry
(
"dmdt"
,
os
);
writeEntry
(
"value"
,
os
);
}
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C
View file @
c0ba7bf0
...
...
@@ -596,42 +596,36 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::write(Ostream& os) const
{
fvPatchField
<
scalar
>::
write
(
os
);
os
.
writeKeyword
(
"phaseType"
)
<<
phaseTypeNames_
[
phaseType_
]
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeEntry
(
"phaseType"
,
phaseTypeNames_
[
phaseType_
]);
os
.
write
Keyword
(
"relax"
)
<<
relax_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Entry
(
"relax"
,
relax_
)
;
switch
(
phaseType_
)
{
case
vaporPhase
:
{
os
.
writeKeyword
(
"partitioningModel"
)
<<
nl
;
os
<<
indent
<<
token
::
BEGIN_BLOCK
<<
incrIndent
<<
nl
;
os
.
beginBlock
(
"partitioningModel"
);
partitioningModel_
->
write
(
os
);
os
<<
decrIndent
<<
indent
<<
token
::
END_BLOCK
<<
nl
;
os
.
endBlock
()
;
break
;
}
case
liquidPhase
:
{
os
.
writeKeyword
(
"partitioningModel"
)
<<
nl
;
os
<<
indent
<<
token
::
BEGIN_BLOCK
<<
incrIndent
<<
nl
;
os
.
beginBlock
(
"partitioningModel"
);
partitioningModel_
->
write
(
os
);
os
<<
decrIndent
<<
indent
<<
token
::
END_BLOCK
<<
nl
;
os
.
endBlock
()
;
os
.
writeKeyword
(
"nucleationSiteModel"
)
<<
nl
;
os
<<
indent
<<
token
::
BEGIN_BLOCK
<<
incrIndent
<<
nl
;
os
.
beginBlock
(
"nucleationSiteModel"
);
nucleationSiteModel_
->
write
(
os
);
os
<<
decrIndent
<<
indent
<<
token
::
END_BLOCK
<<
nl
;
os
.
endBlock
()
;
os
.
writeKeyword
(
"departureDiamModel"
)
<<
nl
;
os
<<
indent
<<
token
::
BEGIN_BLOCK
<<
incrIndent
<<
nl
;
os
.
beginBlock
(
"departureDiamModel"
);
departureDiamModel_
->
write
(
os
);
os
<<
decrIndent
<<
indent
<<
token
::
END_BLOCK
<<
nl
;
os
.
endBlock
()
;
os
.
writeKeyword
(
"departureFreqModel"
)
<<
nl
;
os
<<
indent
<<
token
::
BEGIN_BLOCK
<<
incrIndent
<<
nl
;
os
.
beginBlock
(
"departureFreqModel"
);
departureFreqModel_
->
write
(
os
);
os
<<
decrIndent
<<
indent
<<
token
::
END_BLOCK
<<
nl
;
os
.
endBlock
()
;
break
;
}
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.C
View file @
c0ba7bf0
...
...
@@ -109,8 +109,7 @@ void Foam::copiedFixedValueFvPatchScalarField::updateCoeffs()
void
Foam
::
copiedFixedValueFvPatchScalarField
::
write
(
Ostream
&
os
)
const
{
fvPatchField
<
scalar
>::
write
(
os
);
os
.
writeKeyword
(
"sourceField"
)
<<
sourceFieldName_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeEntry
(
"sourceField"
,
sourceFieldName_
);
writeEntry
(
"value"
,
os
);
}
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C
View file @
c0ba7bf0
...
...
@@ -183,7 +183,7 @@ void Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::updateCoeffs()
void
Foam
::
fixedMultiPhaseHeatFluxFvPatchScalarField
::
write
(
Ostream
&
os
)
const
{
fvPatchField
<
scalar
>::
write
(
os
);
os
.
write
Keyword
(
"relax"
)
<<
relax_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Entry
(
"relax"
,
relax_
)
;
q_
.
writeEntry
(
"q"
,
os
);
writeEntry
(
"value"
,
os
);
}
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C
View file @
c0ba7bf0
...
...
@@ -114,7 +114,7 @@ void Foam::wallBoilingModels::departureDiameterModels::
KocamustafaogullariIshii
::
write
(
Ostream
&
os
)
const
{
departureDiameterModel
::
write
(
os
);
os
.
write
Keyword
(
"phi"
)
<<
phi_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Entry
(
"phi"
,
phi_
)
;
}
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.C
View file @
c0ba7bf0
...
...
@@ -90,9 +90,9 @@ void Foam::wallBoilingModels::departureDiameterModels::
TolubinskiKostanchuk
::
write
(
Ostream
&
os
)
const
{
departureDiameterModel
::
write
(
os
);
os
.
write
Keyword
(
"dRef"
)
<<
dRef_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Keyword
(
"dMax"
)
<<
dMax_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Keyword
(
"dMin"
)
<<
dMin_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Entry
(
"dRef"
,
dRef_
)
;
os
.
write
Entry
(
"dMax"
,
dMax_
)
;
os
.
write
Entry
(
"dMin"
,
dMin_
)
;
}
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C
View file @
c0ba7bf0
...
...
@@ -53,7 +53,7 @@ Foam::wallBoilingModels::departureDiameterModel::~departureDiameterModel()
void
Foam
::
wallBoilingModels
::
departureDiameterModel
::
write
(
Ostream
&
os
)
const
{
os
.
write
Keyword
(
"type"
)
<<
this
->
type
()
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Entry
(
"type"
,
this
->
type
()
)
;
}
// ************************************************************************* //
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C
View file @
c0ba7bf0
...
...
@@ -53,7 +53,7 @@ Foam::wallBoilingModels::departureFrequencyModel::~departureFrequencyModel()
void
Foam
::
wallBoilingModels
::
departureFrequencyModel
::
write
(
Ostream
&
os
)
const
{
os
.
write
Keyword
(
"type"
)
<<
this
->
type
()
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Entry
(
"type"
,
this
->
type
()
)
;
}
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C
View file @
c0ba7bf0
...
...
@@ -53,7 +53,7 @@ Foam::wallBoilingModels::nucleationSiteModel::~nucleationSiteModel()
void
Foam
::
wallBoilingModels
::
nucleationSiteModel
::
write
(
Ostream
&
os
)
const
{
os
.
write
Keyword
(
"type"
)
<<
this
->
type
()
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Entry
(
"type"
,
this
->
type
()
)
;
}
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C
View file @
c0ba7bf0
...
...
@@ -88,7 +88,7 @@ void Foam::wallBoilingModels::partitioningModels::
Lavieville
::
write
(
Ostream
&
os
)
const
{
partitioningModel
::
write
(
os
);
os
.
write
Keyword
(
"alphaCrit"
)
<<
alphaCrit_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Entry
(
"alphaCrit"
,
alphaCrit_
)
;
}
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C
View file @
c0ba7bf0
...
...
@@ -97,10 +97,8 @@ void Foam::wallBoilingModels::partitioningModels::
cosine
::
write
(
Ostream
&
os
)
const
{
partitioningModel
::
write
(
os
);
os
.
writeKeyword
(
"alphaLiquid1"
)
<<
alphaLiquid1_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeKeyword
(
"alphaLiquid0"
)
<<
alphaLiquid0_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeEntry
(
"alphaLiquid1"
,
alphaLiquid1_
);
os
.
writeEntry
(
"alphaLiquid0"
,
alphaLiquid0_
);
}
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.C
View file @
c0ba7bf0
...
...
@@ -90,10 +90,8 @@ void Foam::wallBoilingModels::partitioningModels::
linear
::
write
(
Ostream
&
os
)
const
{
partitioningModel
::
write
(
os
);
os
.
writeKeyword
(
"alphaLiquid1"
)
<<
alphaLiquid1_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeKeyword
(
"alphaLiquid0"
)
<<
alphaLiquid0_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeEntry
(
"alphaLiquid1"
,
alphaLiquid1_
);
os
.
writeEntry
(
"alphaLiquid0"
,
alphaLiquid0_
);
}
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C
View file @
c0ba7bf0
...
...
@@ -53,7 +53,7 @@ Foam::wallBoilingModels::partitioningModel::~partitioningModel()
void
Foam
::
wallBoilingModels
::
partitioningModel
::
write
(
Ostream
&
os
)
const
{
os
.
write
Keyword
(
"type"
)
<<
this
->
type
()
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Entry
(
"type"
,
this
->
type
()
)
;
}
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C
View file @
c0ba7bf0
...
...
@@ -245,8 +245,7 @@ void Foam::JohnsonJacksonParticleSlipFvPatchVectorField::write
)
const
{
fvPatchVectorField
::
write
(
os
);
os
.
writeKeyword
(
"specularityCoefficient"
)
<<
specularityCoefficient_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeEntry
(
"specularityCoefficient"
,
specularityCoefficient_
);
writeEntry
(
"value"
,
os
);
}
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C
View file @
c0ba7bf0
...
...
@@ -289,10 +289,8 @@ void Foam::JohnsonJacksonParticleThetaFvPatchScalarField::write
)
const
{
fvPatchScalarField
::
write
(
os
);
os
.
writeKeyword
(
"restitutionCoefficient"
)
<<
restitutionCoefficient_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeKeyword
(
"specularityCoefficient"
)
<<
specularityCoefficient_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeEntry
(
"restitutionCoefficient"
,
restitutionCoefficient_
);
os
.
writeEntry
(
"specularityCoefficient"
,
specularityCoefficient_
);
writeEntry
(
"value"
,
os
);
}
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C
View file @
c0ba7bf0
...
...
@@ -245,8 +245,7 @@ void Foam::JohnsonJacksonParticleSlipFvPatchVectorField::write
)
const
{
fvPatchVectorField
::
write
(
os
);
os
.
writeKeyword
(
"specularityCoefficient"
)
<<
specularityCoefficient_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeEntry
(
"specularityCoefficient"
,
specularityCoefficient_
);
writeEntry
(
"value"
,
os
);
}
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C
View file @
c0ba7bf0
...
...
@@ -289,10 +289,8 @@ void Foam::JohnsonJacksonParticleThetaFvPatchScalarField::write
)
const
{
fvPatchScalarField
::
write
(
os
);
os
.
writeKeyword
(
"restitutionCoefficient"
)
<<
restitutionCoefficient_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeKeyword
(
"specularityCoefficient"
)
<<
specularityCoefficient_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeEntry
(
"restitutionCoefficient"
,
restitutionCoefficient_
);
os
.
writeEntry
(
"specularityCoefficient"
,
specularityCoefficient_
);
writeEntry
(
"value"
,
os
);
}
...
...
etc/codeTemplates/BC/BC.C
View file @
c0ba7bf0
...
...
@@ -220,11 +220,11 @@ void Foam::CLASS::write
)
const
{
FVPATCHF
::
write
(
os
);
os
.
write
Keyword
(
"scalarData"
)
<<
scalarData_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Keyword
(
"data"
)
<<
data_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Entry
(
"scalarData"
,
scalarData_
)
;
os
.
write
Entry
(
"data"
,
data_
)
;
fieldData_
.
writeEntry
(
"fieldData"
,
os
);
timeVsData_
->
writeData
(
os
);
os
.
write
Keyword
(
"wordData"
)
<<
wordData_
<<
token
::
END_STATEMENT
<<
nl
;
os
.
write
Entry
(
"wordData"
,
wordData_
)
;
this
->
writeEntry
(
"value"
,
os
);
}
...
...
src/OSspecific/POSIX/cpuInfo/cpuInfo.C
View file @
c0ba7bf0
...
...
@@ -174,26 +174,12 @@ void Foam::cpuInfo::write(Ostream& os) const
{
os
.
writeEntry
(
"model_name"
,
model_name
);
}
if
(
cpu_family
!=
-
1
)
{
os
.
writeEntry
(
"cpu_family"
,
cpu_family
);
}
if
(
model
!=
-
1
)
{
os
.
writeEntry
(
"model"
,
model
);
}
if
(
cpu_MHz
>
0
)
{
os
.
writeEntry
(
"cpu_MHz"
,
cpu_MHz
);
}
if
(
cpu_cores
>
0
)
{
os
.
writeEntry
(
"cpu_cores"
,
cpu_cores
);
}
if
(
siblings
>
0
)
{
os
.
writeEntry
(
"siblings"
,
siblings
);
}
os
.
writeEntryIfDifferent
<
int
>
(
"cpu_family"
,
-
1
,
cpu_family
);
os
.
writeEntryIfDifferent
<
int
>
(
"model"
,
-
1
,
model
);
os
.
writeEntryIfDifferent
<
float
>
(
"cpu_MHz"
,
0
,
cpu_MHz
);
os
.
writeEntryIfDifferent
<
int
>
(
"cpu_cores"
,
0
,
cpu_cores
);
os
.
writeEntryIfDifferent
<
int
>
(
"siblings"
,
0
,
siblings
);
}
...
...
src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H
View file @
c0ba7bf0
...
...
@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2016
-2017
OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -211,6 +211,26 @@ public:
return
endEntry
();
}
//- Write a keyword/value entry only when the two values differ.
// \param key the name of the entry
// \param value1 the reference value
// \param value2 the value to write if it differs from value1
template
<
class
T
>
Ostream
&
writeEntryIfDifferent
(
const
word
&
key
,
const
T
&
value1
,
const
T
&
value2
)
{
if
(
value1
!=
value2
)
{
writeEntry
(
key
,
value2
);
}
return
*
this
;
}
// Stream state functions
...
...
src/OpenFOAM/fields/Fields/Field/Field.C
View file @
c0ba7bf0
...
...
@@ -744,16 +744,15 @@ void Foam::Field<Type>::writeEntry(const word& keyword, Ostream& os) const
if
(
uniform
)
{
os
<<
"uniform "
<<
this
->
operator
[](
0
)
<<
token
::
END_STATEMENT
;
os
<<
"uniform "
<<
this
->
operator
[](
0
);
}
else
{
os
<<
"nonuniform "
;
List
<
Type
>::
writeEntry
(
os
);
os
<<
token
::
END_STATEMENT
;
}
os
<<
end
l
;
os
<<
token
::
END_STATEMENT
<<
n
l
;
}
...
...
src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C
View file @
c0ba7bf0
...
...
@@ -97,10 +97,8 @@ bool Foam::UniformDimensionedField<Type>::writeData(Ostream& os) const
{
scalar
multiplier
;
os
.
writeKeyword
(
"dimensions"
);
this
->
dimensions
().
write
(
os
,
multiplier
)
<<
token
::
END_STATEMENT
<<
nl
;
os
.
writeKeyword
(
"value"
)
<<
this
->
value
()
/
multiplier
<<
token
::
END_STATEMENT