mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: writeEntry instead of writeKeyword + END
This commit is contained in:
@ -506,10 +506,8 @@ Foam::tmp<Foam::labelField> Foam::processorFaPatch::internalFieldTransfer
|
||||
void Foam::processorFaPatch::write(Ostream& os) const
|
||||
{
|
||||
faPatch::write(os);
|
||||
os.writeKeyword("myProcNo") << myProcNo_
|
||||
<< token::END_STATEMENT << nl;
|
||||
os.writeKeyword("neighbProcNo") << neighbProcNo_
|
||||
<< token::END_STATEMENT << nl;
|
||||
os.writeEntry("myProcNo", myProcNo_);
|
||||
os.writeEntry("neighbProcNo", neighbProcNo_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -467,13 +467,13 @@ void Foam::faPatch::resetEdges(const labelList& newEdges)
|
||||
|
||||
void Foam::faPatch::write(Ostream& os) const
|
||||
{
|
||||
os.writeKeyword("type") << type() << token::END_STATEMENT << nl;
|
||||
os.writeEntry("type", type());
|
||||
|
||||
patchIdentifier::write(os);
|
||||
|
||||
const labelList& edgeLabels = *this;
|
||||
edgeLabels.writeEntry("edgeLabels", os);
|
||||
os.writeKeyword("ngbPolyPatchIndex") << ngbPolyPatchIndex_
|
||||
<< token::END_STATEMENT << nl;
|
||||
os.writeEntry("ngbPolyPatchIndex", ngbPolyPatchIndex_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ Foam::inletOutletFaPatchField<Type>::inletOutletFaPatchField
|
||||
)
|
||||
:
|
||||
mixedFaPatchField<Type>(p, iF),
|
||||
phiName_("phi")
|
||||
phiName_(dict.lookupOrDefault<word>("phi", "phi"))
|
||||
{
|
||||
this->refValue() = Field<Type>("inletValue", dict, p.size());
|
||||
|
||||
@ -86,8 +86,6 @@ Foam::inletOutletFaPatchField<Type>::inletOutletFaPatchField
|
||||
|
||||
this->refGrad() = pTraits<Type>::zero;
|
||||
this->valueFraction() = 0.0;
|
||||
|
||||
dict.readIfPresent("phi", phiName_);
|
||||
}
|
||||
|
||||
|
||||
@ -140,11 +138,7 @@ template<class Type>
|
||||
void Foam::inletOutletFaPatchField<Type>::write(Ostream& os) const
|
||||
{
|
||||
faPatchField<Type>::write(os);
|
||||
if (phiName_ != "phi")
|
||||
{
|
||||
os.writeKeyword("phi")
|
||||
<< phiName_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
|
||||
this->refValue().writeEntry("inletValue", os);
|
||||
this->writeEntry("value", os);
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ void Foam::faPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||
template<class Type>
|
||||
void Foam::faPatchField<Type>::write(Ostream& os) const
|
||||
{
|
||||
os.writeKeyword("type") << type() << token::END_STATEMENT << nl;
|
||||
os.writeEntry("type", type());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -169,7 +169,7 @@ void Foam::faePatchField<Type>::rmap
|
||||
template<class Type>
|
||||
void Foam::faePatchField<Type>::write(Ostream& os) const
|
||||
{
|
||||
os.writeKeyword("type") << type() << token::END_STATEMENT << nl;
|
||||
os.writeEntry("type", type());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -334,8 +334,8 @@ void Foam::PatchFunction1Types::Sampled<Type>::writeData
|
||||
) const
|
||||
{
|
||||
PatchFunction1<Type>::writeData(os);
|
||||
os.writeKeyword(this->name()) << type();
|
||||
os << token::END_STATEMENT << nl;
|
||||
|
||||
os.writeEntry(this->name(), type());
|
||||
|
||||
mappedPatchBase::write(os);
|
||||
|
||||
|
||||
@ -602,8 +602,7 @@ void Foam::PatchFunction1Types::MappedFile<Type>::writeData
|
||||
// bc)
|
||||
if (dictConstructed_)
|
||||
{
|
||||
os.writeKeyword(this->name()) << type();
|
||||
os << token::END_STATEMENT << nl;
|
||||
os.writeEntry(this->name(), type());
|
||||
|
||||
os.writeEntryIfDifferent
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user