ENH: disable ensightWrite, vtkWrite function objects in post-process mode

- prevents accidental overwrite of runtime conversions.
This commit is contained in:
Mark Olesen
2018-05-08 09:16:00 +02:00
parent dbe16de58c
commit 9531212f14
5 changed files with 39 additions and 2 deletions

View File

@ -56,6 +56,15 @@ Foam::functionObjects::vtkWrite::vtkWrite
selectFields_(),
dirName_("VTK")
{
if (postProcess)
{
// Disable for post-process mode.
// Emit as FatalError for the try/catch in the caller.
FatalError
<< type() << " disabled in post-process mode"
<< exit(FatalError);
}
read(dict);
}