From 57d81c179cd6534d4894059287513b97e113a8a0 Mon Sep 17 00:00:00 2001 From: Andrew Heather <a.heather@opencfd.co.uk> Date: Tue, 8 Nov 2016 14:36:14 +0000 Subject: [PATCH] BUG: runTimePostProcessing - updated due to changes in stateFunctionObject --- .../functionObjectLine.C | 21 +++++++++-------- .../functionObjectSurface.C | 23 +++++++++++-------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/src/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C b/src/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C index 28ec2c91d58..db5f1619e78 100644 --- a/src/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C +++ b/src/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C @@ -89,20 +89,23 @@ addGeometryToScene return; } - const dictionary dict = - geometryBase::parent_.getObjectProperty - ( - functionObject_, - fieldName_, - dictionary::null - ); + dictionary dict; + if (!geometryBase::parent_.getObjectDict(functionObject_, fieldName_, dict)) + { + WarningInFunction + << "Unable to find function object " << functionObject_ + << " output for field " << fieldName_ + << ". Line will not be processed" + << endl; + return; + } fileName fName; if (!dict.readIfPresent("file", fName)) { WarningInFunction - << "Unable to find function object " << functionObject_ - << " output for field " << fieldName_ + << "Unable to read file name from function object " + << functionObject_ << " for field " << fieldName_ << ". Line will not be processed" << endl; return; diff --git a/src/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C b/src/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C index b7b11e69456..cfa91bf2487 100644 --- a/src/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C +++ b/src/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C @@ -93,21 +93,24 @@ addGeometryToScene return; } - const dictionary dict = - geometryBase::parent_.getObjectProperty - ( - functionObject_, - fieldName_, - dictionary::null - ); + dictionary dict; + if (!geometryBase::parent_.getObjectDict(functionObject_, fieldName_, dict)) + { + WarningInFunction + << "Unable to find function object " << functionObject_ + << " output for field " << fieldName_ + << ". Surface will not be processed" + << endl; + return; + } fileName fName; if (!dict.readIfPresent("file", fName)) { WarningInFunction - << "Unable to find function object " << functionObject_ - << " output for field " << fieldName_ - << ". functionObjectSurface will not be processed" + << "Unable to read file name from function object " + << functionObject_ << " for field " << fieldName_ + << ". Surface will not be processed" << endl; return; } -- GitLab