diff --git a/src/meshTools/PatchFunction1/ConstantField/ConstantField.C b/src/meshTools/PatchFunction1/ConstantField/ConstantField.C index 5ef4d1d974..0650943323 100644 --- a/src/meshTools/PatchFunction1/ConstantField/ConstantField.C +++ b/src/meshTools/PatchFunction1/ConstantField/ConstantField.C @@ -253,8 +253,17 @@ void Foam::PatchFunction1Types::ConstantField::writeData ) const { PatchFunction1::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); + } }