diff --git a/src/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C b/src/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C index 28ec2c91d5..db5f1619e7 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 b7b11e6945..cfa91bf248 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; } diff --git a/src/functionObjects/utilities/thermoCoupleProbes/thermoCoupleProbes.C b/src/functionObjects/utilities/thermoCoupleProbes/thermoCoupleProbes.C index 91a6b26e2b..c884876ed5 100644 --- a/src/functionObjects/utilities/thermoCoupleProbes/thermoCoupleProbes.C +++ b/src/functionObjects/utilities/thermoCoupleProbes/thermoCoupleProbes.C @@ -67,9 +67,9 @@ Foam::functionObjects::thermoCoupleProbes::thermoCoupleProbes } // Check if the property exist (resume old calculation) - // or of it is new. + // or of it is new dictionary probeDict; - if (getDict(typeName, probeDict)) + if (getDict(name, probeDict)) { probeDict.lookup("Tc") >> Ttc_; } @@ -172,7 +172,7 @@ bool Foam::functionObjects::thermoCoupleProbes::write() dictionary probeDict; probeDict.add("Tc", Ttc_); - setProperty(typeName, probeDict); + setProperty(name(), probeDict); return true; } diff --git a/src/randomProcesses/noise/noiseModels/surfaceNoise/surfaceNoise.C b/src/randomProcesses/noise/noiseModels/surfaceNoise/surfaceNoise.C index 407473632f..2237bdf98e 100644 --- a/src/randomProcesses/noise/noiseModels/surfaceNoise/surfaceNoise.C +++ b/src/randomProcesses/noise/noiseModels/surfaceNoise/surfaceNoise.C @@ -385,9 +385,9 @@ Foam::scalar surfaceNoise::surfaceAverage } else { - const meshedSurface& surf = readerPtr_->geometry(); // TO BE VERIFIED: area-averaged values + // const meshedSurface& surf = readerPtr_->geometry(); // return sum(data*surf.magSf())/sum(surf.magSf()); return sum(data)/data.size(); }