diff --git a/applications/utilities/postProcessing/noise/noise.C b/applications/utilities/postProcessing/noise/noise.C index 88ef922589d5f80f51bfd1592c753af392b150b0..c872b1557ce74419df4b78a0c090f64de21fe176 100644 --- a/applications/utilities/postProcessing/noise/noise.C +++ b/applications/utilities/postProcessing/noise/noise.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -106,21 +106,12 @@ int main(int argc, char *argv[]) #include "setRootCase.H" #include "createTime.H" - fileName dictName(runTime.system()/"noiseDict"); - if (args.optionFound("dict")) - { - dictName = args["dict"]; - } + const word dictName("noiseDict"); + #include "setSystemRunTimeDictionaryIO.H" + + Info<< "Reading " << dictName << "\n" << endl; - IOdictionary dict - ( - IOobject - ( - dictName.expand(), - runTime, - IOobject::MUST_READ - ) - ); + IOdictionary dict(dictIO); autoPtr<noiseModel> model(noiseModel::New(dict)); model->calculate(); diff --git a/src/OpenFOAM/include/setSystemMeshDictionaryIO.H b/src/OpenFOAM/include/setSystemMeshDictionaryIO.H index c4e5a27ae9d3c7df29908720377a40a9683a1713..b664940d1ace52fcea22624b3b69f85ffc9bc542 100644 --- a/src/OpenFOAM/include/setSystemMeshDictionaryIO.H +++ b/src/OpenFOAM/include/setSystemMeshDictionaryIO.H @@ -20,7 +20,7 @@ if (dictPath.size()) { dictIO = IOobject ( - dictPath, + dictPath.expand(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE diff --git a/src/OpenFOAM/include/setSystemRunTimeDictionaryIO.H b/src/OpenFOAM/include/setSystemRunTimeDictionaryIO.H index 510f278c6087258bb0174da8f7a7a4ab7b42726a..15a812693e1581cf347f84fd5861a5e51a02668b 100644 --- a/src/OpenFOAM/include/setSystemRunTimeDictionaryIO.H +++ b/src/OpenFOAM/include/setSystemRunTimeDictionaryIO.H @@ -20,7 +20,7 @@ if (dictPath.size()) { dictIO = IOobject ( - dictPath, + dictPath.expand(), runTime, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE