mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
committed by
Andrew Heather
parent
c53459d4a2
commit
332cf3345a
@ -253,9 +253,18 @@ void Foam::PatchFunction1Types::ConstantField<Type>::writeData
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
PatchFunction1<Type>::writeData(os);
|
PatchFunction1<Type>::writeData(os);
|
||||||
//os << token::SPACE << value_ << token::END_STATEMENT << nl;
|
|
||||||
|
if (isUniform_)
|
||||||
|
{
|
||||||
|
os.writeKeyword(this->name_)
|
||||||
|
<< "constant " << uniformValue_
|
||||||
|
<< token::END_STATEMENT << nl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
value_.writeEntry(this->name_, os);
|
value_.writeEntry(this->name_, os);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
Reference in New Issue
Block a user