mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: more consistent use of endEntry (issue #3035)
- enables capturing of end entry as an event
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2016 Shell Research Ltd.
|
Copyright (C) 2016 Shell Research Ltd.
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -203,9 +203,9 @@ static inline scalar averageSurrounding
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
static inline Ostream& putUniform(Ostream& os, const word& key, const Type& val)
|
static inline Ostream& putUniform(Ostream& os, const word& key, const Type& val)
|
||||||
{
|
{
|
||||||
os.writeKeyword(key)
|
os.writeKeyword(key);
|
||||||
<< word("uniform") << token::SPACE
|
os << word("uniform") << token::SPACE << val;
|
||||||
<< val << token::END_STATEMENT << nl;
|
os.endEntry();
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1153,7 +1153,7 @@ static void tail_field
|
|||||||
// ground
|
// ground
|
||||||
{
|
{
|
||||||
os.beginBlock(pars.groundPatchName);
|
os.beginBlock(pars.groundPatchName);
|
||||||
os.writeKeyword("type") << wall_bc << token::END_STATEMENT << nl;
|
os.writeEntry("type", wall_bc);
|
||||||
putUniform(os, "value", deflt);
|
putUniform(os, "value", deflt);
|
||||||
os.endBlock();
|
os.endBlock();
|
||||||
}
|
}
|
||||||
@ -1170,7 +1170,7 @@ static void tail_field
|
|||||||
// No wall functions for blockedFaces patch unless selected
|
// No wall functions for blockedFaces patch unless selected
|
||||||
if (pars.blockedFacesWallFn)
|
if (pars.blockedFacesWallFn)
|
||||||
{
|
{
|
||||||
os.writeKeyword("type") << wall_bc << token::END_STATEMENT << nl;
|
os.writeEntry("type", wall_bc);
|
||||||
putUniform(os, "value", deflt);
|
putUniform(os, "value", deflt);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1184,7 +1184,7 @@ static void tail_field
|
|||||||
{
|
{
|
||||||
os.beginBlock(patchName);
|
os.beginBlock(patchName);
|
||||||
|
|
||||||
os.writeKeyword("type") << wall_bc << token::END_STATEMENT << nl;
|
os.writeEntry("type", wall_bc);
|
||||||
putUniform(os, "value", deflt);
|
putUniform(os, "value", deflt);
|
||||||
|
|
||||||
os.endBlock();
|
os.endBlock();
|
||||||
@ -1192,7 +1192,7 @@ static void tail_field
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
os.beginBlock(word(patchName + "Wall"));
|
os.beginBlock(word(patchName + "Wall"));
|
||||||
os.writeKeyword("type") << wall_bc << token::END_STATEMENT << nl;
|
os.writeEntry("type", wall_bc);
|
||||||
putUniform(os, "value", deflt);
|
putUniform(os, "value", deflt);
|
||||||
os.endBlock();
|
os.endBlock();
|
||||||
|
|
||||||
@ -1266,7 +1266,7 @@ void write_scalarField
|
|||||||
|
|
||||||
os << nl;
|
os << nl;
|
||||||
os.writeKeyword("internalField")
|
os.writeKeyword("internalField")
|
||||||
<< "nonuniform List<scalar>" << nl
|
<< word("nonuniform") << token::SPACE << word("List<scalar>") << nl
|
||||||
<< meshIndexing.nCells() << nl << token::BEGIN_LIST << nl;
|
<< meshIndexing.nCells() << nl << token::BEGIN_LIST << nl;
|
||||||
|
|
||||||
for (label celli=0; celli < meshIndexing.nCells(); ++celli)
|
for (label celli=0; celli < meshIndexing.nCells(); ++celli)
|
||||||
@ -1282,7 +1282,8 @@ void write_scalarField
|
|||||||
os << limits.clamp(fld(cellIdx)) << nl;
|
os << limits.clamp(fld(cellIdx)) << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
os << token::END_LIST << token::END_STATEMENT << nl;
|
os << token::END_LIST;
|
||||||
|
os.endEntry();
|
||||||
|
|
||||||
os << nl;
|
os << nl;
|
||||||
os.beginBlock("boundaryField");
|
os.beginBlock("boundaryField");
|
||||||
@ -1400,8 +1401,7 @@ void write_pU_fields
|
|||||||
for (label patchi = 0; patchi < 3; ++patchi)
|
for (label patchi = 0; patchi < 3; ++patchi)
|
||||||
{
|
{
|
||||||
os.beginBlock(patches[patchi].patchName);
|
os.beginBlock(patches[patchi].patchName);
|
||||||
os.writeKeyword("type") << pars.UPatchBc.c_str()
|
os.writeEntry("type", pars.UPatchBc.c_str());
|
||||||
<< token::END_STATEMENT << nl;
|
|
||||||
os.endBlock();
|
os.endBlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1543,7 +1543,7 @@ void write_symmTensorField
|
|||||||
|
|
||||||
os << nl;
|
os << nl;
|
||||||
os.writeKeyword("internalField")
|
os.writeKeyword("internalField")
|
||||||
<< "nonuniform List<symmTensor>" << nl
|
<< word("nonuniform") << token::SPACE << word("List<symmTensor>") << nl
|
||||||
<< meshIndexing.nCells() << nl << token::BEGIN_LIST << nl;
|
<< meshIndexing.nCells() << nl << token::BEGIN_LIST << nl;
|
||||||
|
|
||||||
for (label celli=0; celli < meshIndexing.nCells(); ++celli)
|
for (label celli=0; celli < meshIndexing.nCells(); ++celli)
|
||||||
@ -1558,7 +1558,8 @@ void write_symmTensorField
|
|||||||
|
|
||||||
os << fld(cellIdx) << nl;
|
os << fld(cellIdx) << nl;
|
||||||
}
|
}
|
||||||
os << token::END_LIST << token::END_STATEMENT << nl;
|
os << token::END_LIST;
|
||||||
|
os.endEntry();
|
||||||
|
|
||||||
os << nl;
|
os << nl;
|
||||||
os.beginBlock("boundaryField");
|
os.beginBlock("boundaryField");
|
||||||
@ -1603,7 +1604,7 @@ void write_symmTensorFieldV
|
|||||||
|
|
||||||
os << nl;
|
os << nl;
|
||||||
os.writeKeyword("internalField")
|
os.writeKeyword("internalField")
|
||||||
<< "nonuniform List<symmTensor>" << nl
|
<< word("nonuniform") << token::SPACE << word("List<symmTensor>") << nl
|
||||||
<< meshIndexing.nCells() << nl << token::BEGIN_LIST << nl;
|
<< meshIndexing.nCells() << nl << token::BEGIN_LIST << nl;
|
||||||
|
|
||||||
symmTensor val(symmTensor::zero);
|
symmTensor val(symmTensor::zero);
|
||||||
@ -1626,7 +1627,8 @@ void write_symmTensorFieldV
|
|||||||
|
|
||||||
os << val << nl;
|
os << val << nl;
|
||||||
}
|
}
|
||||||
os << token::END_LIST << token::END_STATEMENT << nl;
|
os << token::END_LIST;
|
||||||
|
os.endEntry();
|
||||||
|
|
||||||
os << nl;
|
os << nl;
|
||||||
os.beginBlock("boundaryField");
|
os.beginBlock("boundaryField");
|
||||||
@ -1878,7 +1880,9 @@ void write_blocked_face_list
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
os << token::END_LIST << token::END_STATEMENT << nl << nl;
|
os << token::END_LIST;
|
||||||
|
os.endEntry() << nl;
|
||||||
|
|
||||||
os.beginBlock("coupledFaces");
|
os.beginBlock("coupledFaces");
|
||||||
|
|
||||||
for (const PDRpatchDef& p : patches)
|
for (const PDRpatchDef& p : patches)
|
||||||
@ -1901,8 +1905,10 @@ void write_blocked_face_list
|
|||||||
IOobject::writeEndDivider(os);
|
IOobject::writeEndDivider(os);
|
||||||
|
|
||||||
// Write panelList
|
// Write panelList
|
||||||
OFstream(casepath / "panelList")()
|
OFstream os2(casepath / "panelList");
|
||||||
<< panelNames << token::END_STATEMENT << nl;
|
|
||||||
|
os2<< panelNames;
|
||||||
|
os2.endEntry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2000,7 +2006,7 @@ void write_blockedCellsSet
|
|||||||
os << labelList();
|
os << labelList();
|
||||||
}
|
}
|
||||||
|
|
||||||
os << token::END_STATEMENT << nl;
|
os.endEntry();
|
||||||
|
|
||||||
IOobject::writeEndDivider(os);
|
IOobject::writeEndDivider(os);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -251,7 +251,7 @@ void Foam::PackedList<Width>::writeEntry
|
|||||||
os.writeKeyword(keyword);
|
os.writeKeyword(keyword);
|
||||||
}
|
}
|
||||||
writeEntry(os);
|
writeEntry(os);
|
||||||
os << token::END_STATEMENT << endl;
|
os.endEntry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -73,7 +73,7 @@ void Foam::FixedList<T, N>::writeEntry
|
|||||||
os.writeKeyword(keyword);
|
os.writeKeyword(keyword);
|
||||||
}
|
}
|
||||||
writeEntry(os);
|
writeEntry(os);
|
||||||
os << token::END_STATEMENT << endl;
|
os.endEntry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -74,7 +74,7 @@ void Foam::UList<T>::writeEntry(const word& keyword, Ostream& os) const
|
|||||||
os.writeKeyword(keyword);
|
os.writeKeyword(keyword);
|
||||||
}
|
}
|
||||||
writeEntry(os);
|
writeEntry(os);
|
||||||
os << token::END_STATEMENT << endl;
|
os.endEntry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -309,7 +309,7 @@ void Foam::primitiveEntry::write(Ostream& os, const bool contentsOnly) const
|
|||||||
|
|
||||||
if (!contentsOnly)
|
if (!contentsOnly)
|
||||||
{
|
{
|
||||||
os << token::END_STATEMENT << endl;
|
os.endEntry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -544,12 +544,20 @@ void Foam::dimensioned<Type>::writeEntry
|
|||||||
Ostream& os
|
Ostream& os
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
os.writeKeyword(keyword);
|
if (keyword.size())
|
||||||
|
|
||||||
if (keyword != name_)
|
|
||||||
{
|
{
|
||||||
// The name, only if different from keyword
|
os.writeKeyword(keyword);
|
||||||
os << name_ << token::SPACE;
|
|
||||||
|
if (keyword != name_)
|
||||||
|
{
|
||||||
|
// The name, only if different from keyword
|
||||||
|
os << name_ << token::SPACE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Use the name (no keyword provided)
|
||||||
|
os.writeKeyword(name_);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The dimensions
|
// The dimensions
|
||||||
@ -557,7 +565,8 @@ void Foam::dimensioned<Type>::writeEntry
|
|||||||
dimensions_.write(os, mult);
|
dimensions_.write(os, mult);
|
||||||
|
|
||||||
// The value
|
// The value
|
||||||
os << token::SPACE << value_/mult << token::END_STATEMENT << endl;
|
os << token::SPACE << value_/mult;
|
||||||
|
os.endEntry();
|
||||||
|
|
||||||
os.check(FUNCTION_NAME);
|
os.check(FUNCTION_NAME);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -520,8 +520,8 @@ bool Foam::expressions::exprResult::writeEntryChecked
|
|||||||
{
|
{
|
||||||
os.writeKeyword(keyword);
|
os.writeKeyword(keyword);
|
||||||
}
|
}
|
||||||
os << word("uniform") << token::SPACE
|
os << word("uniform") << token::SPACE << val;
|
||||||
<< val << token::END_STATEMENT << nl;
|
os.endEntry();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -540,8 +540,8 @@ bool Foam::expressions::exprResult::writeEntryChecked
|
|||||||
{
|
{
|
||||||
os.writeKeyword(keyword);
|
os.writeKeyword(keyword);
|
||||||
}
|
}
|
||||||
os << word("uniform") << token::SPACE
|
os << word("uniform") << token::SPACE << fld.front();
|
||||||
<< fld.front() << token::END_STATEMENT << nl;
|
os.endEntry();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -744,7 +744,7 @@ void Foam::Field<Type>::writeEntry(const word& keyword, Ostream& os) const
|
|||||||
List<Type>::writeEntry(os);
|
List<Type>::writeEntry(os);
|
||||||
}
|
}
|
||||||
|
|
||||||
os << token::END_STATEMENT << nl;
|
os.endEntry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -139,7 +139,8 @@ bool Foam::UniformDimensionedField<Type>::writeData(Ostream& os) const
|
|||||||
// The dimensions
|
// The dimensions
|
||||||
scalar multiplier(1);
|
scalar multiplier(1);
|
||||||
os.writeKeyword("dimensions");
|
os.writeKeyword("dimensions");
|
||||||
this->dimensions().write(os, multiplier) << token::END_STATEMENT << nl;
|
this->dimensions().write(os, multiplier);
|
||||||
|
os.endEntry();
|
||||||
|
|
||||||
// The value
|
// The value
|
||||||
os.writeEntry("value", this->value()/multiplier) << nl;
|
os.writeEntry("value", this->value()/multiplier) << nl;
|
||||||
|
|||||||
@ -139,8 +139,8 @@ void Foam::patchIdentifier::write(Ostream& os) const
|
|||||||
if (!inGroups_.empty())
|
if (!inGroups_.empty())
|
||||||
{
|
{
|
||||||
os.writeKeyword("inGroups");
|
os.writeKeyword("inGroups");
|
||||||
// Flat output of list
|
inGroups_.writeList(os, 0); // Flat output
|
||||||
inGroups_.writeList(os, 0) << token::END_STATEMENT << nl;
|
os.endEntry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -138,8 +138,8 @@ void Foam::zoneIdentifier::write(Ostream& os) const
|
|||||||
if (!inGroups_.empty())
|
if (!inGroups_.empty())
|
||||||
{
|
{
|
||||||
os.writeKeyword("inGroups");
|
os.writeKeyword("inGroups");
|
||||||
// Flat output of list
|
inGroups_.writeList(os, 0); // Flat output
|
||||||
inGroups_.writeList(os, 0) << token::END_STATEMENT << nl;
|
os.endEntry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2022 OpenCFD Ltd.
|
Copyright (C) 2022-2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -68,7 +68,8 @@ static void writeMaps(Ostream& os, const word& key, const labelListList& maps)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
os << indent << key;
|
os << indent << key;
|
||||||
printMaps(os, maps) << token::END_STATEMENT << nl;
|
printMaps(os, maps);
|
||||||
|
os.endEntry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
Copyright (C) 2020-2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -459,22 +459,19 @@ void Foam::layerAdditionRemoval::write(Ostream& os) const
|
|||||||
|
|
||||||
void Foam::layerAdditionRemoval::writeDict(Ostream& os) const
|
void Foam::layerAdditionRemoval::writeDict(Ostream& os) const
|
||||||
{
|
{
|
||||||
os << nl << name() << nl << token::BEGIN_BLOCK << nl
|
os << nl;
|
||||||
<< " type " << type()
|
|
||||||
<< token::END_STATEMENT << nl
|
os.beginBlock(name());
|
||||||
<< " faceZoneName " << faceZoneID_.name()
|
|
||||||
<< token::END_STATEMENT << nl
|
os.writeEntry("type", type());
|
||||||
<< " minLayerThickness " << minLayerThickness_
|
os.writeEntry("faceZoneName", faceZoneID_.name());
|
||||||
<< token::END_STATEMENT << nl
|
os.writeEntry("minLayerThickness", minLayerThickness_);
|
||||||
<< " maxLayerThickness " << maxLayerThickness_
|
os.writeEntry("maxLayerThickness", maxLayerThickness_);
|
||||||
<< token::END_STATEMENT << nl
|
os.writeEntry("thicknessFromVolume", thicknessFromVolume_);
|
||||||
<< " thicknessFromVolume " << thicknessFromVolume_
|
os.writeEntry("oldLayerThickness", oldLayerThickness_);
|
||||||
<< token::END_STATEMENT << nl
|
os.writeEntry("active", active());
|
||||||
<< " oldLayerThickness " << oldLayerThickness_
|
|
||||||
<< token::END_STATEMENT << nl
|
os.endBlock();
|
||||||
<< " active " << active()
|
|
||||||
<< token::END_STATEMENT << nl
|
|
||||||
<< token::END_BLOCK << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
Copyright (C) 2020-2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -749,11 +749,9 @@ void Foam::slidingInterface::write(Ostream& os) const
|
|||||||
|
|
||||||
|
|
||||||
// To write out all those tolerances
|
// To write out all those tolerances
|
||||||
|
#undef WRITE_NON_DEFAULT
|
||||||
#define WRITE_NON_DEFAULT(name) \
|
#define WRITE_NON_DEFAULT(name) \
|
||||||
if ( name ## _ != name ## Default_ )\
|
if ( name ## _ != name ## Default_ ) os.writeEntry( #name , name ## _ );
|
||||||
{ \
|
|
||||||
os << " " #name " " << name ## _ << token::END_STATEMENT << nl; \
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::slidingInterface::writeDict(Ostream& os) const
|
void Foam::slidingInterface::writeDict(Ostream& os) const
|
||||||
@ -795,6 +793,8 @@ void Foam::slidingInterface::writeDict(Ostream& os) const
|
|||||||
WRITE_NON_DEFAULT(edgeCoPlanarTol)
|
WRITE_NON_DEFAULT(edgeCoPlanarTol)
|
||||||
WRITE_NON_DEFAULT(edgeEndCutoffTol)
|
WRITE_NON_DEFAULT(edgeEndCutoffTol)
|
||||||
|
|
||||||
|
#undef WRITE_NON_DEFAULT
|
||||||
|
|
||||||
os.endBlock();
|
os.endBlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -72,11 +72,12 @@ Foam::enginePiston::enginePiston
|
|||||||
|
|
||||||
void Foam::enginePiston::writeDict(Ostream& os) const
|
void Foam::enginePiston::writeDict(Ostream& os) const
|
||||||
{
|
{
|
||||||
os << nl << token::BEGIN_BLOCK
|
os << nl;
|
||||||
<< "patch " << patchID_.name() << token::END_STATEMENT << nl
|
os.beginBlock();
|
||||||
<< "minLayer " << minLayer_ << token::END_STATEMENT << nl
|
os.writeEntry("patch", patchID_.name());
|
||||||
<< "maxLayer " << maxLayer_ << token::END_STATEMENT << nl
|
os.writeEntry("minLayer", minLayer_);
|
||||||
<< token::END_BLOCK << endl;
|
os.writeEntry("maxLayer", maxLayer_);
|
||||||
|
os.endBlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -242,34 +242,35 @@ Foam::labelList Foam::engineValve::movingPatchIDs() const
|
|||||||
|
|
||||||
void Foam::engineValve::writeDict(Ostream& os) const
|
void Foam::engineValve::writeDict(Ostream& os) const
|
||||||
{
|
{
|
||||||
os << nl << name() << nl << token::BEGIN_BLOCK;
|
os << nl;
|
||||||
|
os.beginBlock(name());
|
||||||
|
|
||||||
if (csysPtr_)
|
if (csysPtr_)
|
||||||
{
|
{
|
||||||
csysPtr_->writeEntry(os);
|
csysPtr_->writeEntry(os);
|
||||||
}
|
}
|
||||||
|
|
||||||
os << "bottomPatch " << bottomPatch_.name() << token::END_STATEMENT << nl
|
os.writeEntry("bottomPatch", bottomPatch_.name());
|
||||||
<< "poppetPatch " << poppetPatch_.name() << token::END_STATEMENT << nl
|
os.writeEntry("poppetPatch", poppetPatch_.name());
|
||||||
<< "stemPatch " << stemPatch_.name() << token::END_STATEMENT << nl
|
os.writeEntry("stemPatch", stemPatch_.name());
|
||||||
<< "curtainInPortPatch " << curtainInPortPatch_.name()
|
os.writeEntry("curtainInPortPatch", curtainInPortPatch_.name());
|
||||||
<< token::END_STATEMENT << nl
|
os.writeEntry("curtainInCylinderPatch", curtainInCylinderPatch_.name());
|
||||||
<< "curtainInCylinderPatch " << curtainInCylinderPatch_.name()
|
os.writeEntry("detachInCylinderPatch", detachInCylinderPatch_.name());
|
||||||
<< token::END_STATEMENT << nl
|
os.writeEntry("detachInPortPatch", detachInPortPatch_.name());
|
||||||
<< "detachInCylinderPatch " << detachInCylinderPatch_.name()
|
os.writeEntry("detachFaces", detachFaces_);
|
||||||
<< token::END_STATEMENT << nl
|
|
||||||
<< "detachInPortPatch " << detachInPortPatch_.name()
|
os << "liftProfile" << nl << token::BEGIN_LIST
|
||||||
<< token::END_STATEMENT << nl
|
<< liftProfile_ << token::END_LIST;
|
||||||
<< "detachFaces " << detachFaces_ << token::END_STATEMENT << nl
|
os.endEntry();
|
||||||
<< "liftProfile " << nl << token::BEGIN_BLOCK
|
|
||||||
<< liftProfile_ << token::END_BLOCK << token::END_STATEMENT << nl
|
os.writeEntry("minLift", minLift_);
|
||||||
<< "minLift " << minLift_ << token::END_STATEMENT << nl
|
os.writeEntry("minTopLayer", minTopLayer_);
|
||||||
<< "minTopLayer " << minTopLayer_ << token::END_STATEMENT << nl
|
os.writeEntry("maxTopLayer", maxTopLayer_);
|
||||||
<< "maxTopLayer " << maxTopLayer_ << token::END_STATEMENT << nl
|
os.writeEntry("minBottomLayer", minBottomLayer_);
|
||||||
<< "minBottomLayer " << minBottomLayer_ << token::END_STATEMENT << nl
|
os.writeEntry("maxBottomLayer", maxBottomLayer_);
|
||||||
<< "maxBottomLayer " << maxBottomLayer_ << token::END_STATEMENT << nl
|
os.writeEntry("diameter", diameter_);
|
||||||
<< "diameter " << diameter_ << token::END_STATEMENT << nl
|
|
||||||
<< token::END_BLOCK << endl;
|
os.endBlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2016-2022 OpenCFD Ltd.
|
Copyright (C) 2016-2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -109,7 +109,8 @@ static void writeList(Ostream& os, const string& header, const UList<T>& list)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Write end delimiter
|
// Write end delimiter
|
||||||
os << token::END_LIST << token::END_STATEMENT << nl << nl;
|
os << token::END_LIST;
|
||||||
|
os.endEntry() << nl;
|
||||||
}
|
}
|
||||||
//! \endcond
|
//! \endcond
|
||||||
|
|
||||||
|
|||||||
@ -573,7 +573,8 @@ Foam::Ostream& Foam::PDRblock::blockMeshDict
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
endIndentList(os) << token::END_STATEMENT << nl;
|
endIndentList(os);
|
||||||
|
os.endEntry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -658,7 +659,8 @@ Foam::Ostream& Foam::PDRblock::blockMeshDict
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
endIndentList(os) << token::END_STATEMENT << nl;
|
endIndentList(os);
|
||||||
|
os.endEntry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -686,7 +688,8 @@ Foam::Ostream& Foam::PDRblock::blockMeshDict
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
endIndentList(os) << token::END_STATEMENT << nl;
|
endIndentList(os);
|
||||||
|
os.endEntry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -707,7 +710,8 @@ Foam::Ostream& Foam::PDRblock::blockMeshDict
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
endIndentList(os) << token::END_STATEMENT << nl;
|
endIndentList(os);
|
||||||
|
os.endEntry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -733,7 +737,8 @@ Foam::Ostream& Foam::PDRblock::blockMeshDict
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
endIndentList(os) << token::END_STATEMENT << nl;
|
endIndentList(os);
|
||||||
|
os.endEntry();
|
||||||
|
|
||||||
os.endBlock();
|
os.endBlock();
|
||||||
}
|
}
|
||||||
@ -755,11 +760,14 @@ Foam::Ostream& Foam::PDRblock::blockMeshDict
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
endIndentList(os) << token::END_STATEMENT << nl;
|
endIndentList(os);
|
||||||
|
os.endEntry();
|
||||||
|
|
||||||
os.endBlock();
|
os.endBlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
endIndentList(os) << token::END_STATEMENT << nl;
|
endIndentList(os);
|
||||||
|
os.endEntry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -243,14 +243,14 @@ void Foam::PDRblock::gridControl::writeDict
|
|||||||
|
|
||||||
const scalarList& knots = *this;
|
const scalarList& knots = *this;
|
||||||
|
|
||||||
os << indent << "points "
|
os << indent << "points " << flatOutput(knots);
|
||||||
<< flatOutput(knots) << token::END_STATEMENT << nl;
|
os.endEntry();
|
||||||
|
|
||||||
os << indent << "nCells "
|
os << indent << "nCells " << flatOutput(divisions_);
|
||||||
<< flatOutput(divisions_) << token::END_STATEMENT << nl;
|
os.endEntry();
|
||||||
|
|
||||||
os << indent << "ratios "
|
os << indent << "ratios " << flatOutput(expansion_);
|
||||||
<< flatOutput(expansion_) << token::END_STATEMENT << nl;
|
os.endEntry();
|
||||||
|
|
||||||
if (cmpt < vector::nComponents)
|
if (cmpt < vector::nComponents)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -42,7 +42,8 @@ inline Ostream& operator<<
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
OStringStream reaction;
|
OStringStream reaction;
|
||||||
os << r.solidReactionStr(reaction) << token::END_STATEMENT <<nl;
|
os << r.solidReactionStr(reaction);
|
||||||
|
os.endEntry();
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -105,7 +105,8 @@ bool Foam::surfaceTensionModels::constant::writeData(Ostream& os) const
|
|||||||
{
|
{
|
||||||
if (surfaceTensionModel::writeData(os))
|
if (surfaceTensionModel::writeData(os))
|
||||||
{
|
{
|
||||||
os << sigma_ << token::END_STATEMENT << nl;
|
os << sigma_;
|
||||||
|
os.endEntry();
|
||||||
return os.good();
|
return os.good();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -125,7 +125,8 @@ bool Foam::surfaceTensionModels::temperatureDependent::writeData
|
|||||||
{
|
{
|
||||||
if (surfaceTensionModel::writeData(os))
|
if (surfaceTensionModel::writeData(os))
|
||||||
{
|
{
|
||||||
os << sigma_() << token::END_STATEMENT << nl;
|
os << sigma_();
|
||||||
|
os.endEntry();
|
||||||
return os.good();
|
return os.good();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
Copyright (C) 2020-2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -469,7 +469,7 @@ int main(int argc, char *argv[])
|
|||||||
os.writeEntry("degrees", "false");
|
os.writeEntry("degrees", "false");
|
||||||
os << nl;
|
os << nl;
|
||||||
os << "response" << nl;
|
os << "response" << nl;
|
||||||
os << '(' << nl;
|
os << token::BEGIN_LIST << nl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -511,7 +511,8 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
auto& os = *osPtr;
|
auto& os = *osPtr;
|
||||||
|
|
||||||
os << ')' << token::END_STATEMENT << nl;
|
os << token::END_LIST;
|
||||||
|
os.endEntry();
|
||||||
|
|
||||||
IOobject::writeEndDivider(os);
|
IOobject::writeEndDivider(os);
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
Copyright (C) 2020-2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -516,7 +516,7 @@ int main(int argc, char *argv[])
|
|||||||
os.writeEntry("degrees", "false");
|
os.writeEntry("degrees", "false");
|
||||||
os << nl;
|
os << nl;
|
||||||
os << "response" << nl;
|
os << "response" << nl;
|
||||||
os << '(' << nl;
|
os << token::BEGIN_LIST << nl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -558,7 +558,8 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
auto& os = *osPtr;
|
auto& os = *osPtr;
|
||||||
|
|
||||||
os << ')' << token::END_STATEMENT << nl;
|
os << token::END_LIST;
|
||||||
|
os.endEntry();
|
||||||
|
|
||||||
IOobject::writeEndDivider(os);
|
IOobject::writeEndDivider(os);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user