Commit 332cf334 authored by Mark Olesen's avatar Mark Olesen Committed by Andrew Heather
Browse files

ENH: emit "constant" for uniform constant field (#1269)

- this improves overall consistency and makes re-reading as a generic
  patch field behave properly when the underlying patch has zero size.
parent c53459d4
......@@ -253,8 +253,17 @@ void Foam::PatchFunction1Types::ConstantField<Type>::writeData
) const
{
PatchFunction1<Type>::writeData(os);
//os << token::SPACE << value_ << token::END_STATEMENT << nl;
value_.writeEntry(this->name_, os);
if (isUniform_)
{
os.writeKeyword(this->name_)
<< "constant " << uniformValue_
<< token::END_STATEMENT << nl;
}
else
{
value_.writeEntry(this->name_, os);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment