Skip to content
Snippets Groups Projects
Commit 5468d96c authored by Mark OLESEN's avatar Mark OLESEN
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 019f7014
No related merge requests found
......@@ -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);
}
}
......
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