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.
This commit is contained in:
parent
c53459d4a2
commit
332cf3345a
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user