ENH: enable user to control re-writing of function object output file headers. See #1556

This commit is contained in:
Andrew Heather
2020-01-21 15:10:29 +00:00
committed by Andrew Heather
parent d44babcc78
commit 1b45599b26
4 changed files with 23 additions and 3 deletions

View File

@ -543,9 +543,9 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::update()
void Foam::functionObjects::fieldValues::surfaceFieldValue::writeFileHeader
(
Ostream& os
) const
)
{
if (operation_ != opNone)
if (canWriteHeader() && (operation_ != opNone))
{
writeCommented(os, "Region type : ");
os << regionTypeNames_[regionType_] << " " << regionName_ << endl;
@ -575,6 +575,8 @@ void Foam::functionObjects::fieldValues::surfaceFieldValue::writeFileHeader
os << endl;
}
writtenHeader_ = true;
}