diff --git a/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C b/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C index 1623840b46..e59d0e7917 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -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; + writeEntry(os, "type", this->type()); } // ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C b/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C index c9845d0b94..dacb32db81 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -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; + writeEntry(os, "type", this->type()); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C b/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C index ff0f895772..a39cc4812b 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -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; + writeEntry(os, "type", this->type()); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C b/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C index e36265006d..db1f806332 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -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; + writeEntry(os, "type", this->type()); } diff --git a/applications/utilities/thermophysical/chemkinToFoam/chemkinToFoam.C b/applications/utilities/thermophysical/chemkinToFoam/chemkinToFoam.C index 3cc29a3796..dabdc9ae5b 100644 --- a/applications/utilities/thermophysical/chemkinToFoam/chemkinToFoam.C +++ b/applications/utilities/thermophysical/chemkinToFoam/chemkinToFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -68,10 +68,10 @@ int main(int argc, char *argv[]) chemkinReader cr(species, args[1], args[3], args[2], newFormat); OFstream reactionsFile(args[4]); - reactionsFile.writeKeyword("elements") - << cr.elementNames() << token::END_STATEMENT << nl << nl; - reactionsFile.writeKeyword("species") - << cr.species() << token::END_STATEMENT << nl << nl; + writeEntry(reactionsFile, "elements", cr.elementNames()); + reactionsFile << nl; + writeEntry(reactionsFile, "species", cr.species()); + reactionsFile << nl; cr.reactions().write(reactionsFile); // Temporary hack to splice the specie composition data into the thermo file @@ -103,12 +103,18 @@ int main(int argc, char *argv[]) reactionsFile << nl; - reactionsFile.writeKeyword("Tlow") - << Reaction::TlowDefault - << token::END_STATEMENT << nl; - reactionsFile.writeKeyword("Thigh") - << Reaction::ThighDefault - << token::END_STATEMENT << nl << nl; + writeEntry + ( + reactionsFile, + "Tlow", + Reaction::TlowDefault + ); + writeEntry + ( + reactionsFile, + "Thigh", + Reaction::ThighDefault + ); Info<< "End\n" << endl; diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldIO.C b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldIO.C index 5d7e20ff6f..20b537b11c 100644 --- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldIO.C +++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -107,8 +107,8 @@ bool Foam::DimensionedField::writeData const word& fieldDictEntry ) const { - os.writeKeyword("dimensions") << dimensions() << token::END_STATEMENT - << nl << nl; + writeEntry(os, "dimensions", dimensions()); + os << nl; Field::writeEntry(fieldDictEntry, os); diff --git a/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C b/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C index e8db745154..27309da162 100644 --- a/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C +++ b/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -98,10 +98,9 @@ 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; + writeEntry(os, "value", this->value()/multiplier); + os << 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 b6a6760d77..e5662598d1 100644 --- a/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.C @@ -269,8 +269,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; + writeEntry(os, "type", name_); static_cast&>(*this).writeEntry("value", os); IStringStream is(os.str()); dictionary dict(is); @@ -332,8 +331,7 @@ template void Foam::codedFixedValuePointPatchField::write(Ostream& os) const { fixedValuePointPatchField::write(os); - os.writeKeyword("name") << name_ - << token::END_STATEMENT << nl; + writeEntry(os, "name", name_); if (dict_.found("codeInclude")) { diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C index 8ccd8aad4e..9e4e36c729 100644 --- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -113,12 +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; + writeEntry(os, "type", type()); if (patchType_.size()) { - os.writeKeyword("patchType") << patchType_ - << token::END_STATEMENT << nl; + writeEntry(os, "patchType", patchType_); } } @@ -135,7 +134,7 @@ void Foam::pointPatchField::writeEntryIfDifferent { if (value1 != value2) { - os.writeKeyword(entryName) << value2 << token::END_STATEMENT << nl; + writeEntry(os, entryName, value2); } } diff --git a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C index 179ccd0d88..2781e32f4a 100644 --- a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C +++ b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -448,10 +448,8 @@ void Foam::interpolation2DTable::checkOrder() const template void Foam::interpolation2DTable::write(Ostream& os) const { - os.writeKeyword("file") - << fileName_ << token::END_STATEMENT << nl; - os.writeKeyword("outOfBounds") - << boundsHandlingToWord(boundsHandling_) << token::END_STATEMENT << nl; + writeEntry(os, "file", fileName_); + writeEntry(os, "outOfBounds", boundsHandlingToWord(boundsHandling_)); *this >> os; } diff --git a/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C b/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C index b04d0f87cc..54aa3ade1e 100644 --- a/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C +++ b/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -354,19 +354,16 @@ void Foam::interpolationLookUpTable::write control.writeHeader(os); - os.writeKeyword("fields") - << entries_ << token::END_STATEMENT << nl; + Foam::writeEntry(os, "fields", entries_); - os.writeKeyword("output") - << output_ << token::END_STATEMENT << nl; + Foam::writeEntry(os, "output", output_); if (this->size() == 0) { FatalErrorInFunction << "table is empty" << nl << exit(FatalError); } - os.writeKeyword("values") - << *this << token::END_STATEMENT << nl; + Foam::writeEntry(os, "values", *this); } diff --git a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C index 7b9b42a18f..352ffe6556 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C +++ b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -228,10 +228,8 @@ void Foam::interpolationTable::check() const template void Foam::interpolationTable::write(Ostream& os) const { - os.writeKeyword("file") - << fileName_ << token::END_STATEMENT << nl; - os.writeKeyword("outOfBounds") - << boundsHandlingToWord(boundsHandling_) << token::END_STATEMENT << nl; + writeEntry(os, "file", fileName_); + writeEntry(os, "outOfBounds", boundsHandlingToWord(boundsHandling_)); if (reader_.valid()) { reader_->write(os); diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C index 795dcc3f43..48ccfb9d00 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C +++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -176,10 +176,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; + writeEntry(os, "hasHeaderLine", headerLine_); + writeEntry(os, "timeColumn", timeColumn_); // Force writing labelList in ascii os.writeKeyword("valueColumns"); @@ -191,8 +189,7 @@ void Foam::csvTableReader::write(Ostream& os) const } os << token::END_STATEMENT << nl; - os.writeKeyword("separator") - << string(separator_) << token::END_STATEMENT << nl; + writeEntry(os, "separator", string(separator_)); } diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C index 39383e3ace..a2f7c8d464 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C +++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -78,8 +78,7 @@ void Foam::tableReader::write(Ostream& os) const { if (this->type() != "openFoam") { - os.writeKeyword("readerType") - << this->type() << token::END_STATEMENT << nl; + writeEntry(os, "readerType", this->type()); } } diff --git a/src/OpenFOAM/meshes/Identifiers/patch/coupleGroupIdentifier.C b/src/OpenFOAM/meshes/Identifiers/patch/coupleGroupIdentifier.C index 32d31dd1b9..e810baed0c 100644 --- a/src/OpenFOAM/meshes/Identifiers/patch/coupleGroupIdentifier.C +++ b/src/OpenFOAM/meshes/Identifiers/patch/coupleGroupIdentifier.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -222,7 +222,7 @@ void Foam::coupleGroupIdentifier::write(Ostream& os) const { if (valid()) { - os.writeKeyword("coupleGroup") << name() << token::END_STATEMENT << nl; + writeEntry(os, "coupleGroup", name()); } } diff --git a/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.C b/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.C index d0d69282f4..951480f334 100644 --- a/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.C +++ b/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -90,13 +90,11 @@ void Foam::patchIdentifier::write(Ostream& os) const { if (physicalType_.size()) { - os.writeKeyword("physicalType") << physicalType_ - << token::END_STATEMENT << nl; + writeEntry(os, "physicalType", physicalType_); } if (inGroups_.size()) { - os.writeKeyword("inGroups") << inGroups_ - << token::END_STATEMENT << nl; + writeEntry(os, "inGroups", inGroups_); } } diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C index deebe4355d..390057eca2 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -563,10 +563,8 @@ void Foam::coupledPolyPatch::write(Ostream& os) const polyPatch::write(os); // if (matchTolerance_ != defaultMatchTol_) { - os.writeKeyword("matchTolerance") << matchTolerance_ - << token::END_STATEMENT << nl; - os.writeKeyword("transform") << transformTypeNames[transform_] - << token::END_STATEMENT << nl; + Foam::writeEntry(os, "matchTolerance", matchTolerance_); + Foam::writeEntry(os, "transform", transformTypeNames[transform_]); } } diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.C index 488afc7412..ed2d826904 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -120,10 +120,10 @@ Foam::genericPolyPatch::~genericPolyPatch() void Foam::genericPolyPatch::write(Ostream& os) const { - os.writeKeyword("type") << actualTypeName_ << token::END_STATEMENT << nl; + Foam::writeEntry(os, "type", actualTypeName_); patchIdentifier::write(os); - os.writeKeyword("nFaces") << size() << token::END_STATEMENT << nl; - os.writeKeyword("startFace") << start() << token::END_STATEMENT << nl; + Foam::writeEntry(os, "nFaces", size()); + Foam::writeEntry(os, "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 a707340e2c..4d063ed171 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1446,24 +1446,20 @@ void Foam::cyclicPolyPatch::write(Ostream& os) const coupledPolyPatch::write(os); if (!neighbPatchName_.empty()) { - os.writeKeyword("neighbourPatch") << neighbPatchName_ - << token::END_STATEMENT << nl; + Foam::writeEntry(os, "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; + Foam::writeEntry(os, "rotationAxis", rotationAxis_); + Foam::writeEntry(os, "rotationCentre", rotationCentre_); break; } case TRANSLATIONAL: { - os.writeKeyword("separationVector") << separationVector_ - << token::END_STATEMENT << nl; + Foam::writeEntry(os, "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 ea341e20b8..0a075f9d61 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1219,28 +1219,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; + Foam::writeEntry(os, "type", cyclicPolyPatch::typeName); patchIdentifier::write(os); - os.writeKeyword("nFaces") << size() << token::END_STATEMENT << nl; - os.writeKeyword("startFace") << start() << token::END_STATEMENT << nl; + Foam::writeEntry(os, "nFaces", size()); + Foam::writeEntry(os, "startFace", start()); - os.writeKeyword("featureCos") << featureCos_ << token::END_STATEMENT << nl; + Foam::writeEntry(os, "featureCos", featureCos_); switch (transform()) { case ROTATIONAL: { - os.writeKeyword("rotationAxis") << rotationAxis_ - << token::END_STATEMENT << nl; - os.writeKeyword("rotationCentre") << rotationCentre_ - << token::END_STATEMENT << nl; + Foam::writeEntry(os, "rotationAxis", rotationAxis_); + Foam::writeEntry(os, "rotationCentre", rotationCentre_); break; } case TRANSLATIONAL: { - os.writeKeyword("separationVector") << separationVector_ - << token::END_STATEMENT << nl; + Foam::writeEntry(os, "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 e10df2bb4d..747fc4ded9 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -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; + Foam::writeEntry(os, "myProcNo", myProcNo_); + Foam::writeEntry(os, "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 c74a0b81de..af395b3548 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -337,12 +337,10 @@ bool Foam::processorCyclicPolyPatch::order void Foam::processorCyclicPolyPatch::write(Ostream& os) const { processorPolyPatch::write(os); - os.writeKeyword("referPatch") << referPatchName_ - << token::END_STATEMENT << nl; + Foam::writeEntry(os, "referPatch", referPatchName_); if (tag_ != -1) { - os.writeKeyword("tag") << tag_ - << token::END_STATEMENT << nl; + Foam::writeEntry(os, "tag", tag_); } } diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C index fb5dcfcb65..ab1a7924c1 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -356,10 +356,10 @@ void Foam::polyPatch::clearAddressing() void Foam::polyPatch::write(Ostream& os) const { - os.writeKeyword("type") << type() << token::END_STATEMENT << nl; + Foam::writeEntry(os, "type", type()); patchIdentifier::write(os); - os.writeKeyword("nFaces") << size() << token::END_STATEMENT << nl; - os.writeKeyword("startFace") << start() << token::END_STATEMENT << nl; + Foam::writeEntry(os, "nFaces", size()); + Foam::writeEntry(os, "startFace", start()); } diff --git a/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C b/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C index 878d450bbf..1536b446f6 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C +++ b/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -496,13 +496,11 @@ Foam::point Foam::plane::mirror(const point& p) const void Foam::plane::writeDict(Ostream& os) const { - os.writeKeyword("planeType") << "pointAndNormal" - << token::END_STATEMENT << nl; + writeEntry(os, "planeType", "pointAndNormal"); os << indent << "pointAndNormalDict" << nl << indent << token::BEGIN_BLOCK << incrIndent << nl; - os.writeKeyword("point") << point_ << token::END_STATEMENT << nl; - os.writeKeyword("normal") << normal_ << token::END_STATEMENT - << nl; + writeEntry(os, "point", point_); + writeEntry(os, "normal", normal_); os << decrIndent << indent << token::END_BLOCK << endl; } diff --git a/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C b/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C index bc2af651f9..07ca35dc44 100644 --- a/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C +++ b/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -269,20 +269,12 @@ void Foam::Function1Types::CSV::writeData(Ostream& os) const // the values themselves TableBase::writeEntries(os); - os.writeKeyword("nHeaderLine") << nHeaderLine_ << token::END_STATEMENT - << nl; - - os.writeKeyword("refColumn") << refColumn_ << token::END_STATEMENT << nl; - + writeEntry(os, "nHeaderLine", nHeaderLine_); + writeEntry(os, "refColumn", refColumn_); componentColumns_.writeEntry("componentColumns", os); - - os.writeKeyword("separator") << string(separator_) - << token::END_STATEMENT << nl; - - os.writeKeyword("mergeSeparators") << mergeSeparators_ - << token::END_STATEMENT << nl; - - os.writeKeyword("file") << fName_ << token::END_STATEMENT << nl; + writeEntry(os, "separator", string(separator_)); + writeEntry(os, "mergeSeparators", mergeSeparators_); + writeEntry(os, "file", fName_); os << decrIndent << indent << token::END_BLOCK << endl; } diff --git a/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.C b/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.C index 6b3bf3da05..cae256d0a3 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.C +++ b/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -79,7 +79,7 @@ void Foam::Function1Types::Sine::writeData(Ostream& os) const os << token::END_STATEMENT << nl; os << indent << word(this->name() + "Coeffs") << nl; os << indent << token::BEGIN_BLOCK << incrIndent << nl; - os.writeKeyword("t0") << t0_ << token::END_STATEMENT << nl; + writeEntry(os, "t0", t0_); amplitude_->writeData(os); frequency_->writeData(os); scale_->writeData(os); diff --git a/src/OpenFOAM/primitives/functions/Function1/Square/Square.C b/src/OpenFOAM/primitives/functions/Function1/Square/Square.C index 78d2dba62f..84aaf6399a 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Square/Square.C +++ b/src/OpenFOAM/primitives/functions/Function1/Square/Square.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -81,8 +81,8 @@ void Foam::Function1Types::Square::writeData(Ostream& os) const os << token::END_STATEMENT << nl; os << indent << word(this->name() + "Coeffs") << nl; os << indent << token::BEGIN_BLOCK << incrIndent << nl; - os.writeKeyword("t0") << t0_ << token::END_STATEMENT << nl; - os.writeKeyword("markSpace") << markSpace_ << token::END_STATEMENT << nl; + writeEntry(os, "t0", t0_); + writeEntry(os, "markSpace", markSpace_); amplitude_->writeData(os); frequency_->writeData(os); scale_->writeData(os); diff --git a/src/OpenFOAM/primitives/functions/Function1/Table/TableBase.C b/src/OpenFOAM/primitives/functions/Function1/Table/TableBase.C index 6f8b81efc4..4867875923 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Table/TableBase.C +++ b/src/OpenFOAM/primitives/functions/Function1/Table/TableBase.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -413,13 +413,11 @@ void Foam::Function1Types::TableBase::writeEntries(Ostream& os) const { if (boundsHandling_ != CLAMP) { - os.writeKeyword("outOfBounds") << boundsHandlingToWord(boundsHandling_) - << token::END_STATEMENT << nl; + writeEntry(os, "outOfBounds", boundsHandlingToWord(boundsHandling_)); } if (interpolationScheme_ != "linear") { - os.writeKeyword("interpolationScheme") << interpolationScheme_ - << token::END_STATEMENT << nl; + writeEntry(os, "interpolationScheme", interpolationScheme_); } } diff --git a/src/OpenFOAM/primitives/functions/Function1/TableFile/TableFile.C b/src/OpenFOAM/primitives/functions/Function1/TableFile/TableFile.C index d73a18e865..48f0ad58aa 100644 --- a/src/OpenFOAM/primitives/functions/Function1/TableFile/TableFile.C +++ b/src/OpenFOAM/primitives/functions/Function1/TableFile/TableFile.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -88,7 +88,7 @@ void Foam::Function1Types::TableFile::writeData(Ostream& os) const // the values themselves TableBase::writeEntries(os); - os.writeKeyword("file")<< fName_ << token::END_STATEMENT << nl; + writeEntry(os, "file", fName_); os << decrIndent << indent << token::END_BLOCK << endl; } diff --git a/src/OpenFOAM/primitives/functions/Function1/ramp/ramp.C b/src/OpenFOAM/primitives/functions/Function1/ramp/ramp.C index ebe69f5fcb..2a06abb959 100644 --- a/src/OpenFOAM/primitives/functions/Function1/ramp/ramp.C +++ b/src/OpenFOAM/primitives/functions/Function1/ramp/ramp.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -60,8 +60,8 @@ void Foam::Function1Types::ramp::writeData(Ostream& os) const os << token::END_STATEMENT << nl; os << indent << word(this->name() + "Coeffs") << nl; os << indent << token::BEGIN_BLOCK << incrIndent << nl; - os.writeKeyword("start") << start_ << token::END_STATEMENT << nl; - os.writeKeyword("duration") << duration_ << token::END_STATEMENT << nl; + writeEntry(os, "start", start_); + writeEntry(os, "duration", duration_); os << decrIndent << indent << token::END_BLOCK << endl; } diff --git a/src/conversion/ensight/part/ensightPartIO.C b/src/conversion/ensight/part/ensightPartIO.C index 53e6e2eeca..b503817e48 100644 --- a/src/conversion/ensight/part/ensightPartIO.C +++ b/src/conversion/ensight/part/ensightPartIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -130,10 +130,10 @@ bool Foam::ensightPart::writeSummary(Ostream& os) const << indent << token::BEGIN_BLOCK << incrIndent << nl; // Ensight starts with 1 - os.writeKeyword("id") << (number() + 1) << token::END_STATEMENT << nl; - os.writeKeyword("name") << name() << token::END_STATEMENT << nl; - os.writeKeyword("offset") << offset() << token::END_STATEMENT << nl; - os.writeKeyword("size") << size() << token::END_STATEMENT << nl; + writeEntry(os, "id", (number() + 1)); + writeEntry(os, "name", name()); + writeEntry(os, "offset", offset()); + writeEntry(os, "size", size()); os << decrIndent << indent << token::END_BLOCK << nl << endl; @@ -146,9 +146,9 @@ bool Foam::ensightPart::writeData(Ostream& os) const os << indent << type() << nl << indent << token::BEGIN_BLOCK << incrIndent << nl; - os.writeKeyword("id") << number() << token::END_STATEMENT << nl; - os.writeKeyword("name") << name() << token::END_STATEMENT << nl; - os.writeKeyword("offset") << offset() << token::END_STATEMENT << nl; + writeEntry(os, "id", number()); + writeEntry(os, "name", name()); + writeEntry(os, "offset", offset()); forAll(elementTypes(), typeI) { diff --git a/src/dynamicMesh/boundaryPatch/boundaryPatch.C b/src/dynamicMesh/boundaryPatch/boundaryPatch.C index 8347fcb6af..0f4cfe632f 100644 --- a/src/dynamicMesh/boundaryPatch/boundaryPatch.C +++ b/src/dynamicMesh/boundaryPatch/boundaryPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -90,8 +90,8 @@ Foam::boundaryPatch::~boundaryPatch() void Foam::boundaryPatch::write(Ostream& os) const { patchIdentifier::write(os); - os.writeKeyword("nFaces") << size_ << token::END_STATEMENT << nl; - os.writeKeyword("startFace") << start_ << token::END_STATEMENT << nl; + writeEntry(os, "nFaces", size_); + writeEntry(os, "startFace", start_); } diff --git a/src/dynamicMesh/motionSolvers/displacement/solidBody/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.C b/src/dynamicMesh/motionSolvers/displacement/solidBody/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.C index 9428c600ea..5a79c1fa82 100644 --- a/src/dynamicMesh/motionSolvers/displacement/solidBody/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.C +++ b/src/dynamicMesh/motionSolvers/displacement/solidBody/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -174,8 +174,7 @@ write(Ostream& os) const // Note: write value fixedValuePointPatchVectorField::write(os); - os.writeKeyword(solidBodyMotionFunction::typeName) << SBMFPtr_->type() - << token::END_STATEMENT << nl; + Foam::writeEntry(os, solidBodyMotionFunction::typeName, SBMFPtr_->type()); os << indent << word(SBMFPtr_->type() + "Coeffs"); SBMFPtr_->writeData(os); } diff --git a/src/dynamicMesh/pointInterpolator/dynamicMeshPointInterpolator.C b/src/dynamicMesh/pointInterpolator/dynamicMeshPointInterpolator.C index 20378cd49d..f77a81d7fc 100644 --- a/src/dynamicMesh/pointInterpolator/dynamicMeshPointInterpolator.C +++ b/src/dynamicMesh/pointInterpolator/dynamicMeshPointInterpolator.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -186,10 +186,8 @@ Foam::dynamicMeshPointInterpolator::curPointField() const void Foam::dynamicMeshPointInterpolator::write(Ostream& os) const { - os.writeKeyword("field") - << fieldName_ << token::END_STATEMENT << nl; - os.writeKeyword("interpolationScheme") - << interpolationScheme_ << token::END_STATEMENT << nl; + writeEntry(os, "field", fieldName_); + writeEntry(os, "interpolationScheme", interpolationScheme_); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.C index ab7a58ffd8..72533c1f6e 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -268,8 +268,7 @@ Foam::codedFixedValueFvPatchField::redirectPatchField() const // Make sure to construct the patchfield with up-to-date value OStringStream os; - os.writeKeyword("type") << name_ << token::END_STATEMENT - << nl; + writeEntry(os, "type", name_); static_cast&>(*this).writeEntry("value", os); IStringStream is(os.str()); dictionary dict(is); diff --git a/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItemIO.C b/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItemIO.C index b08abbe525..d94c82c80b 100644 --- a/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItemIO.C +++ b/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItemIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -117,24 +117,17 @@ Foam::Ostream& Foam::functionObjects::operator<< os << faItem.fieldName_ << nl << token::BEGIN_BLOCK << nl; - os.writeKeyword("mean") - << faItem.mean_ << token::END_STATEMENT << nl; - - os.writeKeyword("prime2Mean") - << faItem.prime2Mean_ << token::END_STATEMENT << nl; - - os.writeKeyword("base") - << faItem.baseTypeNames_[faItem.base_] << token::END_STATEMENT << nl; + writeEntry(os, "mean", faItem.mean_); + writeEntry(os, "prime2Mean", faItem.prime2Mean_); + writeEntry(os, "base", faItem.baseTypeNames_[faItem.base_]); if (faItem.window_ > 0) { - os.writeKeyword("window") - << faItem.window_ << token::END_STATEMENT << nl; + writeEntry(os, "window", faItem.window_); if (faItem.windowName_ != "") { - os.writeKeyword("windowName") - << faItem.windowName_ << token::END_STATEMENT << nl; + writeEntry(os, "windowName", faItem.windowName_); } } diff --git a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C index c6ad41eb8a..2915463c0b 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -179,16 +179,11 @@ void angularOscillatingDisplacementPointPatchVectorField::write ) const { pointPatchField::write(os); - os.writeKeyword("axis") - << axis_ << token::END_STATEMENT << nl; - os.writeKeyword("origin") - << origin_ << token::END_STATEMENT << nl; - os.writeKeyword("angle0") - << angle0_ << token::END_STATEMENT << nl; - os.writeKeyword("amplitude") - << amplitude_ << token::END_STATEMENT << nl; - os.writeKeyword("omega") - << omega_ << token::END_STATEMENT << nl; + Foam::writeEntry(os, "axis", axis_); + Foam::writeEntry(os, "origin", origin_); + Foam::writeEntry(os, "angle0", angle0_); + Foam::writeEntry(os, "amplitude", amplitude_); + Foam::writeEntry(os, "omega", omega_); p0_.writeEntry("p0", os); writeEntry("value", os); } diff --git a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.C index 191b58a6aa..4cd44c2bb8 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -184,16 +184,11 @@ void angularOscillatingVelocityPointPatchVectorField::write ) const { pointPatchField::write(os); - os.writeKeyword("axis") - << axis_ << token::END_STATEMENT << nl; - os.writeKeyword("origin") - << origin_ << token::END_STATEMENT << nl; - os.writeKeyword("angle0") - << angle0_ << token::END_STATEMENT << nl; - os.writeKeyword("amplitude") - << amplitude_ << token::END_STATEMENT << nl; - os.writeKeyword("omega") - << omega_ << token::END_STATEMENT << nl; + Foam::writeEntry(os, "axis", axis_); + Foam::writeEntry(os, "origin", origin_); + Foam::writeEntry(os, "angle0", angle0_); + Foam::writeEntry(os, "amplitude", amplitude_); + Foam::writeEntry(os, "omega", omega_); p0_.writeEntry("p0", os); writeEntry("value", os); } diff --git a/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.C index 201b058a3d..a2cc2802b2 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -117,10 +117,8 @@ void oscillatingDisplacementPointPatchVectorField::updateCoeffs() void oscillatingDisplacementPointPatchVectorField::write(Ostream& os) const { pointPatchField::write(os); - os.writeKeyword("amplitude") - << amplitude_ << token::END_STATEMENT << nl; - os.writeKeyword("omega") - << omega_ << token::END_STATEMENT << nl; + Foam::writeEntry(os, "amplitude", amplitude_); + Foam::writeEntry(os, "omega", omega_); writeEntry("value", os); } diff --git a/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.C index d82f768a01..1e1316672c 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -160,10 +160,8 @@ void oscillatingVelocityPointPatchVectorField::updateCoeffs() void oscillatingVelocityPointPatchVectorField::write(Ostream& os) const { pointPatchField::write(os); - os.writeKeyword("amplitude") - << amplitude_ << token::END_STATEMENT << nl; - os.writeKeyword("omega") - << omega_ << token::END_STATEMENT << nl; + Foam::writeEntry(os, "amplitude", amplitude_); + Foam::writeEntry(os, "omega", omega_); p0_.writeEntry("p0", os); writeEntry("value", os); } diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C index 47c5daf027..cf2edc6de6 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -472,20 +472,14 @@ void surfaceDisplacementPointPatchVectorField::updateCoeffs() void surfaceDisplacementPointPatchVectorField::write(Ostream& os) const { fixedValuePointPatchVectorField::write(os); - os.writeKeyword("velocity") << velocity_ - << token::END_STATEMENT << nl; - os.writeKeyword("geometry") << surfacesDict_ - << token::END_STATEMENT << nl; - os.writeKeyword("projectMode") << projectModeNames_[projectMode_] - << token::END_STATEMENT << nl; - os.writeKeyword("projectDirection") << projectDir_ - << token::END_STATEMENT << nl; - os.writeKeyword("wedgePlane") << wedgePlane_ - << token::END_STATEMENT << nl; + Foam::writeEntry(os, "velocity", velocity_); + Foam::writeEntry(os, "geometry", surfacesDict_); + Foam::writeEntry(os, "projectMode", projectModeNames_[projectMode_]); + Foam::writeEntry(os, "projectDirection", projectDir_); + Foam::writeEntry(os, "wedgePlane", wedgePlane_); if (frozenPointsZone_ != word::null) { - os.writeKeyword("frozenPointsZone") << frozenPointsZone_ - << token::END_STATEMENT << nl; + Foam::writeEntry(os, "frozenPointsZone", frozenPointsZone_); } } diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C index 2e26f7fe79..fd4fe30874 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -431,18 +431,13 @@ void surfaceSlipDisplacementPointPatchVectorField::evaluate void surfaceSlipDisplacementPointPatchVectorField::write(Ostream& os) const { pointPatchVectorField::write(os); - os.writeKeyword("geometry") << surfacesDict_ - << token::END_STATEMENT << nl; - os.writeKeyword("projectMode") << projectModeNames_[projectMode_] - << token::END_STATEMENT << nl; - os.writeKeyword("projectDirection") << projectDir_ - << token::END_STATEMENT << nl; - os.writeKeyword("wedgePlane") << wedgePlane_ - << token::END_STATEMENT << nl; + writeEntry(os, "geometry", surfacesDict_); + writeEntry(os, "projectMode", projectModeNames_[projectMode_]); + writeEntry(os, "projectDirection", projectDir_); + writeEntry(os, "wedgePlane", wedgePlane_); if (frozenPointsZone_ != word::null) { - os.writeKeyword("frozenPointsZone") << frozenPointsZone_ - << token::END_STATEMENT << nl; + writeEntry(os, "frozenPointsZone", frozenPointsZone_); } } diff --git a/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.C index 093982ed27..93bfaae726 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -121,12 +121,9 @@ void Foam::waveDisplacementPointPatchVectorField::updateCoeffs() void Foam::waveDisplacementPointPatchVectorField::write(Ostream& os) const { pointPatchField::write(os); - os.writeKeyword("amplitude") - << amplitude_ << token::END_STATEMENT << nl; - os.writeKeyword("omega") - << omega_ << token::END_STATEMENT << nl; - os.writeKeyword("waveNumber") - << waveNumber_ << token::END_STATEMENT << nl; + Foam::writeEntry(os, "amplitude", amplitude_); + Foam::writeEntry(os, "omega", omega_); + Foam::writeEntry(os, "waveNumber", waveNumber_); writeEntry("value", os); } diff --git a/src/genericPatchFields/genericPointPatchField/genericPointPatchField.C b/src/genericPatchFields/genericPointPatchField/genericPointPatchField.C index 18ad182321..353f13251e 100644 --- a/src/genericPatchFields/genericPointPatchField/genericPointPatchField.C +++ b/src/genericPatchFields/genericPointPatchField/genericPointPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -560,7 +560,7 @@ void Foam::genericPointPatchField::rmap template void Foam::genericPointPatchField::write(Ostream& os) const { - os.writeKeyword("type") << actualTypeName_ << token::END_STATEMENT << nl; + writeEntry(os, "type", actualTypeName_); forAllConstIter(dictionary, dict_, iter) { diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C index 86241cd5fd..69ba77264e 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -112,8 +112,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const phaseProperties& pp) forAll(pp.names_, cmptI) { - os.writeKeyword(pp.names_[cmptI]) << pp.Y_[cmptI] - << token::END_STATEMENT << nl; + writeEntry(os, pp.names_[cmptI], pp.Y_[cmptI]); } os << decrIndent << token::END_BLOCK << nl; diff --git a/src/lagrangian/intermediate/submodels/CloudSubModelBase.C b/src/lagrangian/intermediate/submodels/CloudSubModelBase.C index be5e22a7f5..9625c16be1 100644 --- a/src/lagrangian/intermediate/submodels/CloudSubModelBase.C +++ b/src/lagrangian/intermediate/submodels/CloudSubModelBase.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -126,9 +126,7 @@ bool Foam::CloudSubModelBase::writeTime() const template void Foam::CloudSubModelBase::write(Ostream& os) const { - os.writeKeyword("owner") << owner_.name() << token::END_STATEMENT - << nl; - + writeEntry(os, "owner", owner_.name()); subModelBase::write(os); } diff --git a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C index 162af42a71..6b42715463 100644 --- a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C +++ b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -183,10 +183,8 @@ template void Foam::DispersionRASModel::write(Ostream& os) const { DispersionModel::write(os); - - os.writeKeyword("ownK") << ownK_ << token::END_STATEMENT << endl; - os.writeKeyword("ownEpsilon") << ownEpsilon_ << token::END_STATEMENT - << endl; + writeEntry(os, "ownK", ownK_); + writeEntry(os, "ownEpsilon", ownEpsilon_); } diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C index 386c24d1bc..0256e54a1e 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -471,9 +471,7 @@ bool Foam::cyclicACMIPolyPatch::order void Foam::cyclicACMIPolyPatch::write(Ostream& os) const { cyclicAMIPolyPatch::write(os); - - os.writeKeyword("nonOverlapPatch") << nonOverlapPatchName_ - << token::END_STATEMENT << nl; + Foam::writeEntry(os, "nonOverlapPatch", nonOverlapPatchName_); } diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C index 2ad6a5addb..97b1977bb4 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1201,8 +1201,7 @@ void Foam::cyclicAMIPolyPatch::write(Ostream& os) const coupledPolyPatch::write(os); if (!nbrPatchName_.empty()) { - os.writeKeyword("neighbourPatch") << nbrPatchName_ - << token::END_STATEMENT << nl; + Foam::writeEntry(os, "neighbourPatch", nbrPatchName_); } coupleGroup_.write(os); @@ -1210,23 +1209,19 @@ void Foam::cyclicAMIPolyPatch::write(Ostream& os) const { case ROTATIONAL: { - os.writeKeyword("rotationAxis") << rotationAxis_ - << token::END_STATEMENT << nl; - os.writeKeyword("rotationCentre") << rotationCentre_ - << token::END_STATEMENT << nl; + Foam::writeEntry(os, "rotationAxis", rotationAxis_); + Foam::writeEntry(os, "rotationCentre", rotationCentre_); if (rotationAngleDefined_) { - os.writeKeyword("rotationAngle") << radToDeg(rotationAngle_) - << token::END_STATEMENT << nl; + Foam::writeEntry(os, "rotationAngle", radToDeg(rotationAngle_)); } break; } case TRANSLATIONAL: { - os.writeKeyword("separationVector") << separationVector_ - << token::END_STATEMENT << nl; + Foam::writeEntry(os, "separationVector", separationVector_); break; } case NOORDERING: @@ -1241,19 +1236,20 @@ void Foam::cyclicAMIPolyPatch::write(Ostream& os) const if (AMIReverse_) { - os.writeKeyword("flipNormals") << AMIReverse_ - << token::END_STATEMENT << nl; + Foam::writeEntry(os, "flipNormals", AMIReverse_); } if (AMILowWeightCorrection_ > 0) { - os.writeKeyword("lowWeightCorrection") << AMILowWeightCorrection_ - << token::END_STATEMENT << nl; + Foam::writeEntry(os, "lowWeightCorrection", AMILowWeightCorrection_); } - os.writeKeyword("method") - << AMIInterpolation::interpolationMethodToWord(AMIMethod_) - << token::END_STATEMENT << nl; + Foam::writeEntry + ( + os, + "method", + AMIInterpolation::interpolationMethodToWord(AMIMethod_) + ); if (!surfDict_.empty()) { diff --git a/src/meshTools/AMIInterpolation/patches/cyclicRepeatAMI/cyclicRepeatAMIPolyPatch/cyclicRepeatAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicRepeatAMI/cyclicRepeatAMIPolyPatch/cyclicRepeatAMIPolyPatch.C index 64031e1947..8442ed573d 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicRepeatAMI/cyclicRepeatAMIPolyPatch/cyclicRepeatAMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicRepeatAMI/cyclicRepeatAMIPolyPatch/cyclicRepeatAMIPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -488,9 +488,7 @@ Foam::cyclicRepeatAMIPolyPatch::neighbWeightsSum() const void Foam::cyclicRepeatAMIPolyPatch::write(Ostream& os) const { cyclicAMIPolyPatch::write(os); - - os.writeKeyword("transformPatch") << transformPatchName_ - << token::END_STATEMENT << nl; + Foam::writeEntry(os, "transformPatch", transformPatchName_); } diff --git a/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.C index 598c6038ba..0dbc77dc75 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -276,9 +276,9 @@ Foam::EulerCoordinateRotation::EulerCoordinateRotation void Foam::EulerCoordinateRotation::write(Ostream& os) const { - os.writeKeyword("e1") << e1() << token::END_STATEMENT << nl; - os.writeKeyword("e2") << e2() << token::END_STATEMENT << nl; - os.writeKeyword("e3") << e3() << token::END_STATEMENT << nl; + writeEntry(os, "e1", e1()); + writeEntry(os, "e2", e2()); + writeEntry(os, "e3", e3()); } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C index cb79bc9be3..2a2d948cfc 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -273,9 +273,9 @@ Foam::STARCDCoordinateRotation::STARCDCoordinateRotation void Foam::STARCDCoordinateRotation::write(Ostream& os) const { - os.writeKeyword("e1") << e1() << token::END_STATEMENT << nl; - os.writeKeyword("e2") << e2() << token::END_STATEMENT << nl; - os.writeKeyword("e3") << e3() << token::END_STATEMENT << nl; + writeEntry(os, "e1", e1()); + writeEntry(os, "e2", e2()); + writeEntry(os, "e3", e3()); } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.C index dacadc16d7..444114970d 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -298,9 +298,9 @@ void Foam::axesRotation::operator=(const dictionary& dict) void Foam::axesRotation::write(Ostream& os) const { - os.writeKeyword("e1") << e1() << token::END_STATEMENT << nl; - os.writeKeyword("e2") << e2() << token::END_STATEMENT << nl; - os.writeKeyword("e3") << e3() << token::END_STATEMENT << nl; + writeEntry(os, "e1", e1()); + writeEntry(os, "e2", e2()); + writeEntry(os, "e3", e3()); } diff --git a/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.C b/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.C index dfec0e75b5..e2cfafac4d 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -351,7 +351,7 @@ Foam::symmTensor Foam::cylindrical::transformVector void Foam::cylindrical::write(Ostream& os) const { - os.writeKeyword("e3") << e3() << token::END_STATEMENT << nl; + writeEntry(os, "e3", e3()); } diff --git a/src/meshTools/coordinateSystems/coordinateSystem.C b/src/meshTools/coordinateSystems/coordinateSystem.C index 58bd8d14e2..303d290646 100644 --- a/src/meshTools/coordinateSystems/coordinateSystem.C +++ b/src/meshTools/coordinateSystems/coordinateSystem.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -301,16 +301,16 @@ void Foam::coordinateSystem::writeDict(Ostream& os, bool subDict) const << indent << token::BEGIN_BLOCK << incrIndent << nl; } - os.writeKeyword("type") << type() << token::END_STATEMENT << nl; + writeEntry(os, "type", type()); // The note entry is optional if (note_.size()) { - os.writeKeyword("note") << note_ << token::END_STATEMENT << nl; + writeEntry(os, "note", note_); } - os.writeKeyword("origin") << origin_ << token::END_STATEMENT << nl; + writeEntry(os, "origin", origin_); R_->write(os); if (subDict) diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C index 34f3e4a343..fd6ab4b29f 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1390,17 +1390,14 @@ Foam::pointIndexHit Foam::mappedPatchBase::facePoint void Foam::mappedPatchBase::write(Ostream& os) const { - os.writeKeyword("sampleMode") << sampleModeNames_[mode_] - << token::END_STATEMENT << nl; + writeEntry(os, "sampleMode", sampleModeNames_[mode_]); if (!sampleRegion_.empty()) { - os.writeKeyword("sampleRegion") << sampleRegion_ - << token::END_STATEMENT << nl; + writeEntry(os, "sampleRegion", sampleRegion_); } if (!samplePatch_.empty()) { - os.writeKeyword("samplePatch") << samplePatch_ - << token::END_STATEMENT << nl; + writeEntry(os, "samplePatch", samplePatch_); } coupleGroup_.write(os); @@ -1415,15 +1412,13 @@ void Foam::mappedPatchBase::write(Ostream& os) const } else { - os.writeKeyword("offsetMode") << offsetModeNames_[offsetMode_] - << token::END_STATEMENT << nl; + writeEntry(os, "offsetMode", offsetModeNames_[offsetMode_]); switch (offsetMode_) { case UNIFORM: { - os.writeKeyword("offset") << offset_ << token::END_STATEMENT - << nl; + writeEntry(os, "offset", offset_); break; } case NONUNIFORM: @@ -1433,8 +1428,7 @@ void Foam::mappedPatchBase::write(Ostream& os) const } case NORMAL: { - os.writeKeyword("distance") << distance_ << token::END_STATEMENT - << nl; + writeEntry(os, "distance", distance_); break; } } @@ -1443,8 +1437,7 @@ void Foam::mappedPatchBase::write(Ostream& os) const { if (AMIReverse_) { - os.writeKeyword("flipNormals") << AMIReverse_ - << token::END_STATEMENT << nl; + writeEntry(os, "flipNormals", AMIReverse_); } if (!surfDict_.empty()) diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedVariableThicknessWallPolyPatch.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedVariableThicknessWallPolyPatch.C index 70e0b458e8..aa2fd183ca 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedVariableThicknessWallPolyPatch.C +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedVariableThicknessWallPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -167,7 +167,7 @@ Foam::mappedVariableThicknessWallPolyPatch:: void Foam::mappedVariableThicknessWallPolyPatch:: write(Foam::Ostream& os) const { - os.writeKeyword("thickness") << thickness_ << token::END_STATEMENT << nl; + Foam::writeEntry(os, "thickness", thickness_); } diff --git a/src/meshTools/regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBase.C b/src/meshTools/regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBase.C index 482e1e0f5e..be46c5cc7b 100644 --- a/src/meshTools/regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBase.C +++ b/src/meshTools/regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBase.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -331,15 +331,12 @@ bool Foam::regionCoupledBase::order void Foam::regionCoupledBase::write(Ostream& os) const { - os.writeKeyword("neighbourPatch") << nbrPatchName_ - << token::END_STATEMENT << nl; - os.writeKeyword("neighbourRegion") << nbrRegionName_ - << token::END_STATEMENT << nl; + writeEntry(os, "neighbourPatch", nbrPatchName_); + writeEntry(os, "neighbourRegion", nbrRegionName_); if (AMIReverse_) { - os.writeKeyword("flipNormals") << AMIReverse_ - << token::END_STATEMENT << nl; + writeEntry(os, "flipNormals", AMIReverse_); } if (!surfDict_.empty()) diff --git a/src/rigidBodyDynamics/bodies/cuboid/cuboid.C b/src/rigidBodyDynamics/bodies/cuboid/cuboid.C index 826cb7f480..c59fddf833 100644 --- a/src/rigidBodyDynamics/bodies/cuboid/cuboid.C +++ b/src/rigidBodyDynamics/bodies/cuboid/cuboid.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,14 +62,11 @@ Foam::RBD::cuboid::~cuboid() void Foam::RBD::cuboid::write(Ostream& os) const { - os.writeKeyword("type") - << type() << token::END_STATEMENT << nl; + writeEntry(os, "type", type()); - os.writeKeyword("mass") - << m() << token::END_STATEMENT << nl; + writeEntry(os, "mass", m()); - os.writeKeyword("L") - << L() << token::END_STATEMENT << nl; + writeEntry(os, "L", L()); } diff --git a/src/rigidBodyDynamics/bodies/masslessBody/masslessBody.C b/src/rigidBodyDynamics/bodies/masslessBody/masslessBody.C index 18f32e509b..8c70c9fd40 100644 --- a/src/rigidBodyDynamics/bodies/masslessBody/masslessBody.C +++ b/src/rigidBodyDynamics/bodies/masslessBody/masslessBody.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -68,8 +68,7 @@ bool Foam::RBD::masslessBody::massless() const void Foam::RBD::masslessBody::write(Ostream& os) const { - os.writeKeyword("type") - << type() << token::END_STATEMENT << nl; + writeEntry(os, "type", type()); } diff --git a/src/rigidBodyDynamics/bodies/rigidBody/rigidBody.C b/src/rigidBodyDynamics/bodies/rigidBody/rigidBody.C index 1b15628606..ba674a1b4c 100644 --- a/src/rigidBodyDynamics/bodies/rigidBody/rigidBody.C +++ b/src/rigidBodyDynamics/bodies/rigidBody/rigidBody.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -119,17 +119,13 @@ void Foam::RBD::rigidBody::merge(const subBody& subBody) void Foam::RBD::rigidBody::write(Ostream& os) const { - os.writeKeyword("type") - << type() << token::END_STATEMENT << nl; + writeEntry(os, "type", type()); - os.writeKeyword("mass") - << m() << token::END_STATEMENT << nl; + writeEntry(os, "mass", m()); - os.writeKeyword("centreOfMass") - << c() << token::END_STATEMENT << nl; + writeEntry(os, "centreOfMass", c()); - os.writeKeyword("inertia") - << Ic() << token::END_STATEMENT << nl; + writeEntry(os, "inertia", Ic()); } diff --git a/src/rigidBodyDynamics/bodies/sphere/sphere.C b/src/rigidBodyDynamics/bodies/sphere/sphere.C index 292d33dc04..433e5ef809 100644 --- a/src/rigidBodyDynamics/bodies/sphere/sphere.C +++ b/src/rigidBodyDynamics/bodies/sphere/sphere.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,14 +62,11 @@ Foam::RBD::sphere::~sphere() void Foam::RBD::sphere::write(Ostream& os) const { - os.writeKeyword("type") - << type() << token::END_STATEMENT << nl; + writeEntry(os, "type", type()); - os.writeKeyword("mass") - << m() << token::END_STATEMENT << nl; + writeEntry(os, "mass", m()); - os.writeKeyword("radius") - << r() << token::END_STATEMENT << nl; + writeEntry(os, "radius", r()); } diff --git a/src/rigidBodyDynamics/bodies/subBody/subBody.C b/src/rigidBodyDynamics/bodies/subBody/subBody.C index c46a7edf50..b2685e3527 100644 --- a/src/rigidBodyDynamics/bodies/subBody/subBody.C +++ b/src/rigidBodyDynamics/bodies/subBody/subBody.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,11 +29,9 @@ License void Foam::RBD::subBody::write(Ostream& os) const { - os.writeKeyword("master") - << masterName_ << token::END_STATEMENT << nl; + writeEntry(os, "master", masterName_); - os.writeKeyword("transform") - << masterXT_ << token::END_STATEMENT << nl; + writeEntry(os, "transform", masterXT_); } diff --git a/src/rigidBodyDynamics/joints/Pa/Pa.C b/src/rigidBodyDynamics/joints/Pa/Pa.C index 281c3d376c..2512ea50cc 100644 --- a/src/rigidBodyDynamics/joints/Pa/Pa.C +++ b/src/rigidBodyDynamics/joints/Pa/Pa.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -97,8 +97,7 @@ void Foam::RBD::joints::Pa::jcalc void Foam::RBD::joints::Pa::write(Ostream& os) const { joint::write(os); - os.writeKeyword("axis") - << S_[0].l() << token::END_STATEMENT << nl; + writeEntry(os, "axis", S_[0].l()); } diff --git a/src/rigidBodyDynamics/joints/Ra/Ra.C b/src/rigidBodyDynamics/joints/Ra/Ra.C index 908d017f40..6f964939cd 100644 --- a/src/rigidBodyDynamics/joints/Ra/Ra.C +++ b/src/rigidBodyDynamics/joints/Ra/Ra.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -97,8 +97,7 @@ void Foam::RBD::joints::Ra::jcalc void Foam::RBD::joints::Ra::write(Ostream& os) const { joint::write(os); - os.writeKeyword("axis") - << S_[0].w() << token::END_STATEMENT << nl; + writeEntry(os, "axis", S_[0].w()); } diff --git a/src/rigidBodyDynamics/joints/joint/joint.C b/src/rigidBodyDynamics/joints/joint/joint.C index d3565961a7..47338e19ab 100644 --- a/src/rigidBodyDynamics/joints/joint/joint.C +++ b/src/rigidBodyDynamics/joints/joint/joint.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -81,7 +81,7 @@ Foam::RBD::joint::~joint() void Foam::RBD::joint::write(Ostream& os) const { - os.writeKeyword("type") << type() << token::END_STATEMENT << nl; + writeEntry(os, "type", type()); } diff --git a/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C b/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C index d9fb4eeced..a4ca22060f 100644 --- a/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C +++ b/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -184,17 +184,13 @@ void Foam::RBD::restraints::linearAxialAngularSpring::write { restraint::write(os); - os.writeKeyword("referenceOrientation") - << refQ_ << token::END_STATEMENT << nl; + writeEntry(os, "referenceOrientation", refQ_); - os.writeKeyword("axis") - << axis_ << token::END_STATEMENT << nl; + writeEntry(os, "axis", axis_); - os.writeKeyword("stiffness") - << stiffness_ << token::END_STATEMENT << nl; + writeEntry(os, "stiffness", stiffness_); - os.writeKeyword("damping") - << damping_ << token::END_STATEMENT << nl; + writeEntry(os, "damping", damping_); } diff --git a/src/rigidBodyDynamics/restraints/linearDamper/linearDamper.C b/src/rigidBodyDynamics/restraints/linearDamper/linearDamper.C index be7445891d..dbb5f22920 100644 --- a/src/rigidBodyDynamics/restraints/linearDamper/linearDamper.C +++ b/src/rigidBodyDynamics/restraints/linearDamper/linearDamper.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -109,8 +109,7 @@ void Foam::RBD::restraints::linearDamper::write { restraint::write(os); - os.writeKeyword("coeff") - << coeff_ << token::END_STATEMENT << nl; + writeEntry(os, "coeff", coeff_); } diff --git a/src/rigidBodyDynamics/restraints/linearSpring/linearSpring.C b/src/rigidBodyDynamics/restraints/linearSpring/linearSpring.C index fbf21cbf8c..dc0a1cdfee 100644 --- a/src/rigidBodyDynamics/restraints/linearSpring/linearSpring.C +++ b/src/rigidBodyDynamics/restraints/linearSpring/linearSpring.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -134,20 +134,15 @@ void Foam::RBD::restraints::linearSpring::write { restraint::write(os); - os.writeKeyword("anchor") - << anchor_ << token::END_STATEMENT << nl; + writeEntry(os, "anchor", anchor_); - os.writeKeyword("refAttachmentPt") - << refAttachmentPt_ << token::END_STATEMENT << nl; + writeEntry(os, "refAttachmentPt", refAttachmentPt_); - os.writeKeyword("stiffness") - << stiffness_ << token::END_STATEMENT << nl; + writeEntry(os, "stiffness", stiffness_); - os.writeKeyword("damping") - << damping_ << token::END_STATEMENT << nl; + writeEntry(os, "damping", damping_); - os.writeKeyword("restLength") - << restLength_ << token::END_STATEMENT << nl; + writeEntry(os, "restLength", restLength_); } diff --git a/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraint.C b/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraint.C index e7ad06d31f..e2b13ea2fd 100644 --- a/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraint.C +++ b/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraint.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -78,10 +78,8 @@ bool Foam::RBD::restraint::read(const dictionary& dict) void Foam::RBD::restraint::write(Ostream& os) const { - os.writeKeyword("type") - << type() << token::END_STATEMENT << nl; - os.writeKeyword("body") - << model_.name(bodyID_) << token::END_STATEMENT << nl; + writeEntry(os, "type", type()); + writeEntry(os, "body", model_.name(bodyID_)); } diff --git a/src/rigidBodyDynamics/restraints/sphericalAngularDamper/sphericalAngularDamper.C b/src/rigidBodyDynamics/restraints/sphericalAngularDamper/sphericalAngularDamper.C index a7904ae919..c60cef599d 100644 --- a/src/rigidBodyDynamics/restraints/sphericalAngularDamper/sphericalAngularDamper.C +++ b/src/rigidBodyDynamics/restraints/sphericalAngularDamper/sphericalAngularDamper.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -109,7 +109,7 @@ void Foam::RBD::restraints::sphericalAngularDamper::write { restraint::write(os); - os.writeKeyword("coeff") << coeff_ << token::END_STATEMENT << nl; + writeEntry(os, "coeff", coeff_); } diff --git a/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.C b/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.C index 226f150f5e..c29efdb7ea 100644 --- a/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.C +++ b/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -401,14 +401,10 @@ void Foam::RBD::rigidBodyModel::write(Ostream& os) const bodies_[i].write(os); - os.writeKeyword("parent") - << bodies_[lambda_[i]].name() << token::END_STATEMENT << nl; - - os.writeKeyword("transform") - << XT_[i] << token::END_STATEMENT << nl; + writeEntry(os, "parent", bodies_[lambda_[i]].name()); + writeEntry(os, "transform", XT_[i]); os << indent << "joint" << nl << joints_[i] << endl; - os << decrIndent << indent << token::END_BLOCK << endl; } } @@ -421,11 +417,9 @@ void Foam::RBD::rigidBodyModel::write(Ostream& os) const mergedBodies_[i].body().write(os); - os.writeKeyword("transform") - << mergedBodies_[i].masterXT() << token::END_STATEMENT << nl; + writeEntry(os, "transform", mergedBodies_[i].masterXT()); - os.writeKeyword("mergeWith") - << mergedBodies_[i].masterName() << token::END_STATEMENT << nl; + writeEntry(os, "mergeWith", mergedBodies_[i].masterName()); os << decrIndent << indent << token::END_BLOCK << endl; } diff --git a/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelStateIO.C b/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelStateIO.C index df52446836..07106b6772 100644 --- a/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelStateIO.C +++ b/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelStateIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,11 +40,11 @@ void Foam::RBD::rigidBodyModelState::write(dictionary& dict) const void Foam::RBD::rigidBodyModelState::write(Ostream& os) const { - os.writeKeyword("q") << q_ << token::END_STATEMENT << nl; - os.writeKeyword("qDot") << qDot_ << token::END_STATEMENT << nl; - os.writeKeyword("qDdot") << qDdot_ << token::END_STATEMENT << nl; - os.writeKeyword("t") << t_ << token::END_STATEMENT << nl; - os.writeKeyword("deltaT") << deltaT_ << token::END_STATEMENT << nl; + writeEntry(os, "q", q_); + writeEntry(os, "qDot", qDot_); + writeEntry(os, "qDdot", qDdot_); + writeEntry(os, "t", t_); + writeEntry(os, "deltaT", deltaT_); } diff --git a/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotionIO.C b/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotionIO.C index f709db4c76..e5daa1f007 100644 --- a/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotionIO.C +++ b/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotionIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,12 +44,9 @@ void Foam::RBD::rigidBodyMotion::write(Ostream& os) const { rigidBodyModel::write(os); - os.writeKeyword("accelerationRelaxation") - << aRelax_ << token::END_STATEMENT << nl; - os.writeKeyword("accelerationDamping") - << aDamp_ << token::END_STATEMENT << nl; - os.writeKeyword("report") - << report_ << token::END_STATEMENT << nl; + writeEntry(os, "accelerationRelaxation", aRelax_); + writeEntry(os, "accelerationDamping", aDamp_); + writeEntry(os, "report", report_); } diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/axis/sixDoFRigidBodyMotionAxisConstraint.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/axis/sixDoFRigidBodyMotionAxisConstraint.C index 869ef0b861..62bffd186c 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/axis/sixDoFRigidBodyMotionAxisConstraint.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/axis/sixDoFRigidBodyMotionAxisConstraint.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -116,8 +116,7 @@ void Foam::sixDoFRigidBodyMotionConstraints::axis::write Ostream& os ) const { - os.writeKeyword("axis") - << axis_ << token::END_STATEMENT << nl; + writeEntry(os, "axis", axis_); } // ************************************************************************* // diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/line/sixDoFRigidBodyMotionLineConstraint.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/line/sixDoFRigidBodyMotionLineConstraint.C index fc07746663..9e3ea4e3d3 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/line/sixDoFRigidBodyMotionLineConstraint.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/line/sixDoFRigidBodyMotionLineConstraint.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -130,10 +130,8 @@ void Foam::sixDoFRigidBodyMotionConstraints::line::write Ostream& os ) const { - os.writeKeyword("centreOfRotation") - << centreOfRotation_ << token::END_STATEMENT << nl; - os.writeKeyword("direction") - << direction_ << token::END_STATEMENT << nl; + writeEntry(os, "centreOfRotation", centreOfRotation_); + writeEntry(os, "direction", direction_); } // ************************************************************************* // diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/plane/sixDoFRigidBodyMotionPlaneConstraint.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/plane/sixDoFRigidBodyMotionPlaneConstraint.C index 927976d510..238af0d43b 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/plane/sixDoFRigidBodyMotionPlaneConstraint.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/plane/sixDoFRigidBodyMotionPlaneConstraint.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -117,10 +117,8 @@ void Foam::sixDoFRigidBodyMotionConstraints::plane::write Ostream& os ) const { - os.writeKeyword("centreOfRotation") - << centreOfRotation_ << token::END_STATEMENT << nl; - os.writeKeyword("normal") - << normal_ << token::END_STATEMENT << nl; + writeEntry(os, "centreOfRotation", centreOfRotation_); + writeEntry(os, "normal", normal_); } // ************************************************************************* // diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/point/sixDoFRigidBodyMotionPointConstraint.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/point/sixDoFRigidBodyMotionPointConstraint.C index ffaef54c4d..ddc6ce6a80 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/point/sixDoFRigidBodyMotionPointConstraint.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/point/sixDoFRigidBodyMotionPointConstraint.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -116,8 +116,7 @@ void Foam::sixDoFRigidBodyMotionConstraints::point::write Ostream& os ) const { - os.writeKeyword("centreOfRotation") - << centreOfRotation_ << token::END_STATEMENT << nl; + writeEntry(os, "centreOfRotation", centreOfRotation_); } // ************************************************************************* // diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C index 4762c66846..583a1236c5 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -186,17 +186,13 @@ void Foam::sixDoFRigidBodyMotionRestraints::linearAxialAngularSpring::write Ostream& os ) const { - os.writeKeyword("referenceOrientation") - << refQ_ << token::END_STATEMENT << nl; + writeEntry(os, "referenceOrientation", refQ_); - os.writeKeyword("axis") - << axis_ << token::END_STATEMENT << nl; + writeEntry(os, "axis", axis_); - os.writeKeyword("stiffness") - << stiffness_ << token::END_STATEMENT << nl; + writeEntry(os, "stiffness", stiffness_); - os.writeKeyword("damping") - << damping_ << token::END_STATEMENT << nl; + writeEntry(os, "damping", damping_); } // ************************************************************************* // diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearDamper/linearDamper.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearDamper/linearDamper.C index 69974d173b..166efb6538 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearDamper/linearDamper.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearDamper/linearDamper.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -105,8 +105,7 @@ void Foam::sixDoFRigidBodyMotionRestraints::linearDamper::write Ostream& os ) const { - os.writeKeyword("coeff") - << coeff_ << token::END_STATEMENT << nl; + writeEntry(os, "coeff", coeff_); } diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearSpring/linearSpring.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearSpring/linearSpring.C index fe08004bf2..7eeddfed92 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearSpring/linearSpring.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearSpring/linearSpring.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -125,20 +125,15 @@ void Foam::sixDoFRigidBodyMotionRestraints::linearSpring::write Ostream& os ) const { - os.writeKeyword("anchor") - << anchor_ << token::END_STATEMENT << nl; + writeEntry(os, "anchor", anchor_); - os.writeKeyword("refAttachmentPt") - << refAttachmentPt_ << token::END_STATEMENT << nl; + writeEntry(os, "refAttachmentPt", refAttachmentPt_); - os.writeKeyword("stiffness") - << stiffness_ << token::END_STATEMENT << nl; + writeEntry(os, "stiffness", stiffness_); - os.writeKeyword("damping") - << damping_ << token::END_STATEMENT << nl; + writeEntry(os, "damping", damping_); - os.writeKeyword("restLength") - << restLength_ << token::END_STATEMENT << nl; + writeEntry(os, "restLength", restLength_); } // ************************************************************************* // diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularDamper/sphericalAngularDamper.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularDamper/sphericalAngularDamper.C index d62cf79d8d..82e47668bb 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularDamper/sphericalAngularDamper.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularDamper/sphericalAngularDamper.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -107,7 +107,7 @@ void Foam::sixDoFRigidBodyMotionRestraints::sphericalAngularDamper::write Ostream& os ) const { - os.writeKeyword("coeff") << coeff_ << token::END_STATEMENT << nl; + writeEntry(os, "coeff", coeff_); } diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularSpring/sphericalAngularSpring.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularSpring/sphericalAngularSpring.C index 889ae9779d..35df6425b4 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularSpring/sphericalAngularSpring.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularSpring/sphericalAngularSpring.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -145,12 +145,11 @@ void Foam::sixDoFRigidBodyMotionRestraints::sphericalAngularSpring::write Ostream& os ) const { - os.writeKeyword("referenceOrientation") - << refQ_ << token::END_STATEMENT << nl; + writeEntry(os, "referenceOrientation", refQ_); - os.writeKeyword("stiffness") << stiffness_ << token::END_STATEMENT << nl; + writeEntry(os, "stiffness", stiffness_); - os.writeKeyword("damping") << damping_ << token::END_STATEMENT << nl; + writeEntry(os, "damping", damping_); } diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C index a0e4b2a347..f1bcd250a6 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -205,11 +205,9 @@ void Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::write Ostream& os ) const { - os.writeKeyword("referenceOrientation") - << refQ_ << token::END_STATEMENT << nl; + writeEntry(os, "referenceOrientation", refQ_); - os.writeKeyword("axis") - << axis_ << token::END_STATEMENT << nl; + writeEntry(os, "axis", axis_); moment_.write(os); @@ -224,8 +222,7 @@ void Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::write os << "radians" << token::END_STATEMENT << nl; } - os.writeKeyword("damping") - << damping_ << token::END_STATEMENT << nl; + writeEntry(os, "damping", damping_); } diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C index 9627dc9076..11d7263d56 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -50,20 +50,13 @@ void Foam::sixDoFRigidBodyMotion::write(Ostream& os) const { motionState_.write(os); - os.writeKeyword("centreOfMass") - << initialCentreOfMass_ << token::END_STATEMENT << nl; - os.writeKeyword("initialOrientation") - << initialQ_ << token::END_STATEMENT << nl; - os.writeKeyword("mass") - << mass_ << token::END_STATEMENT << nl; - os.writeKeyword("momentOfInertia") - << momentOfInertia_ << token::END_STATEMENT << nl; - os.writeKeyword("accelerationRelaxation") - << aRelax_ << token::END_STATEMENT << nl; - os.writeKeyword("accelerationDamping") - << aDamp_ << token::END_STATEMENT << nl; - os.writeKeyword("report") - << report_ << token::END_STATEMENT << nl; + writeEntry(os, "centreOfMass", initialCentreOfMass_); + writeEntry(os, "initialOrientation", initialQ_); + writeEntry(os, "mass", mass_); + writeEntry(os, "momentOfInertia", momentOfInertia_); + writeEntry(os, "accelerationRelaxation", aRelax_); + writeEntry(os, "accelerationDamping", aDamp_); + writeEntry(os, "report", report_); if (!restraints_.empty()) { @@ -77,8 +70,7 @@ void Foam::sixDoFRigidBodyMotion::write(Ostream& os) const os << indent << restraints_[rI].name() << nl << indent << token::BEGIN_BLOCK << incrIndent << endl; - os.writeKeyword("sixDoFRigidBodyMotionRestraint") - << restraintType << token::END_STATEMENT << nl; + writeEntry(os, "sixDoFRigidBodyMotionRestraint", restraintType); restraints_[rI].write(os); @@ -100,8 +92,7 @@ void Foam::sixDoFRigidBodyMotion::write(Ostream& os) const os << indent << constraints_[rI].name() << nl << indent << token::BEGIN_BLOCK << incrIndent << endl; - os.writeKeyword("sixDoFRigidBodyMotionConstraint") - << constraintType << token::END_STATEMENT << nl; + writeEntry(os, "sixDoFRigidBodyMotionConstraint", constraintType); constraints_[rI].sixDoFRigidBodyMotionConstraint::write(os); diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionStateIO.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionStateIO.C index 0e026263f1..3e9af57c1e 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionStateIO.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionStateIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -41,18 +41,12 @@ void Foam::sixDoFRigidBodyMotionState::write(dictionary& dict) const void Foam::sixDoFRigidBodyMotionState::write(Ostream& os) const { - os.writeKeyword("centreOfRotation") - << centreOfRotation_ << token::END_STATEMENT << nl; - os.writeKeyword("orientation") - << Q_ << token::END_STATEMENT << nl; - os.writeKeyword("velocity") - << v_ << token::END_STATEMENT << nl; - os.writeKeyword("acceleration") - << a_ << token::END_STATEMENT << nl; - os.writeKeyword("angularMomentum") - << pi_ << token::END_STATEMENT << nl; - os.writeKeyword("torque") - << tau_ << token::END_STATEMENT << nl; + writeEntry(os, "centreOfRotation", centreOfRotation_); + writeEntry(os, "orientation", Q_); + writeEntry(os, "velocity", v_); + writeEntry(os, "acceleration", a_); + writeEntry(os, "angularMomentum", pi_); + writeEntry(os, "torque", tau_); } diff --git a/src/surfMesh/surfZone/surfZone/surfZone.C b/src/surfMesh/surfZone/surfZone/surfZone.C index 9586f9b542..4f513713be 100644 --- a/src/surfMesh/surfZone/surfZone/surfZone.C +++ b/src/surfMesh/surfZone/surfZone/surfZone.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -116,8 +116,8 @@ void Foam::surfZone::writeDict(Ostream& os) const << indent << token::BEGIN_BLOCK << incrIndent << nl; surfZoneIdentifier::write(os); - os.writeKeyword("nFaces") << size() << token::END_STATEMENT << nl; - os.writeKeyword("startFace") << start() << token::END_STATEMENT << nl; + writeEntry(os, "nFaces", size()); + writeEntry(os, "startFace", start()); os << decrIndent << indent << token::END_BLOCK << endl; } diff --git a/src/surfMesh/surfZone/surfZoneIdentifier/surfZoneIdentifier.C b/src/surfMesh/surfZone/surfZoneIdentifier/surfZoneIdentifier.C index 49fbbefde2..38c2133cc0 100644 --- a/src/surfMesh/surfZone/surfZoneIdentifier/surfZoneIdentifier.C +++ b/src/surfMesh/surfZone/surfZoneIdentifier/surfZoneIdentifier.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -88,8 +88,7 @@ void Foam::surfZoneIdentifier::write(Ostream& os) const { if (geometricType_.size()) { - os.writeKeyword("geometricType") << geometricType_ - << token::END_STATEMENT << nl; + writeEntry(os, "geometricType", geometricType_); } } diff --git a/src/thermophysicalModels/solidSpecie/reaction/SolidReaction/SolidReaction.C b/src/thermophysicalModels/solidSpecie/reaction/SolidReaction/SolidReaction.C index 1b0d882b4d..206a5edc3d 100644 --- a/src/thermophysicalModels/solidSpecie/reaction/SolidReaction/SolidReaction.C +++ b/src/thermophysicalModels/solidSpecie/reaction/SolidReaction/SolidReaction.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -111,8 +111,7 @@ template void Foam::SolidReaction::write(Ostream& os) const { OStringStream reaction; - os.writeKeyword("reaction") << solidReactionStr(reaction) - << token::END_STATEMENT << nl; + writeEntry(os, "reaction", solidReactionStr(reaction)); } diff --git a/src/thermophysicalModels/solidSpecie/reaction/reactionRate/solidArrheniusReactionRate/solidArrheniusReactionRateI.H b/src/thermophysicalModels/solidSpecie/reaction/reactionRate/solidArrheniusReactionRate/solidArrheniusReactionRateI.H index b1eb57eae0..a9dd9d0795 100644 --- a/src/thermophysicalModels/solidSpecie/reaction/reactionRate/solidArrheniusReactionRate/solidArrheniusReactionRateI.H +++ b/src/thermophysicalModels/solidSpecie/reaction/reactionRate/solidArrheniusReactionRate/solidArrheniusReactionRateI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -119,9 +119,9 @@ inline Foam::scalar Foam::solidArrheniusReactionRate::dcidT inline void Foam::solidArrheniusReactionRate::write(Ostream& os) const { - os.writeKeyword("A") << A_ << token::END_STATEMENT << nl; - os.writeKeyword("Ta") << Ta_ << token::END_STATEMENT << nl; - os.writeKeyword("Tcrit") << Tcrit_ << token::END_STATEMENT << nl; + writeEntry(os, "A", A_); + writeEntry(os, "Ta", Ta_); + writeEntry(os, "Tcrit", Tcrit_); } diff --git a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C index 386632da86..f3862d6f35 100644 --- a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C +++ b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -394,8 +394,7 @@ template void Foam::Reaction::write(Ostream& os) const { OStringStream reaction; - os.writeKeyword("reaction") << reactionStr(reaction) - << token::END_STATEMENT << nl; + writeEntry(os, "reaction", reactionStr(reaction)); } diff --git a/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.C b/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.C index 40d0c17dd8..33b5123cdb 100644 --- a/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.C +++ b/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -121,7 +121,7 @@ void Foam::ReactionList::write(Ostream& os) const const Reaction& r = iter(); os << indent << r.name() << nl << indent << token::BEGIN_BLOCK << incrIndent << nl; - os.writeKeyword("type") << r.type() << token::END_STATEMENT << nl; + writeEntry(os, "type", r.type()); r.write(os); os << decrIndent << indent << token::END_BLOCK << nl; } diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/ArrheniusReactionRate/ArrheniusReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/ArrheniusReactionRate/ArrheniusReactionRateI.H index 4f05bbf232..1af507b9f0 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/ArrheniusReactionRate/ArrheniusReactionRateI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/ArrheniusReactionRate/ArrheniusReactionRateI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -128,9 +128,9 @@ inline Foam::scalar Foam::ArrheniusReactionRate::dcidT inline void Foam::ArrheniusReactionRate::write(Ostream& os) const { - os.writeKeyword("A") << A_ << token::END_STATEMENT << nl; - os.writeKeyword("beta") << beta_ << token::END_STATEMENT << nl; - os.writeKeyword("Ta") << Ta_ << token::END_STATEMENT << nl; + writeEntry(os, "A", A_); + writeEntry(os, "beta", beta_); + writeEntry(os, "Ta", Ta_); } diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/LandauTellerReactionRate/LandauTellerReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/LandauTellerReactionRate/LandauTellerReactionRateI.H index 079c0c409e..d7f7e3d7dd 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/LandauTellerReactionRate/LandauTellerReactionRateI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/LandauTellerReactionRate/LandauTellerReactionRateI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -175,11 +175,11 @@ inline Foam::scalar Foam::LandauTellerReactionRate::dcidT inline void Foam::LandauTellerReactionRate::write(Ostream& os) const { - os.writeKeyword("A") << A_ << token::END_STATEMENT << nl; - os.writeKeyword("beta") << beta_ << token::END_STATEMENT << nl; - os.writeKeyword("Ta") << Ta_ << token::END_STATEMENT << nl; - os.writeKeyword("B") << B_ << token::END_STATEMENT << nl; - os.writeKeyword("C") << C_ << token::END_STATEMENT << nl; + writeEntry(os, "A", A_); + writeEntry(os, "beta", beta_); + writeEntry(os, "Ta", Ta_); + writeEntry(os, "B", B_); + writeEntry(os, "C", C_); } diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/LangmuirHinshelwood/LangmuirHinshelwoodReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/LangmuirHinshelwood/LangmuirHinshelwoodReactionRateI.H index f30506c9ed..d26d8f5bb3 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/LangmuirHinshelwood/LangmuirHinshelwoodReactionRateI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/LangmuirHinshelwood/LangmuirHinshelwoodReactionRateI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -144,13 +144,12 @@ inline Foam::scalar Foam::LangmuirHinshelwoodReactionRate::dcidT inline void Foam::LangmuirHinshelwoodReactionRate::write(Ostream& os) const { - os.writeKeyword("reactants") - << reactantNames_ << token::END_STATEMENT << nl; - os.writeKeyword("a") << a_ << token::END_STATEMENT << nl; - os.writeKeyword("A") << A_ << token::END_STATEMENT << nl; - os.writeKeyword("Ta") << Ta_ << token::END_STATEMENT << nl; - os.writeKeyword("beta") << beta_ << token::END_STATEMENT << nl; - os.writeKeyword("m") << m_ << token::END_STATEMENT << nl; + writeEntry(os, "reactants", reactantNames_); + writeEntry(os, "a", a_); + writeEntry(os, "A", A_); + writeEntry(os, "Ta", Ta_); + writeEntry(os, "beta", beta_); + writeEntry(os, "m", m_); } diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/MichaelisMenten/MichaelisMentenReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/MichaelisMenten/MichaelisMentenReactionRateI.H index 6d1e839e93..7e0bdd655c 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/MichaelisMenten/MichaelisMentenReactionRateI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/MichaelisMenten/MichaelisMentenReactionRateI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -96,9 +96,9 @@ inline Foam::scalar Foam::MichaelisMentenReactionRate::dcidT inline void Foam::MichaelisMentenReactionRate::write(Ostream& os) const { - os.writeKeyword("Vmax") << Vmax_ << token::END_STATEMENT << nl; - os.writeKeyword("Km") << Km_ << token::END_STATEMENT << nl; - os.writeKeyword("S") << species_[s_] << token::END_STATEMENT << nl; + writeEntry(os, "Vmax", Vmax_); + writeEntry(os, "Km", Km_); + writeEntry(os, "S", species_[s_]); } diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/SRIFallOffFunction/SRIFallOffFunctionI.H b/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/SRIFallOffFunction/SRIFallOffFunctionI.H index 2b82efb844..a6944cbfee 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/SRIFallOffFunction/SRIFallOffFunctionI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/SRIFallOffFunction/SRIFallOffFunctionI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -104,11 +104,11 @@ inline Foam::scalar Foam::SRIFallOffFunction::ddc inline void Foam::SRIFallOffFunction::write(Ostream& os) const { - os.writeKeyword("a") << a_ << token::END_STATEMENT << nl; - os.writeKeyword("b") << b_ << token::END_STATEMENT << nl; - os.writeKeyword("c") << c_ << token::END_STATEMENT << nl; - os.writeKeyword("d") << d_ << token::END_STATEMENT << nl; - os.writeKeyword("e") << e_ << token::END_STATEMENT << nl; + writeEntry(os, "a", a_); + writeEntry(os, "b", b_); + writeEntry(os, "c", c_); + writeEntry(os, "d", d_); + writeEntry(os, "e", e_); } diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/TroeFallOffFunction/TroeFallOffFunctionI.H b/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/TroeFallOffFunction/TroeFallOffFunctionI.H index 68cd6b9f5f..bcb3c95e8a 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/TroeFallOffFunction/TroeFallOffFunctionI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/TroeFallOffFunction/TroeFallOffFunctionI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -172,10 +172,10 @@ inline Foam::scalar Foam::TroeFallOffFunction::ddc inline void Foam::TroeFallOffFunction::write(Ostream& os) const { - os.writeKeyword("alpha") << alpha_ << token::END_STATEMENT << nl; - os.writeKeyword("Tsss") << Tsss_ << token::END_STATEMENT << nl; - os.writeKeyword("Ts") << Ts_ << token::END_STATEMENT << nl; - os.writeKeyword("Tss") << Tss_ << token::END_STATEMENT << nl; + writeEntry(os, "alpha", alpha_); + writeEntry(os, "Tsss", Tsss_); + writeEntry(os, "Ts", Ts_); + writeEntry(os, "Tss", Tss_); } diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/powerSeries/powerSeriesReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/powerSeries/powerSeriesReactionRateI.H index 6d38b81941..c0fe1fae47 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/powerSeries/powerSeriesReactionRateI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/powerSeries/powerSeriesReactionRateI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -142,10 +142,10 @@ inline Foam::scalar Foam::powerSeriesReactionRate::dcidT inline void Foam::powerSeriesReactionRate::write(Ostream& os) const { - os.writeKeyword("A") << A_ << token::END_STATEMENT << nl; - os.writeKeyword("beta") << beta_ << token::END_STATEMENT << nl; - os.writeKeyword("Ta") << Ta_ << token::END_STATEMENT << nl; - os.writeKeyword("coeffs") << coeffs_ << token::END_STATEMENT << nl; + writeEntry(os, "A", A_); + writeEntry(os, "beta", beta_); + writeEntry(os, "Ta", Ta_); + writeEntry(os, "coeffs", coeffs_); } diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyEfficiencies/thirdBodyEfficienciesI.H b/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyEfficiencies/thirdBodyEfficienciesI.H index fc182b83d0..ca59494f26 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyEfficiencies/thirdBodyEfficienciesI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyEfficiencies/thirdBodyEfficienciesI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -102,7 +102,7 @@ inline void Foam::thirdBodyEfficiencies::write(Ostream& os) const coeffs[i].second() = operator[](i); } - os.writeKeyword("coeffs") << coeffs << token::END_STATEMENT << nl; + Foam::writeEntry(os, "coeffs", coeffs); } diff --git a/src/waves/waveModels/Airy/Airy.C b/src/waves/waveModels/Airy/Airy.C index e1065948af..104064f06b 100644 --- a/src/waves/waveModels/Airy/Airy.C +++ b/src/waves/waveModels/Airy/Airy.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -166,11 +166,11 @@ void Foam::waveModels::Airy::write(Ostream& os) const { waveModel::write(os); - os.writeKeyword("length") << length_ << token::END_STATEMENT << nl; - os.writeKeyword("phase") << phase_ << token::END_STATEMENT << nl; + writeEntry(os, "length", length_); + writeEntry(os, "phase", phase_); if (!deep()) { - os.writeKeyword("depth") << depth_ << token::END_STATEMENT << nl; + writeEntry(os, "depth", depth_); } } diff --git a/src/waves/waveModels/solitary/solitary.C b/src/waves/waveModels/solitary/solitary.C index bc9cd4bd95..bf4e3fc67e 100644 --- a/src/waves/waveModels/solitary/solitary.C +++ b/src/waves/waveModels/solitary/solitary.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -164,8 +164,8 @@ void Foam::waveModels::solitary::write(Ostream& os) const { waveModel::write(os); - os.writeKeyword("offset") << offset_ << token::END_STATEMENT << nl; - os.writeKeyword("depth") << depth_ << token::END_STATEMENT << nl; + writeEntry(os, "offset", offset_); + writeEntry(os, "depth", depth_); } diff --git a/src/waves/waveSuperpositions/waveAtmBoundaryLayerSuperposition/waveAtmBoundaryLayerSuperposition.C b/src/waves/waveSuperpositions/waveAtmBoundaryLayerSuperposition/waveAtmBoundaryLayerSuperposition.C index 8b79513a51..baf24707e8 100644 --- a/src/waves/waveSuperpositions/waveAtmBoundaryLayerSuperposition/waveAtmBoundaryLayerSuperposition.C +++ b/src/waves/waveSuperpositions/waveAtmBoundaryLayerSuperposition/waveAtmBoundaryLayerSuperposition.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -108,10 +108,10 @@ void Foam::waveAtmBoundaryLayerSuperposition::write(Ostream& os) const { waveSuperposition::write(os); - os.writeKeyword("UGasRef") << UGasRef_ << token::END_STATEMENT << nl; - os.writeKeyword("hRef") << hRef_ << token::END_STATEMENT << nl; - os.writeKeyword("hWaveMin") << hWaveMin_ << token::END_STATEMENT << nl; - os.writeKeyword("hWaveMax") << hWaveMax_ << token::END_STATEMENT << nl; + writeEntry(os, "UGasRef", UGasRef_); + writeEntry(os, "hRef", hRef_); + writeEntry(os, "hWaveMin", hWaveMin_); + writeEntry(os, "hWaveMax", hWaveMax_); } diff --git a/src/waves/waveSuperpositions/waveSuperposition/waveSuperposition.C b/src/waves/waveSuperpositions/waveSuperposition/waveSuperposition.C index d8d9caf921..541249110a 100644 --- a/src/waves/waveSuperpositions/waveSuperposition/waveSuperposition.C +++ b/src/waves/waveSuperpositions/waveSuperposition/waveSuperposition.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -348,8 +348,8 @@ Foam::tmp Foam::waveSuperposition::pGas void Foam::waveSuperposition::write(Ostream& os) const { - os.writeKeyword("origin") << origin_ << token::END_STATEMENT << nl; - os.writeKeyword("direction") << direction_ << token::END_STATEMENT << nl; + writeEntry(os, "origin", origin_); + writeEntry(os, "direction", direction_); os.writeKeyword("waves") << nl << token::BEGIN_LIST << nl << incrIndent; forAll(waveModels_, wavei) { @@ -371,8 +371,7 @@ void Foam::waveSuperposition::write(Ostream& os) const } if (heightAboveWave_) { - os.writeKeyword("heightAboveWave") << heightAboveWave_ - << token::END_STATEMENT << nl; + writeEntry(os, "heightAboveWave", heightAboveWave_); } }