diff --git a/applications/utilities/preProcessing/changeDictionary/changeDictionary.C b/applications/utilities/preProcessing/changeDictionary/changeDictionary.C index 9dd677a61a51999105f4182a40b8de1cf8290d1e..6ca7be44ef54bd585b6c898a0bb7ef9c95a72890 100644 --- a/applications/utilities/preProcessing/changeDictionary/changeDictionary.C +++ b/applications/utilities/preProcessing/changeDictionary/changeDictionary.C @@ -246,6 +246,12 @@ bool merge int main(int argc, char *argv[]) { + argList::addOption + ( + "dict", + "file", + "specify an alternative to system/changeDictionaryDict" + ); argList::addOption ( "instance", @@ -268,6 +274,18 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createNamedMesh.H" + const word dictName("changeDictionaryDict"); + + fileName dictPath = dictName; + if (args.optionFound("dict")) + { + dictPath = args["dict"]; + if (isDir(dictPath)) + { + dictPath = dictPath / dictName; + } + } + const bool literalRE = args.optionFound("literalRE"); if (literalRE) @@ -313,15 +331,26 @@ int main(int argc, char *argv[]) // Get the replacement rules from a dictionary IOdictionary dict ( - IOobject ( - "changeDictionaryDict", - runTime.system(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE + args.optionFound("dict") + ? IOobject + ( + dictPath, + mesh, + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE + ) + : IOobject + ( + dictName, + runTime.system(), + mesh, + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE + ) ) ); + const dictionary& replaceDicts = dict.subDict("dictionaryReplacement"); Info<< "Read dictionary " << dict.name() << " with replacements for dictionaries " diff --git a/bin/foamEtcFile b/bin/foamEtcFile index 8a1f5d97e627a1eed729cfb6d725f54a11f8cbf0..cf52c1d62a859c2508542a17aa2163fa25b3c41d 100755 --- a/bin/foamEtcFile +++ b/bin/foamEtcFile @@ -44,7 +44,7 @@ # #------------------------------------------------------------------------------- usage() { - [ "${quietOpt:-$silentOpt}" = true ] && exit 1 + [ "${optQuiet:-$optSilent}" = true ] && exit 1 exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done @@ -53,6 +53,7 @@ usage() { Usage: ${0##*/} [OPTION] fileName ${0##*/} [OPTION] -list options: + -all return all files (otherwise stop after the first match) -list list the directories to be searched -mode <mode> any combination of u(user), g(group), o(other) -prefix <dir> specify an alternative installation prefix @@ -129,7 +130,7 @@ esac # default mode is 'ugo' mode=ugo -unset listOpt quietOpt silentOpt +unset optAll optList optQuiet optSilent # parse options while [ "$#" -gt 0 ] @@ -138,8 +139,11 @@ do -h | -help) usage ;; + -a | -all) + optAll=true + ;; -l | -list) - listOpt=true + optList=true ;; -m | -mode) [ "$#" -ge 2 ] || usage "'$1' option requires an argument" @@ -161,10 +165,10 @@ do shift ;; -q | -quiet) - quietOpt=true + optQuiet=true ;; -s | -silent) - silentOpt=true + optSilent=true ;; -v | -version) [ "$#" -ge 2 ] || usage "'$1' option requires an argument" @@ -239,14 +243,15 @@ set -- $dirList # The main routine # -if [ "$listOpt" = true ] +exitCode=0 +if [ "$optList" = true ] then # list directories, or potential file locations [ "$nArgs" -le 1 ] || usage # a silly combination, but -quiet does have precedence - [ "$quietOpt" = true ] && exit 0 + [ "$optQuiet" = true ] && exit 0 for dir do @@ -257,25 +262,32 @@ then echo "$dir" fi done - exit 0 else [ "$nArgs" -eq 1 ] || usage + # general error, eg file not found + exitCode=2 + for dir do if [ -f "$dir/$fileName" ] then - [ "$quietOpt" = true ] || echo "$dir/$fileName" - exit 0 + exitCode=0 + if [ "$optQuiet" = true ] + then + break + else + echo "$dir/$fileName" + [ "$optAll" = true ] || break + fi fi done fi -# general error, eg file not found -exit 2 +exit $exitCode #------------------------------------------------------------------------------ diff --git a/bin/tools/CleanFunctions b/bin/tools/CleanFunctions index e7f1ad40a61c860451a56be19df0f56706f7923d..c43f1d201799bd3897d4a442bc6c4e5f0da4d8d3 100644 --- a/bin/tools/CleanFunctions +++ b/bin/tools/CleanFunctions @@ -97,6 +97,9 @@ cleanCase() cellToRegion cellLevel* pointLevel* \ > /dev/null 2>&1 \ ) + + rm -rf constant/tetDualMesh > /dev/null 2>&1 + rm -rf VTK > /dev/null 2>&1 rm -f 0/cellLevel 0/pointLevel diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.H index 13b98512df680f03e1d89f12f104f58af6a6257c..d180be69edfe34ef1ccc2d3de3dceec47e4d0e6c 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.H @@ -141,10 +141,15 @@ public: ) ) { + if (!schemeData.eof()) { - IOWarningIn("linearUpwind(const fvMesh&, Istream&)", schemeData) - << "unexpected additional entries in stream." << nl + IOWarningIn + ( + "linearUpwind(const fvMesh&, " + "const surfaceScalarField& faceFlux, Istream&)", + schemeData + ) << "unexpected additional entries in stream." << nl << " Only the name of the gradient scheme in the" " 'gradSchemes' dictionary should be specified." << endl; diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.H index ce07b1017bfe555861ae749b0e5ff3bd83c77fff..ca0be6d35943279818bcc6b3fa1f25f4ce98a4b5 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.H @@ -111,11 +111,17 @@ public: ) ) { - IOWarningIn("linearUpwindV(const fvMesh&, Istream&)", schemeData) - << "unexpected additional entries in stream." << nl - << " Only the name of the gradient scheme in the" - " 'gradSchemes' dictionary should be specified." - << endl; + if (!schemeData.eof()) + { + IOWarningIn + ( + "linearUpwindV(const fvMesh&, Istream&)", + schemeData + ) << "unexpected additional entries in stream." << nl + << " Only the name of the gradient scheme in the" + " 'gradSchemes' dictionary should be specified." + << endl; + } } //- Construct from faceFlux and Istream @@ -137,11 +143,18 @@ public: ) ) { - IOWarningIn("linearUpwindV(const fvMesh&, Istream&)", schemeData) - << "unexpected additional entries in stream." << nl - << " Only the name of the gradient scheme in the" - " 'gradSchemes' dictionary should be specified." - << endl; + if (!schemeData.eof()) + { + IOWarningIn + ( + "linearUpwindV(const fvMesh&, " + "const surfaceScalarField& faceFlux, Istream&)", + schemeData + ) << "unexpected additional entries in stream." << nl + << " Only the name of the gradient scheme in the" + " 'gradSchemes' dictionary should be specified." + << endl; + } } diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh index e760b71ca3c11ac8b1ba6c099e1641a1416919e0..ef9a9fcfb2687af090604f92df71436d5c518b13 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh @@ -52,7 +52,7 @@ boundaryField { type porousBafflePressure; patchType cyclic; - jump uniform 0; + jump uniform 0 value uniform 0; D 700; I 500; length 1.05; diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/selectCyclics.setSet b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/selectCyclics.setSet deleted file mode 100644 index 95bacaa24f2f2879d60eb9e6c124cb4310a31bf2..0000000000000000000000000000000000000000 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/selectCyclics.setSet +++ /dev/null @@ -1,3 +0,0 @@ -faceSet cyclicFaces new boxToFace (0.3015 0.0493 -1) (0.3069 0.2077 1); -cellSet cyclicFacesSlaveCells new boxToCell (-1 0 -1) (0.305 0.31 1) -faceZoneSet cyclicZoneFaces new setsToFaceZone cyclicFaces cyclicFacesSlaveCells