From c0ba7bf05ac7503c418b9c424caeb3809c31133f Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 6 Nov 2017 00:49:24 +0100 Subject: [PATCH] STYLE: use Ostream writeEntry when writing key/value entries - makes for clearer code ENH: make writeIfDifferent part of Ostream --- .../T/smoluchowskiJumpTFvPatchScalarField.C | 14 +++-- .../BCs/U/maxwellSlipUFvPatchVectorField.C | 18 +++---- .../BCs/rho/fixedRhoFvPatchScalarField.C | 4 +- .../alphaContactAngleFvPatchScalarField.C | 3 +- .../alphaContactAngleFvPatchScalarField.C | 3 +- .../alphaContactAngleFvPatchScalarField.C | 3 +- .../alphaContactAngleFvPatchScalarField.C | 3 +- ...allBoilingWallFunctionFvPatchScalarField.C | 6 +-- ...ayatillekeWallFunctionFvPatchScalarField.C | 8 +-- ...allBoilingWallFunctionFvPatchScalarField.C | 30 +++++------ .../copiedFixedValueFvPatchScalarField.C | 3 +- ...ixedMultiPhaseHeatFluxFvPatchScalarField.C | 2 +- .../KocamustafaogullariIshii.C | 2 +- .../TolubinskiKostanchuk.C | 6 +-- .../departureDiameterModel.C | 2 +- .../departureFrequencyModel.C | 2 +- .../nucleationSiteModel/nucleationSiteModel.C | 2 +- .../Lavieville/Lavieville.C | 2 +- .../partitioningModels/cosine/cosine.C | 6 +-- .../partitioningModels/linear/linear.C | 6 +-- .../partitioningModel/partitioningModel.C | 2 +- ...sonJacksonParticleSlipFvPatchVectorField.C | 3 +- ...onJacksonParticleThetaFvPatchScalarField.C | 6 +-- ...sonJacksonParticleSlipFvPatchVectorField.C | 3 +- ...onJacksonParticleThetaFvPatchScalarField.C | 6 +-- etc/codeTemplates/BC/BC.C | 6 +-- src/OSspecific/POSIX/cpuInfo/cpuInfo.C | 26 +++------- src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H | 22 +++++++- src/OpenFOAM/fields/Fields/Field/Field.C | 5 +- .../UniformDimensionedField.C | 6 +-- .../codedFixedValuePointPatchField.C | 6 +-- .../fixedNormalSlipPointPatchField.C | 3 +- .../pointPatchField/pointPatchField.C | 22 +------- .../pointPatchField/pointPatchField.H | 11 ---- .../global/profiling/profilingInformation.C | 10 +--- .../interpolationLookUpTable.C | 10 ++-- .../tableReaders/csv/csvTableReader.C | 13 ++--- .../tableReaders/tableReader.C | 5 +- .../basic/generic/genericPolyPatch.C | 6 +-- .../constraint/cyclic/cyclicPolyPatch.C | 12 ++--- .../constraint/oldCyclic/oldCyclicPolyPatch.C | 18 +++---- .../constraint/processor/processorPolyPatch.C | 6 +-- .../processorCyclicPolyPatch.C | 9 +--- .../polyPatches/polyPatch/polyPatch.C | 6 +-- .../functions/Function1/Scale/Scale.C | 8 +-- .../functions/Function1/Table/TableBase.C | 25 ++++----- .../functions/Function1/ramp/ramp.C | 12 +++-- ...convectiveHeatTransferFvPatchScalarField.C | 2 +- ...pedMassWallTemperatureFvPatchScalarField.C | 5 +- ...ppedUniformInletHeatAdditionFvPatchField.C | 11 ++-- .../thermalBaffle1DFvPatchScalarField.C | 5 +- ...RateAdvectiveDiffusiveFvPatchScalarField.C | 7 ++- ...tureCoupledBaffleMixedFvPatchScalarField.C | 3 +- ...eratureRadCoupledMixedFvPatchScalarField.C | 9 ++-- ...ayatillekeWallFunctionFvPatchScalarField.C | 8 +-- .../alphatWallFunctionFvPatchScalarField.C | 2 +- ...ayatillekeWallFunctionFvPatchScalarField.C | 8 +-- .../atmBoundaryLayer/atmBoundaryLayer.C | 18 +++---- ...thDissipationRateInletFvPatchScalarField.C | 7 ++- ...ngLengthFrequencyInletFvPatchScalarField.C | 7 ++- .../fixedShearStressFvPatchVectorField.C | 2 +- .../porousBafflePressureFvPatchField.C | 9 ++-- .../epsilonWallFunctionFvPatchScalarField.C | 6 +-- .../fWallFunctionFvPatchScalarField.C | 6 +-- .../kLowReWallFunctionFvPatchScalarField.C | 8 +-- .../nutURoughWallFunctionFvPatchScalarField.C | 9 ++-- ...UTabulatedWallFunctionFvPatchScalarField.C | 3 +- .../nutWallFunctionFvPatchScalarField.C | 6 +-- .../omegaWallFunctionFvPatchScalarField.C | 10 ++-- .../v2WallFunctionFvPatchScalarField.C | 6 +-- src/dynamicMesh/attachDetach/attachDetach.C | 28 +++++----- src/dynamicMesh/boundaryPatch/boundaryPatch.C | 4 +- ...yMotionDisplacementPointPatchVectorField.C | 4 +- .../perfectInterface/perfectInterface.C | 34 +++---------- src/dynamicMesh/setUpdater/setUpdater.C | 27 +++------- .../slidingInterface/slidingInterface.C | 48 +++++++---------- .../cfdTools/general/MRF/MRFZone.C | 17 +++---- .../SRFFreestreamVelocityFvPatchVectorField.C | 6 +-- .../SRFVelocityFvPatchVectorField.C | 2 +- .../cfdTools/general/fvOptions/fvOptionIO.C | 13 +++-- .../activeBaffleVelocityFvPatchVectorField.C | 18 +++---- ...ureForceBaffleVelocityFvPatchVectorField.C | 23 +++------ .../derived/advective/advectiveFvPatchField.C | 8 +-- .../codedFixedValueFvPatchField.C | 6 +-- .../codedMixed/codedMixedFvPatchField.C | 3 +- ...lindricalInletVelocityFvPatchVectorField.C | 4 +- .../derived/fan/fanFvPatchField.C | 9 ++-- .../derived/fixedJump/fixedJumpFvPatchField.C | 3 +- .../fixedJumpAMI/fixedJumpAMIFvPatchField.C | 3 +- ...malInletOutletVelocityFvPatchVectorField.C | 12 ++--- ...ureCompressibleDensityFvPatchScalarField.C | 2 +- .../fixedProfile/fixedProfileFvPatchField.C | 4 +- .../flowRateInletVelocityFvPatchVectorField.C | 7 ++- ...flowRateOutletVelocityFvPatchVectorField.C | 4 +- .../fluxCorrectedVelocityFvPatchVectorField.C | 4 +- .../freestream/freestreamFvPatchField.C | 6 +-- .../freestreamPressureFvPatchScalarField.C | 6 +-- .../inletOutlet/inletOutletFvPatchField.C | 5 +- ...OutletTotalTemperatureFvPatchScalarField.C | 8 +-- ...erstitialInletVelocityFvPatchVectorField.C | 2 +- .../mappedField/mappedPatchFieldBase.C | 9 ++-- .../mappedFlowRateFvPatchVectorField.C | 6 +-- ...mappedVelocityFluxFixedValueFvPatchField.C | 2 +- ...FlowRateOutletVelocityFvPatchVectorField.C | 8 ++- .../outletInlet/outletInletFvPatchField.C | 5 +- .../outletMappedUniformInletFvPatchField.C | 8 +-- ...utletPhaseMeanVelocityFvPatchVectorField.C | 6 +-- ...aseHydrostaticPressureFvPatchScalarField.C | 12 ++--- .../plenumPressureFvPatchScalarField.C | 36 +++++-------- ...tedInletOutletVelocityFvPatchVectorField.C | 4 +- ...eDirectedInletVelocityFvPatchVectorField.C | 4 +- ...tOutletParSlipVelocityFvPatchVectorField.C | 4 +- ...ureInletOutletVelocityFvPatchVectorField.C | 2 +- .../pressureInletVelocityFvPatchVectorField.C | 4 +- ...malInletOutletVelocityFvPatchVectorField.C | 4 +- ...IDControlInletVelocityFvPatchVectorField.C | 25 ++++----- .../prghPressureFvPatchScalarField.C | 2 +- ...talHydrostaticPressureFvPatchScalarField.C | 8 +-- .../prghTotalPressureFvPatchScalarField.C | 6 +-- ...ureInletOutletVelocityFvPatchVectorField.C | 2 +- .../rotatingWallVelocityFvPatchVectorField.C | 4 +- .../supersonicFreestreamFvPatchVectorField.C | 14 ++--- ...lFlowRateInletVelocityFvPatchVectorField.C | 8 +-- .../swirlInletVelocityFvPatchVectorField.C | 4 +- .../syringePressureFvPatchScalarField.C | 22 ++++---- .../timeVaryingMappedFixedValueFvPatchField.C | 13 ++--- .../totalPressureFvPatchScalarField.C | 10 ++-- .../totalTemperatureFvPatchScalarField.C | 8 +-- .../turbulentDFSEMInletFvPatchVectorField.C | 26 +++++----- .../turbulentInletFvPatchField.C | 5 +- ...sityKineticEnergyInletFvPatchScalarField.C | 6 +-- ...ityHydrostaticPressureFvPatchScalarField.C | 6 +-- .../uniformInletOutletFvPatchField.C | 5 +- .../uniformTotalPressureFvPatchScalarField.C | 10 ++-- .../variableHeightFlowRateFvPatchField.C | 9 ++-- ...tFlowRateInletVelocityFvPatchVectorField.C | 2 +- .../waveSurfacePressureFvPatchScalarField.C | 6 +-- .../waveTransmissiveFvPatchField.C | 17 +++---- .../fvPatchFields/fvPatchField/fvPatchField.C | 22 +------- .../fvPatchFields/fvPatchField/fvPatchField.H | 11 ---- .../fvsPatchField/fvsPatchField.C | 2 +- ...llatingDisplacementPointPatchVectorField.C | 15 ++---- ...OscillatingVelocityPointPatchVectorField.C | 15 ++---- ...llatingDisplacementPointPatchVectorField.C | 6 +-- ...oscillatingVelocityPointPatchVectorField.C | 6 +-- ...surfaceDisplacementPointPatchVectorField.C | 10 ++-- ...aceSlipDisplacementPointPatchVectorField.C | 11 ++-- ...meVaryingMappedFixedValuePointPatchField.C | 13 ++--- ...polatedDisplacementPointPatchVectorField.C | 6 +-- .../waveDisplacementPointPatchVectorField.C | 9 ++-- .../genericFvPatchField/genericFvPatchField.C | 2 +- .../genericPointPatchField.C | 2 +- .../phaseProperties/phasePropertiesIO.C | 17 +++---- .../submodels/CloudSubModelBase.C | 3 +- .../DispersionRASModel/DispersionRASModel.C | 5 +- src/lumpedPointMotion/lumpedPointState.C | 2 +- .../cyclicACMIPolyPatch/cyclicACMIPolyPatch.C | 3 +- .../cyclicAMIPolyPatch/cyclicAMIPolyPatch.C | 38 ++++++-------- .../cyclicPeriodicAMIPolyPatch.C | 23 ++------- .../coordinateSystems/coordinateSystem.C | 14 +++-- .../mappedPolyPatch/mappedPatchBase.C | 3 +- .../mappedVariableThicknessWallPolyPatch.C | 2 +- .../regionCoupledBase.C | 12 ++--- ...sRadiativeCoupledMixedFvPatchScalarField.C | 19 +++---- ...ysisTemperatureCoupledFvPatchScalarField.C | 10 ++-- ...rolysisVelocityCoupledFvPatchVectorField.C | 10 ++-- ...ilmHeightInletVelocityFvPatchVectorField.C | 6 +-- ...linedFilmNusseltHeightFvPatchScalarField.C | 3 +- ...lmNusseltInletVelocityFvPatchVectorField.C | 3 +- ...alphatFilmWallFunctionFvPatchScalarField.C | 13 +++-- .../nutkFilmWallFunctionFvPatchScalarField.C | 7 ++- .../thermalBaffleFvPatchScalarField.C | 5 +- src/rigidBodyDynamics/bodies/cuboid/cuboid.C | 11 ++-- .../bodies/masslessBody/masslessBody.C | 3 +- .../bodies/rigidBody/rigidBody.C | 15 ++---- src/rigidBodyDynamics/bodies/sphere/sphere.C | 11 ++-- .../bodies/subBody/subBody.C | 7 +-- src/rigidBodyDynamics/joints/Pa/Pa.C | 3 +- src/rigidBodyDynamics/joints/Ra/Ra.C | 3 +- src/rigidBodyDynamics/joints/joint/joint.C | 2 +- src/rigidBodyDynamics/joints/joint/jointI.H | 4 +- .../linearAxialAngularSpring.C | 15 ++---- .../restraints/linearDamper/linearDamper.C | 3 +- .../restraints/linearSpring/linearSpring.C | 19 ++----- .../restraints/restraint/rigidBodyRestraint.C | 6 +-- .../sphericalAngularDamper.C | 2 +- .../rigidBodyModel/rigidBodyModel.C | 50 +++++++----------- .../rigidBodyModelStateIO.C | 8 +-- .../rigidBodyMotion/rigidBodyMotionIO.C | 9 ++-- ...gidBodyDisplacementPointPatchVectorField.C | 6 +-- .../sixDoFRigidBodyMotionAxisConstraint.C | 3 +- .../sixDoFRigidBodyMotionLineConstraint.C | 6 +-- .../sixDoFRigidBodyMotionPlaneConstraint.C | 6 +-- .../sixDoFRigidBodyMotionPointConstraint.C | 3 +- .../linearAxialAngularSpring.C | 15 ++---- .../restraints/linearDamper/linearDamper.C | 3 +- .../restraints/linearSpring/linearSpring.C | 19 ++----- .../sphericalAngularDamper.C | 2 +- .../sphericalAngularSpring.C | 9 ++-- .../tabulatedAxialAngularSpring.C | 16 ++---- .../sixDoFRigidBodyMotionIO.C | 51 +++++++------------ .../sixDoFRigidBodyMotionStateIO.C | 18 +++---- src/surfMesh/surfZone/surfZone/surfZone.C | 9 ++-- .../MarshakRadiationFvPatchScalarField.C | 2 +- ...iffusiveRadiationMixedFvPatchScalarField.C | 4 +- ...veViewFactorFixedValueFvPatchScalarField.C | 2 +- .../Reactions/solidReaction/solidReaction.C | 3 +- .../Reactions/solidReaction/solidReactionI.H | 2 +- .../solidArrheniusReactionRateI.H | 6 +-- .../NonEquilibriumReversibleReaction.C | 14 ++--- .../reaction/Reactions/Reaction/Reaction.C | 3 +- .../Reactions/ReactionList/ReactionList.C | 15 +++--- .../ArrheniusReactionRateI.H | 6 +-- .../FallOffReactionRateI.H | 34 ++++--------- .../LandauTellerReactionRateI.H | 10 ++-- .../SRIFallOffFunction/SRIFallOffFunctionI.H | 10 ++-- .../TroeFallOffFunctionI.H | 8 +-- .../powerSeries/powerSeriesReactionRateI.H | 8 +-- .../thirdBodyEfficienciesI.H | 2 +- .../specie/transport/const/constTransport.C | 16 +++--- .../logPolynomial/logPolynomialTransport.C | 32 ++++++------ .../polynomial/polynomialTransport.C | 32 ++++++------ .../sutherland/sutherlandTransport.C | 16 +++--- ...emperatureCoupledMixedFvPatchScalarField.C | 16 +++--- .../constant/constantSurfaceTension.C | 6 +-- .../temperatureDependentSurfaceTension.C | 6 +-- ...stantAlphaContactAngleFvPatchScalarField.C | 2 +- ...namicAlphaContactAngleFvPatchScalarField.C | 8 +-- ...ndentAlphaContactAngleFvPatchScalarField.C | 2 +- ...ryingAlphaContactAngleFvPatchScalarField.C | 8 +-- .../waveAlpha/waveAlphaFvPatchScalarField.C | 3 +- .../waveVelocityFvPatchVectorField.C | 3 +- 232 files changed, 854 insertions(+), 1291 deletions(-) diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C index d9a4a4e7df..0590e8d098 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C @@ -209,16 +209,14 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const { fvPatchScalarField::write(os); - writeEntryIfDifferent(os, "U", "U", UName_); - writeEntryIfDifferent(os, "rho", "rho", rhoName_); - writeEntryIfDifferent(os, "psi", "thermo:psi", psiName_); - writeEntryIfDifferent(os, "mu", "thermo:mu", muName_); + os.writeEntryIfDifferent("U", "U", UName_); + os.writeEntryIfDifferent("rho", "rho", rhoName_); + os.writeEntryIfDifferent("psi", "thermo:psi", psiName_); + os.writeEntryIfDifferent("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); } diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C index 7f19817660..c79f8d5062 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C @@ -200,18 +200,16 @@ void Foam::maxwellSlipUFvPatchVectorField::updateCoeffs() void Foam::maxwellSlipUFvPatchVectorField::write(Ostream& os) const { fvPatchVectorField::write(os); - writeEntryIfDifferent(os, "T", "T", TName_); - writeEntryIfDifferent(os, "rho", "rho", rhoName_); - writeEntryIfDifferent(os, "psi", "thermo:psi", psiName_); - writeEntryIfDifferent(os, "mu", "thermo:mu", muName_); - writeEntryIfDifferent(os, "tauMC", "tauMC", tauMCName_); + os.writeEntryIfDifferent("T", "T", TName_); + os.writeEntryIfDifferent("rho", "rho", rhoName_); + os.writeEntryIfDifferent("psi", "thermo:psi", psiName_); + os.writeEntryIfDifferent("mu", "thermo:mu", muName_); + os.writeEntryIfDifferent("tauMC", "tauMC", tauMCName_); - os.writeKeyword("accommodationCoeff") - << accommodationCoeff_ << token::END_STATEMENT << nl; + 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); diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.C index 5eefe82ff5..d71824052f 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.C @@ -117,8 +117,8 @@ void Foam::fixedRhoFvPatchScalarField::write(Ostream& os) const { fvPatchScalarField::write(os); - writeEntryIfDifferent(os, "p", "p", this->pName_); - writeEntryIfDifferent(os, "psi", "thermo:psi", psiName_); + os.writeEntryIfDifferent("p", "p", pName_); + os.writeEntryIfDifferent("psi", "thermo:psi", psiName_); writeEntry("value", os); } diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/alphaContactAngle/alphaContactAngleFvPatchScalarField.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/alphaContactAngle/alphaContactAngleFvPatchScalarField.C index 6872ae0321..9baa712b95 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/alphaContactAngle/alphaContactAngleFvPatchScalarField.C +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/alphaContactAngle/alphaContactAngleFvPatchScalarField.C @@ -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); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C index a0d433f4e8..d9c325a3ba 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C @@ -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); } diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C index a0d433f4e8..d9c325a3ba 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C @@ -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); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C index b26ec2faa0..284992c64c 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C @@ -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); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C index 2a4732fd97..464bbd01e4 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C @@ -138,9 +138,9 @@ void alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::write ) const { fvPatchField::write(os); - os.writeKeyword("relax") << relax_ << token::END_STATEMENT << nl; - os.writeKeyword("fixedDmdt") << fixedDmdt_ << token::END_STATEMENT << nl; - os.writeKeyword("L") << L_ << token::END_STATEMENT << nl; + os.writeEntry("relax", relax_); + os.writeEntry("fixedDmdt", fixedDmdt_); + os.writeEntry("L", L_); dmdt_.writeEntry("dmdt", os); writeEntry("value", os); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C index 7b854df507..f6c4ca196e 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C @@ -334,10 +334,10 @@ void alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::write ) const { fvPatchField::write(os); - os.writeKeyword("Prt") << Prt_ << token::END_STATEMENT << nl; - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; + os.writeEntry("Prt", Prt_); + os.writeEntry("Cmu", Cmu_); + os.writeEntry("kappa", kappa_); + os.writeEntry("E", E_); dmdt_.writeEntry("dmdt", os); writeEntry("value", os); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C index a1ac6c46f6..e10422c800 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C @@ -596,42 +596,36 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); - os.writeKeyword("phaseType") << phaseTypeNames_[phaseType_] - << token::END_STATEMENT << nl; + os.writeEntry("phaseType", phaseTypeNames_[phaseType_]); - os.writeKeyword("relax") << relax_ << token::END_STATEMENT << nl; + os.writeEntry("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; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.C index 63c85938cf..f9142de5cf 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.C @@ -109,8 +109,7 @@ void Foam::copiedFixedValueFvPatchScalarField::updateCoeffs() void Foam::copiedFixedValueFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); - os.writeKeyword("sourceField") - << sourceFieldName_ << token::END_STATEMENT << nl; + os.writeEntry("sourceField", sourceFieldName_); writeEntry("value", os); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C index c991a1a333..c84f323e74 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C @@ -183,7 +183,7 @@ void Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::updateCoeffs() void Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); - os.writeKeyword("relax") << relax_ << token::END_STATEMENT << nl; + os.writeEntry("relax", relax_); q_.writeEntry("q", os); writeEntry("value", os); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C index 53fe0e2f15..c18a01cf0b 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C @@ -114,7 +114,7 @@ void Foam::wallBoilingModels::departureDiameterModels:: KocamustafaogullariIshii::write(Ostream& os) const { departureDiameterModel::write(os); - os.writeKeyword("phi") << phi_ << token::END_STATEMENT << nl; + os.writeEntry("phi", phi_); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.C index 71ef4f03c7..e2ec8ef829 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.C @@ -90,9 +90,9 @@ void Foam::wallBoilingModels::departureDiameterModels:: TolubinskiKostanchuk::write(Ostream& os) const { departureDiameterModel::write(os); - os.writeKeyword("dRef") << dRef_ << token::END_STATEMENT << nl; - os.writeKeyword("dMax") << dMax_ << token::END_STATEMENT << nl; - os.writeKeyword("dMin") << dMin_ << token::END_STATEMENT << nl; + os.writeEntry("dRef", dRef_); + os.writeEntry("dMax", dMax_); + os.writeEntry("dMin", dMin_); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C index 4c3564a006..1c8c3dba40 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C @@ -53,7 +53,7 @@ Foam::wallBoilingModels::departureDiameterModel::~departureDiameterModel() void Foam::wallBoilingModels::departureDiameterModel::write(Ostream& os) const { - os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl; + os.writeEntry("type", this->type()); } // ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C index e87e520096..e76f789cc6 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C @@ -53,7 +53,7 @@ Foam::wallBoilingModels::departureFrequencyModel::~departureFrequencyModel() void Foam::wallBoilingModels::departureFrequencyModel::write(Ostream& os) const { - os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl; + os.writeEntry("type", this->type()); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C index fbf495a5e2..16c2112664 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C @@ -53,7 +53,7 @@ Foam::wallBoilingModels::nucleationSiteModel::~nucleationSiteModel() void Foam::wallBoilingModels::nucleationSiteModel::write(Ostream& os) const { - os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl; + os.writeEntry("type", this->type()); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C index 04b8c2917e..581a83a6d1 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C @@ -88,7 +88,7 @@ void Foam::wallBoilingModels::partitioningModels:: Lavieville::write(Ostream& os) const { partitioningModel::write(os); - os.writeKeyword("alphaCrit") << alphaCrit_ << token::END_STATEMENT << nl; + os.writeEntry("alphaCrit", alphaCrit_); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C index 1d157b67ab..f9528677d4 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C @@ -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_); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.C index dd1142b137..cc6d648f84 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.C @@ -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_); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C index 7b68289d94..cb12aca190 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C @@ -53,7 +53,7 @@ Foam::wallBoilingModels::partitioningModel::~partitioningModel() void Foam::wallBoilingModels::partitioningModel::write(Ostream& os) const { - os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl; + os.writeEntry("type", this->type()); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C index 651de2ea03..a64155e4a0 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C @@ -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); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C index 0fa9d5faf6..53431117d5 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C @@ -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); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C index 651de2ea03..a64155e4a0 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C @@ -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); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C index 0fa9d5faf6..53431117d5 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C @@ -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); } diff --git a/etc/codeTemplates/BC/BC.C b/etc/codeTemplates/BC/BC.C index 5e32969aa4..b0091f6900 100644 --- a/etc/codeTemplates/BC/BC.C +++ b/etc/codeTemplates/BC/BC.C @@ -220,11 +220,11 @@ void Foam::CLASS::write ) const { FVPATCHF::write(os); - os.writeKeyword("scalarData") << scalarData_ << token::END_STATEMENT << nl; - os.writeKeyword("data") << data_ << token::END_STATEMENT << nl; + os.writeEntry("scalarData", scalarData_); + os.writeEntry("data", data_); fieldData_.writeEntry("fieldData", os); timeVsData_->writeData(os); - os.writeKeyword("wordData") << wordData_ << token::END_STATEMENT << nl; + os.writeEntry("wordData", wordData_); this->writeEntry("value", os); } diff --git a/src/OSspecific/POSIX/cpuInfo/cpuInfo.C b/src/OSspecific/POSIX/cpuInfo/cpuInfo.C index 6dbd6abf4b..e394ec7b22 100644 --- a/src/OSspecific/POSIX/cpuInfo/cpuInfo.C +++ b/src/OSspecific/POSIX/cpuInfo/cpuInfo.C @@ -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("cpu_family", -1, cpu_family); + os.writeEntryIfDifferent("model", -1, model); + os.writeEntryIfDifferent("cpu_MHz", 0, cpu_MHz); + os.writeEntryIfDifferent("cpu_cores", 0, cpu_cores); + os.writeEntryIfDifferent("siblings", 0, siblings); } diff --git a/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H b/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H index bf0150cb24..1c6d2131bc 100644 --- a/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H +++ b/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H @@ -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 + Ostream& writeEntryIfDifferent + ( + const word& key, + const T& value1, + const T& value2 + ) + { + if (value1 != value2) + { + writeEntry(key, value2); + } + + return *this; + } + // Stream state functions diff --git a/src/OpenFOAM/fields/Fields/Field/Field.C b/src/OpenFOAM/fields/Fields/Field/Field.C index f6ca2a766c..eaaf483064 100644 --- a/src/OpenFOAM/fields/Fields/Field/Field.C +++ b/src/OpenFOAM/fields/Fields/Field/Field.C @@ -744,16 +744,15 @@ void Foam::Field::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::writeEntry(os); - os << token::END_STATEMENT; } - os << endl; + os << token::END_STATEMENT << nl; } diff --git a/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C b/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C index 94bf0ca6c8..9e722c6569 100644 --- a/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C +++ b/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C @@ -97,10 +97,8 @@ bool Foam::UniformDimensionedField::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 - << nl << nl; + this->dimensions().write(os, multiplier) << token::END_STATEMENT << nl; + os.writeEntry("value", this->value()/multiplier) << nl; return os.good(); } diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.C index 6f32877f62..16969e8dc9 100644 --- a/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.C @@ -270,8 +270,7 @@ Foam::codedFixedValuePointPatchField::redirectPatchField() const // Make sure to construct the patchfield with up-to-date value OStringStream os; - os.writeKeyword("type") << name_ << token::END_STATEMENT - << nl; + os.writeEntry("type", name_); static_cast&>(*this).writeEntry("value", os); IStringStream is(os.str()); dictionary dict(is); @@ -333,8 +332,7 @@ template void Foam::codedFixedValuePointPatchField::write(Ostream& os) const { fixedValuePointPatchField::write(os); - os.writeKeyword("name") << name_ - << token::END_STATEMENT << nl; + os.writeEntry("name", name_); codedBase::writeCodeDict(os, dict_); } diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.C index cd99728ca5..c5941fade4 100644 --- a/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.C @@ -100,8 +100,7 @@ template void Foam::fixedNormalSlipPointPatchField::write(Ostream& os) const { slipPointPatchField::write(os); - os.writeKeyword("n") - << n_ << token::END_STATEMENT << nl; + os.writeEntry("n", n_); } diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C index 2c98caa0e5..b2016d79a3 100644 --- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C @@ -113,29 +113,11 @@ const Foam::objectRegistry& Foam::pointPatchField::db() const template void Foam::pointPatchField::write(Ostream& os) const { - os.writeKeyword("type") << type() << token::END_STATEMENT << nl; + os.writeEntry("type", type()); if (patchType_.size()) { - os.writeKeyword("patchType") << patchType_ - << token::END_STATEMENT << nl; - } -} - - -template -template -void Foam::pointPatchField::writeEntryIfDifferent -( - Ostream& os, - const word& entryName, - const EntryType& value1, - const EntryType& value2 -) const -{ - if (value1 != value2) - { - os.writeKeyword(entryName) << value2 << token::END_STATEMENT << nl; + os.writeEntry("patchType", patchType_); } } diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H index b4ac7f2dc8..40129b82ec 100644 --- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H @@ -436,17 +436,6 @@ public: //- Write virtual void write(Ostream&) const; - //- Helper function to write the keyword and entry only if the - // values are not equal. The value is then output as value2 - template - void writeEntryIfDifferent - ( - Ostream& os, - const word& entryName, - const EntryType& value1, - const EntryType& value2 - ) const; - // Member operators diff --git a/src/OpenFOAM/global/profiling/profilingInformation.C b/src/OpenFOAM/global/profiling/profilingInformation.C index bc73478e51..24957284e1 100644 --- a/src/OpenFOAM/global/profiling/profilingInformation.C +++ b/src/OpenFOAM/global/profiling/profilingInformation.C @@ -128,18 +128,12 @@ Foam::Ostream& Foam::profilingInformation::write os.beginBlock(word("trigger" + Foam::name(id_))); os.writeEntry("id", id_); - if (id_ != parent().id()) - { - os.writeEntry("parentId", parent().id()); - } + os.writeEntryIfDifferent("parentId", id_, parent().id()); os.writeEntry("description", description()); os.writeEntry("calls", calls() + (offset ? 1 : 0)); os.writeEntry("totalTime", totalTime() + elapsedTime); os.writeEntry("childTime", childTime() + childTimes); - if (maxMem_) - { - os.writeEntry("maxMem", maxMem_); - } + os.writeEntryIfDifferent("maxMem", 0, maxMem_); os.writeEntry("onStack", Switch(onStack())); os.endBlock(); diff --git a/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C b/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C index 32e76884b6..f317ae5f70 100644 --- a/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C +++ b/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C @@ -354,19 +354,15 @@ void Foam::interpolationLookUpTable::write control.writeHeader(os); - os.writeKeyword("fields") - << entries_ << token::END_STATEMENT << nl; - - os.writeKeyword("output") - << output_ << token::END_STATEMENT << nl; + os.writeEntry("fields", entries_); + os.writeEntry("output", output_); if (this->size() == 0) { FatalErrorInFunction << "table is empty" << nl << exit(FatalError); } - os.writeKeyword("values") - << *this << token::END_STATEMENT << nl; + os.writeEntry("values", *this); } diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C index 51adcb3381..bf972fda0a 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C +++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C @@ -173,10 +173,8 @@ void Foam::csvTableReader::write(Ostream& os) const { tableReader::write(os); - os.writeKeyword("hasHeaderLine") - << headerLine_ << token::END_STATEMENT << nl; - os.writeKeyword("timeColumn") - << timeColumn_ << token::END_STATEMENT << nl; + os.writeEntry("hasHeaderLine", headerLine_); + os.writeEntry("timeColumn", timeColumn_); // Force writing labelList in ascii os.writeKeyword("valueColumns"); @@ -186,10 +184,13 @@ void Foam::csvTableReader::write(Ostream& os) const os << componentColumns_; os.format(IOstream::BINARY); } + else + { + os << componentColumns_; + } os << token::END_STATEMENT << nl; - os.writeKeyword("separator") - << string(separator_) << token::END_STATEMENT << nl; + os.writeEntry("separator", string(separator_)); } diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C index b3d96d50b0..b32b3bfdc1 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C +++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C @@ -74,10 +74,7 @@ Foam::tableReader::~tableReader() template void Foam::tableReader::write(Ostream& os) const { - if (this->type() != "openFoam") - { - os.writeEntry("readerType", this->type()); - } + os.writeEntryIfDifferent("readerType", "openFoam", this->type()); } diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.C index 22a1e1b0f7..6421a4ee53 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.C @@ -126,10 +126,10 @@ const Foam::word& Foam::genericPolyPatch::actualType() const void Foam::genericPolyPatch::write(Ostream& os) const { - os.writeKeyword("type") << actualTypeName_ << token::END_STATEMENT << nl; + os.writeEntry("type", actualTypeName_); patchIdentifier::write(os); - os.writeKeyword("nFaces") << size() << token::END_STATEMENT << nl; - os.writeKeyword("startFace") << start() << token::END_STATEMENT << nl; + os.writeEntry("nFaces", size()); + os.writeEntry("startFace", start()); forAllConstIter(dictionary, dict_, iter) { diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C index d83efd4fed..6544881f4a 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C @@ -1447,24 +1447,20 @@ void Foam::cyclicPolyPatch::write(Ostream& os) const coupledPolyPatch::write(os); if (!neighbPatchName_.empty()) { - os.writeKeyword("neighbourPatch") << neighbPatchName_ - << token::END_STATEMENT << nl; + os.writeEntry("neighbourPatch", neighbPatchName_); } coupleGroup_.write(os); switch (transform()) { case ROTATIONAL: { - os.writeKeyword("rotationAxis") << rotationAxis_ - << token::END_STATEMENT << nl; - os.writeKeyword("rotationCentre") << rotationCentre_ - << token::END_STATEMENT << nl; + os.writeEntry("rotationAxis", rotationAxis_); + os.writeEntry("rotationCentre", rotationCentre_); break; } case TRANSLATIONAL: { - os.writeKeyword("separationVector") << separationVector_ - << token::END_STATEMENT << nl; + os.writeEntry("separationVector", separationVector_); break; } case NOORDERING: diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C index 7fdf063475..5001f6e238 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C @@ -1221,28 +1221,24 @@ bool Foam::oldCyclicPolyPatch::order void Foam::oldCyclicPolyPatch::write(Ostream& os) const { // Replacement of polyPatch::write to write 'cyclic' instead of type(): - os.writeKeyword("type") << cyclicPolyPatch::typeName - << token::END_STATEMENT << nl; + os.writeEntry("type", cyclicPolyPatch::typeName); patchIdentifier::write(os); - os.writeKeyword("nFaces") << size() << token::END_STATEMENT << nl; - os.writeKeyword("startFace") << start() << token::END_STATEMENT << nl; + os.writeEntry("nFaces", size()); + os.writeEntry("startFace", start()); - os.writeKeyword("featureCos") << featureCos_ << token::END_STATEMENT << nl; + os.writeEntry("featureCos", featureCos_); switch (transform()) { case ROTATIONAL: { - os.writeKeyword("rotationAxis") << rotationAxis_ - << token::END_STATEMENT << nl; - os.writeKeyword("rotationCentre") << rotationCentre_ - << token::END_STATEMENT << nl; + os.writeEntry("rotationAxis", rotationAxis_); + os.writeEntry("rotationCentre", rotationCentre_); break; } case TRANSLATIONAL: { - os.writeKeyword("separationVector") << separationVector_ - << token::END_STATEMENT << nl; + os.writeEntry("separationVector", separationVector_); break; } default: diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C index 0ad36956cb..9c27fada85 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C @@ -1112,10 +1112,8 @@ bool Foam::processorPolyPatch::order void Foam::processorPolyPatch::write(Ostream& os) const { coupledPolyPatch::write(os); - os.writeKeyword("myProcNo") << myProcNo_ - << token::END_STATEMENT << nl; - os.writeKeyword("neighbProcNo") << neighbProcNo_ - << token::END_STATEMENT << nl; + os.writeEntry("myProcNo", myProcNo_); + os.writeEntry("neighbProcNo", neighbProcNo_); } diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C index 02dcc6294a..9163b5c19c 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C @@ -337,13 +337,8 @@ bool Foam::processorCyclicPolyPatch::order void Foam::processorCyclicPolyPatch::write(Ostream& os) const { processorPolyPatch::write(os); - os.writeKeyword("referPatch") << referPatchName_ - << token::END_STATEMENT << nl; - if (tag_ != -1) - { - os.writeKeyword("tag") << tag_ - << token::END_STATEMENT << nl; - } + os.writeEntry("referPatch", referPatchName_); + os.writeEntryIfDifferent