diff --git a/src/OpenFOAM/db/IOobjects/IOdictionary/systemDict.C b/src/OpenFOAM/db/IOobjects/IOdictionary/systemDict.C index 2fe9feb6d2..6d087dda49 100644 --- a/src/OpenFOAM/db/IOobjects/IOdictionary/systemDict.C +++ b/src/OpenFOAM/db/IOobjects/IOdictionary/systemDict.C @@ -37,7 +37,7 @@ Foam::IOobject Foam::systemDictIO const word& regionName ) { - fileName dictPath = fileName::null; + fileName dictPath = dictName; if (args.optionFound("dict")) { @@ -55,33 +55,29 @@ Foam::IOobject Foam::systemDictIO { dictPath = dictPath/dictName; } - else if (dictPath.isName()) - { - dictPath = ob.time().system()/dictPath; - } } - if (dictPath.size()) - { - Info<< "Reading " << dictPath << nl << endl; + Info<< "Reading " << dictPath << nl << endl; + if (args.optionFound("dict") && !dictPath.isName()) + { return IOobject ( - dictPath, - ob.time(), + dictPath.isAbsolute() + ? dictPath + : ob.time().globalPath()/dictPath, + ob, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ); } else { - Info<< "Reading " << dictName << nl << endl; - return IOobject ( - dictName, + dictPath, ob.time().system(), regionName == polyMesh::defaultRegion ? word::null : regionName, ob, diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/coolingSphere/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/coolingSphere/Allrun index 3842ae9bb2..cf62438f0d 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/coolingSphere/Allrun +++ b/tutorials/heatTransfer/chtMultiRegionFoam/coolingSphere/Allrun @@ -10,7 +10,7 @@ runApplication foamSetupCHT runApplication foamDictionary -entry internalField -set "uniform 348" 0/solid/T -runApplication decomposePar -allRegions -dict decomposeParDict +runApplication decomposePar -allRegions -dict system/decomposeParDict printf "\n%s\n" "Creating files for paraview post-processing" paraFoam -touchAll diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/Allmesh b/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/Allmesh index 6e7ad6c937..b43e87b4e2 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/Allmesh +++ b/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/Allmesh @@ -10,14 +10,12 @@ runApplication -s air blockMesh -region air runApplication -s porous blockMesh -region porous # Create rotor blades in air region -runApplication -s air.1 \ - topoSet -region air -dict system/air/topoSetDict.1 +runApplication -s air.1 topoSet -region air -dict topoSetDict.1 runApplication createBaffles -region air -overwrite # Create rotor zone in air region for MRF -runApplication -s air.2 \ - topoSet -region air -dict system/air/topoSetDict.2 +runApplication -s air.2 topoSet -region air -dict topoSetDict.2 rm -rf constant/air/polyMesh/sets