Changed writeKeyword to the new simpler writeEntry form where appropriate

This commit is contained in:
Henry Weller
2019-01-29 22:32:42 +00:00
parent 15b1d6e7ec
commit e5532ff568
104 changed files with 407 additions and 582 deletions

View File

@ -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());
}
// ************************************************************************* //

View File

@ -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());
}

View File

@ -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());
}

View File

@ -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());
}

View File

@ -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<gasHThermoPhysics>::TlowDefault
<< token::END_STATEMENT << nl;
reactionsFile.writeKeyword("Thigh")
<< Reaction<gasHThermoPhysics>::ThighDefault
<< token::END_STATEMENT << nl << nl;
writeEntry
(
reactionsFile,
"Tlow",
Reaction<gasHThermoPhysics>::TlowDefault
);
writeEntry
(
reactionsFile,
"Thigh",
Reaction<gasHThermoPhysics>::ThighDefault
);
Info<< "End\n" << endl;

View File

@ -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<Type, GeoMesh>::writeData
const word& fieldDictEntry
) const
{
os.writeKeyword("dimensions") << dimensions() << token::END_STATEMENT
<< nl << nl;
writeEntry(os, "dimensions", dimensions());
os << nl;
Field<Type>::writeEntry(fieldDictEntry, os);

View File

@ -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<Type>::writeData(Ostream& os) const
{
scalar multiplier;
os.writeKeyword("dimensions");
this->dimensions().write(os, multiplier) << token::END_STATEMENT
<< nl;
os.writeKeyword("value") << this->value()/multiplier << token::END_STATEMENT
<< nl << nl;
this->dimensions().write(os, multiplier) << token::END_STATEMENT << nl;
writeEntry(os, "value", this->value()/multiplier);
os << nl;
return (os.good());
}

View File

@ -269,8 +269,7 @@ Foam::codedFixedValuePointPatchField<Type>::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<const Field<Type>&>(*this).writeEntry("value", os);
IStringStream is(os.str());
dictionary dict(is);
@ -332,8 +331,7 @@ template<class Type>
void Foam::codedFixedValuePointPatchField<Type>::write(Ostream& os) const
{
fixedValuePointPatchField<Type>::write(os);
os.writeKeyword("name") << name_
<< token::END_STATEMENT << nl;
writeEntry(os, "name", name_);
if (dict_.found("codeInclude"))
{

View File

@ -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<Type>::db() const
template<class Type>
void Foam::pointPatchField<Type>::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<Type>::writeEntryIfDifferent
{
if (value1 != value2)
{
os.writeKeyword(entryName) << value2 << token::END_STATEMENT << nl;
writeEntry(os, entryName, value2);
}
}

View File

@ -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<Type>::checkOrder() const
template<class Type>
void Foam::interpolation2DTable<Type>::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;
}

View File

@ -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<Type>::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);
}

View File

@ -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<Type>::check() const
template<class Type>
void Foam::interpolationTable<Type>::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);

View File

@ -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<Type>::write(Ostream& os) const
{
tableReader<Type>::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<Type>::write(Ostream& os) const
}
os << token::END_STATEMENT << nl;
os.writeKeyword("separator")
<< string(separator_) << token::END_STATEMENT << nl;
writeEntry(os, "separator", string(separator_));
}

View File

@ -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<Type>::write(Ostream& os) const
{
if (this->type() != "openFoam")
{
os.writeKeyword("readerType")
<< this->type() << token::END_STATEMENT << nl;
writeEntry(os, "readerType", this->type());
}
}

View File

@ -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());
}
}

View File

@ -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_);
}
}

View File

@ -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_]);
}
}

View File

@ -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)
{

View File

@ -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:

View File

@ -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:

View File

@ -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_);
}

View File

@ -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_);
}
}

View File

@ -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());
}

View File

@ -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;
}

View File

@ -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<Type>::writeData(Ostream& os) const
// the values themselves
TableBase<Type>::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;
}

View File

@ -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<Type>::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);

View File

@ -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<Type>::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);

View File

@ -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<Type>::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_);
}
}

View File

@ -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<Type>::writeData(Ostream& os) const
// the values themselves
TableBase<Type>::writeEntries(os);
os.writeKeyword("file")<< fName_ << token::END_STATEMENT << nl;
writeEntry(os, "file", fName_);
os << decrIndent << indent << token::END_BLOCK << endl;
}

View File

@ -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;
}

View File

@ -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)
{

View File

@ -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_);
}

View File

@ -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);
}

View File

@ -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_);
}

View File

@ -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<Type>::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<const Field<Type>&>(*this).writeEntry("value", os);
IStringStream is(os.str());
dictionary dict(is);

View File

@ -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_);
}
}

View File

@ -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<vector>::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);
}

View File

@ -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<vector>::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);
}

View File

@ -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<vector>::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);
}

View File

@ -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<vector>::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);
}

View File

@ -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_);
}
}

View File

@ -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_);
}
}

View File

@ -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<vector>::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);
}

View File

@ -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<Type>::rmap
template<class Type>
void Foam::genericPointPatchField<Type>::write(Ostream& os) const
{
os.writeKeyword("type") << actualTypeName_ << token::END_STATEMENT << nl;
writeEntry(os, "type", actualTypeName_);
forAllConstIter(dictionary, dict_, iter)
{

View File

@ -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;

View File

@ -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<CloudType>::writeTime() const
template<class CloudType>
void Foam::CloudSubModelBase<CloudType>::write(Ostream& os) const
{
os.writeKeyword("owner") << owner_.name() << token::END_STATEMENT
<< nl;
writeEntry(os, "owner", owner_.name());
subModelBase::write(os);
}

View File

@ -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<class CloudType>
void Foam::DispersionRASModel<CloudType>::write(Ostream& os) const
{
DispersionModel<CloudType>::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_);
}

View File

@ -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_);
}

View File

@ -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())
{

View File

@ -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_);
}

View File

@ -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());
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -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());
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -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());
}

View File

@ -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());
}

View File

@ -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)

View File

@ -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())

View File

@ -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_);
}

View File

@ -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())

View File

@ -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());
}

View File

@ -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());
}

View File

@ -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());
}

View File

@ -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());
}

View File

@ -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_);
}

View File

@ -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());
}

View File

@ -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());
}

View File

@ -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());
}

View File

@ -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_);
}

View File

@ -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_);
}

View File

@ -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_);
}

View File

@ -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_));
}

View File

@ -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_);
}

View File

@ -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;
}

View File

@ -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_);
}

View File

@ -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_);
}

View File

@ -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_);
}
// ************************************************************************* //

View File

@ -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_);
}
// ************************************************************************* //

View File

@ -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_);
}
// ************************************************************************* //

View File

@ -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_);
}
// ************************************************************************* //

View File

@ -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_);
}
// ************************************************************************* //

View File

@ -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_);
}

View File

@ -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_);
}
// ************************************************************************* //

View File

@ -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_);
}

View File

@ -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_);
}

View File

@ -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_);
}

View File

@ -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);

View File

@ -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_);
}

View File

@ -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;
}

View File

@ -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_);
}
}

View File

@ -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<class ReactionThermo>
void Foam::SolidReaction<ReactionThermo>::write(Ostream& os) const
{
OStringStream reaction;
os.writeKeyword("reaction") << solidReactionStr(reaction)
<< token::END_STATEMENT << nl;
writeEntry(os, "reaction", solidReactionStr(reaction));
}

View File

@ -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_);
}

View File

@ -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<class ReactionThermo>
void Foam::Reaction<ReactionThermo>::write(Ostream& os) const
{
OStringStream reaction;
os.writeKeyword("reaction") << reactionStr(reaction)
<< token::END_STATEMENT << nl;
writeEntry(os, "reaction", reactionStr(reaction));
}

View File

@ -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<ThermoType>::write(Ostream& os) const
const Reaction<ThermoType>& 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;
}

View File

@ -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_);
}

View File

@ -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_);
}

View File

@ -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_);
}

View File

@ -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_]);
}

View File

@ -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_);
}

View File

@ -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_);
}

View File

@ -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_);
}

View File

@ -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);
}

Some files were not shown because too many files have changed in this diff Show More