diff --git a/applications/test/mapDistributePolyMesh/cavity/Allclean b/applications/test/mapDistributePolyMesh/cavity/Allclean index 97e8d34742..153e538cb6 100755 --- a/applications/test/mapDistributePolyMesh/cavity/Allclean +++ b/applications/test/mapDistributePolyMesh/cavity/Allclean @@ -6,7 +6,7 @@ cd "${0%/*}" || exit # Run from this directory cleanCase # Restore default dictionaries -cp system/decomposeParDict-2 system/decomposeParDict +cp system/decomposeParDict.2 system/decomposeParDict cp system/controlDict-startTime system/controlDict # ----------------------------------------------------------------------------- diff --git a/applications/test/mapDistributePolyMesh/cavity/Allrun b/applications/test/mapDistributePolyMesh/cavity/Allrun index a723077eb9..422851265b 100755 --- a/applications/test/mapDistributePolyMesh/cavity/Allrun +++ b/applications/test/mapDistributePolyMesh/cavity/Allrun @@ -5,12 +5,12 @@ cd "${0%/*}" || exit # Run from this directory runApplication blockMesh -runApplication decomposePar -decomposeParDict system/decomposeParDict-2 +runApplication decomposePar -decomposeParDict system/decomposeParDict.2 -runParallel -s scotch -np 5 redistributePar \ - -decomposeParDict system/decomposeParDict-5 +runParallel -s scotch -decomposeParDict system/decomposeParDict.5 \ + redistributePar -runParallel -np 5 Test-mapDistributePolyMesh \ - -decomposeParDict system/decomposeParDict-5 +runParallel -decomposeParDict system/decomposeParDict.5 \ + Test-mapDistributePolyMesh # ----------------------------------------------------------------------------- diff --git a/applications/test/mapDistributePolyMesh/cavity/system/decomposeParDict-2 b/applications/test/mapDistributePolyMesh/cavity/system/decomposeParDict.2 similarity index 100% rename from applications/test/mapDistributePolyMesh/cavity/system/decomposeParDict-2 rename to applications/test/mapDistributePolyMesh/cavity/system/decomposeParDict.2 diff --git a/applications/test/mapDistributePolyMesh/cavity/system/decomposeParDict-5 b/applications/test/mapDistributePolyMesh/cavity/system/decomposeParDict.5 similarity index 100% rename from applications/test/mapDistributePolyMesh/cavity/system/decomposeParDict-5 rename to applications/test/mapDistributePolyMesh/cavity/system/decomposeParDict.5 diff --git a/bin/foamCleanPolyMesh b/bin/foamCleanPolyMesh index 60cac9380e..5965c15bd5 100755 --- a/bin/foamCleanPolyMesh +++ b/bin/foamCleanPolyMesh @@ -7,22 +7,10 @@ # \\/ M anipulation | #------------------------------------------------------------------------------- # Copyright (C) 2011-2016 OpenFOAM Foundation +# Copyright (C) 2022 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, distributed under GPL-3.0-or-later. # # Script # foamCleanPolyMesh @@ -76,34 +64,33 @@ do esac done +meshDir=polyMesh if [ -n "$regionName" ] then - meshDir=$regionName/polyMesh -else - meshDir=polyMesh + meshDir="$regionName/$meshDir" fi # If -case was specified: insist upon 'constant/polyMesh' if [ -n "$caseDir" ] then - if [ -d constant/$meshDir ] + if [ -d constant/"$meshDir" ] then # Use constant/polyMesh - meshDir=constant/$meshDir + meshDir=constant/"$meshDir" else echo "Error: no 'constant/$meshDir' in $caseDir" 1>&2 exit 1 fi else - if [ -d constant/$meshDir ] + if [ -d constant/"$meshDir" ] then # Use constant/polyMesh - meshDir=constant/$meshDir - elif [ -d $meshDir ] + meshDir=constant/"$meshDir" + elif [ -d "$meshDir" ] then # Likely already in constant/ - do not adjust anything : - elif [ "${PWD##*/}" = polyMesh -a -z "$regionName" ] + elif [ "${PWD##*/}" = polyMesh ] && [ -z "$regionName" ] then # Apparently already within polyMesh/ meshDir=. @@ -135,7 +122,7 @@ for i in \ surfaceIndex \ ; do - rm -rf $meshDir/$i $meshDir/$i.gz + rm -rf "$meshDir/$i" "$meshDir/$i.gz" done #------------------------------------------------------------------------------ diff --git a/bin/foamCleanTutorials b/bin/foamCleanTutorials index 2c897a3d7e..71cd8469e0 100755 --- a/bin/foamCleanTutorials +++ b/bin/foamCleanTutorials @@ -20,7 +20,7 @@ # using Allclean, Allwclean (when present) or regular cleanCase. # #------------------------------------------------------------------------------ -. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions +. "${WM_PROJECT_DIR:?}"/bin/tools/CleanFunctions # Tutorial clean functions thisScript="$0" if [ "/${thisScript#/}" != "$thisScript" ] diff --git a/bin/foamRunTutorials b/bin/foamRunTutorials index a12f907db0..6ef9216f1a 100755 --- a/bin/foamRunTutorials +++ b/bin/foamRunTutorials @@ -7,7 +7,7 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # Copyright (C) 2011-2016 OpenFOAM Foundation -# Copyright (C) 2018-2021 OpenCFD Ltd. +# Copyright (C) 2018-2022 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, distributed under GPL-3.0-or-later. @@ -24,7 +24,7 @@ # When this is detected, the case will be skipped. # #------------------------------------------------------------------------------ -. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +. "${WM_PROJECT_DIR:?}"/bin/tools/RunFunctions # Tutorial run functions # Normally use standard "make" make="make" @@ -44,11 +44,12 @@ options: -serial Prefer Allrun-serial if available -parallel Prefer Allrun-parallel if available -test Prefer Alltest script, pass -test argument to scripts - -self Avoid initial Allrun, Alltest scripts + -self Avoid initial Allrun / Alltest scripts (prevent infinite recursion) -help Print the usage -Recursively run Allrun/Alltest (or blockMesh + application) +Recursively run Alltest / Allrun / Allrun-parallel / Allrun-serial +(or simply blockMesh + application) starting from the current directory or the specified -case directory. Equivalent options: @@ -74,7 +75,7 @@ die() #------------------------------------------------------------------------------ # Parse options -unset passArgs runTests runType skipSelf +unset passArgs runTest runType skipSelf while [ "$#" -gt 0 ] do @@ -95,7 +96,7 @@ do -test) passArgs="-test" - runTests=true + runTest=true ;; ## long-option (internal dispatch form) @@ -139,30 +140,34 @@ done if [ -z "$skipSelf" ] then # Use specialized script(s) - if [ "$runTests" = true ] && [ -f Alltest ] + if [ -n "$runTest" ] && [ -f ./Alltest ] then ./Alltest $passArgs $* exit "$?" - elif [ -f Allrun-optional ] + elif [ -f ./Allrun-optional ] then echo "Skipped optional case $PWD" exit 0 - fi - - # Prefer -serial or -parallel when available? - if [ -n "$runType" ] + elif [ -n "$runType" ] then - if [ -f ./"Allrun-${runType}" ] + # Prefer -serial or -parallel when available? + allRun="Allrun-$runType" + if [ -f ./"$allRun" ] then - ./"Allrun-${runType}" $passArgs $* + ./"$allRun" $passArgs $* exit "$?" fi fi - if [ -f ./Allrun ] - then - ./Allrun $passArgs $* - exit "$?" - fi + + # Otherwise use Allrun or Allrun-parallel or Allrun-serial + for allRun in Allrun Allrun-parallel Allrun-serial + do + if [ -f ./"$allRun" ] + then + ./"$allRun" $passArgs $* + exit "$?" + fi + done fi diff --git a/bin/tools/CleanFunctions b/bin/tools/CleanFunctions index 174d3a488a..a1f67650d0 100644 --- a/bin/tools/CleanFunctions +++ b/bin/tools/CleanFunctions @@ -6,7 +6,7 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # Copyright (C) 2011-2016 OpenFOAM Foundation -# Copyright (C) 2015-2021 OpenCFD Ltd. +# Copyright (C) 2015-2022 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, distributed under GPL-3.0-or-later. @@ -105,6 +105,54 @@ cleanPostProcessing() } +cleanFaMesh() +{ + if [ -e constant/faMesh ] + then + if [ -e constant/faMesh/faMeshDefinition ] + then + # Old constant/faMesh location for faMeshDefinition still in use: + # - warn but don't remove anything + echo + echo "Warning: not removing constant/faMesh/" + echo " It contains a 'faMeshDefinition' file" + echo " Relocate the file(s) to system/ to avoid this warning" + echo + else + # Can remove constant/faMesh/ entirely (no faMeshDefinition) + rm -rf constant/faMesh + fi + fi +} + + +cleanPolyMesh() +{ + if [ -e constant/polyMesh ] + then + if [ -e constant/polyMesh/blockMeshDict ] \ + || [ -e constant/polyMesh/blockMeshDict.m4 ] + then + # Old constant/polyMesh location for blockMeshDict still in use: + # - warn but don't remove anything + echo + echo "Warning: not removing constant/polyMesh/" + echo " It contains a 'blockMeshDict' or 'blockMeshDict.m4' file" + echo " Relocate the file(s) to system/ to avoid this warning" + echo + else + # Can remove constant/polyMesh/ entirely (no blockMeshDict) + rm -rf constant/polyMesh + fi + fi + + if [ -e system/blockMeshDict.m4 ] + then + rm -f system/blockMeshDict + fi +} + + cleanCase() { cleanTimeDirectories @@ -114,6 +162,10 @@ cleanCase() cleanOptimisation cleanPostProcessing + cleanFaMesh + cleanPolyMesh + cleanSnappyFiles + rm -rf processor* rm -rf TDAC rm -rf probes* @@ -122,14 +174,14 @@ cleanCase() rm -rf sets rm -rf system/machines - # Possible blockMesh output - rm -f blockTopology.vtu blockFaces.vtp blockTopology.obj blockCentres.obj + # Debug output (blockMesh, decomposePar) + rm -f \ + blockTopology.vtu blockFaces.vtp blockTopology.obj blockCentres.obj \ + cellDist.vtu \ + 0/cellDist # From mpirunDebug - rm -f gdbCommands mpirun.schema - - cleanSnappyFiles - rm -f 0/cellDist + rm -f gdbCommands mpirun.schema ( cd constant 2>/dev/null || exit 0 @@ -138,33 +190,7 @@ cleanCase() cellDecomposition cellToRegion cellLevel* pointLevel* \ tetDualMesh \ ; - - # Old constant/polyMesh location for blockMeshDict still in use? - # - emit a gentle warning - if [ -e polyMesh/blockMeshDict.m4 ] - then - rm -f polyMesh/blockMeshDict - echo - echo "Warning: not removing constant/polyMesh/" - echo " It contains a 'blockMeshDict.m4' file." - echo " Relocate the file to system/ to avoid this warning" - echo - elif [ -e polyMesh/blockMeshDict ] - then - echo - echo "Warning: not removing constant/polyMesh/" - echo " It contains a 'blockMeshDict' file." - echo " Relocate the file to system/ to avoid this warning" - else - # Remove polyMesh entirely if there is no blockMeshDict - rm -rf polyMesh - fi ) - - if [ -e system/blockMeshDict.m4 ] - then - rm -f system/blockMeshDict - fi } @@ -195,29 +221,6 @@ cleanUcomponents() } -cleanFaMesh() -{ - ( - cd constant 2>/dev/null || exit 0 - - # Old constant/polyMesh location for blockMeshDict still in use? - # - emit a gentle warning - if [ -e faMesh/faMeshDefinition ] - then - rm -f faMesh/faceLabels* faMesh/faBoundary* - echo - echo "Warning: not removing the constant/faMesh/ directory" - echo " It contains a 'faMeshDefinition' file" - echo " Relocate the file to system/ to avoid this warning" - echo - else - # Remove faMesh/ entirely if there is no faMeshDefinition - rm -rf faMesh - fi - ) -} - - cleanApplication() { echo "Cleaning application $PWD" diff --git a/tutorials/basic/chtMultiRegionFoam/2DImplicitCyclic/Allclean b/tutorials/basic/chtMultiRegionFoam/2DImplicitCyclic/Allclean index 711e9348ef..2324fe88c1 100755 --- a/tutorials/basic/chtMultiRegionFoam/2DImplicitCyclic/Allclean +++ b/tutorials/basic/chtMultiRegionFoam/2DImplicitCyclic/Allclean @@ -1,6 +1,7 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions +#------------------------------------------------------------------------------ cleanCase0 diff --git a/tutorials/basic/chtMultiRegionFoam/2DImplicitCyclic/Allmesh b/tutorials/basic/chtMultiRegionFoam/2DImplicitCyclic/Allmesh index c25b4a9d74..71dda2db0d 100755 --- a/tutorials/basic/chtMultiRegionFoam/2DImplicitCyclic/Allmesh +++ b/tutorials/basic/chtMultiRegionFoam/2DImplicitCyclic/Allmesh @@ -1,6 +1,6 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions #------------------------------------------------------------------------------ runApplication blockMesh diff --git a/tutorials/basic/chtMultiRegionFoam/2DImplicitCyclic/Allrun b/tutorials/basic/chtMultiRegionFoam/2DImplicitCyclic/Allrun index 80d0e1968d..c0bc2f4cfb 100755 --- a/tutorials/basic/chtMultiRegionFoam/2DImplicitCyclic/Allrun +++ b/tutorials/basic/chtMultiRegionFoam/2DImplicitCyclic/Allrun @@ -1,10 +1,10 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ runApplication ./Allmesh -# Run runApplication $(getApplication) #------------------------------------------------------------------------------ diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/Allclean b/tutorials/finiteArea/liquidFilmFoam/cylinder/Allclean index ff2a2c6b99..fb1f384730 100755 --- a/tutorials/finiteArea/liquidFilmFoam/cylinder/Allclean +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/Allclean @@ -5,6 +5,4 @@ cd "${0%/*}" || exit # Run from this directory cleanCase0 -cleanFaMesh - #------------------------------------------------------------------------------ diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/Allclean b/tutorials/finiteArea/surfactantFoam/planeTransport/Allclean index ff2a2c6b99..fb1f384730 100755 --- a/tutorials/finiteArea/surfactantFoam/planeTransport/Allclean +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/Allclean @@ -5,6 +5,4 @@ cd "${0%/*}" || exit # Run from this directory cleanCase0 -cleanFaMesh - #------------------------------------------------------------------------------ diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/Allclean b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/Allclean index c77ab8663b..426e7ad42e 100755 --- a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/Allclean +++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell/Allclean @@ -5,6 +5,4 @@ cd "${0%/*}" || exit # Run from this directory cleanCase -cleanFaMesh - #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/Allclean b/tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/Allclean index 347e01255f..37ad567b50 100755 --- a/tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/Allclean +++ b/tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/Allclean @@ -5,8 +5,6 @@ cd "${0%/*}" || exit # Run from this directory cleanCase0 -cleanFaMesh - rm -rf history #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/Allclean b/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/Allclean index 5edd28b408..eea06fe1f1 100755 --- a/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/Allclean +++ b/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/Allclean @@ -5,8 +5,6 @@ cd "${0%/*}" || exit # Run from this directory cleanCase0 -cleanFaMesh - (cd makePerturbation && wclean) rm -rf history diff --git a/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/Allrun b/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/Allrun index 831b6eff13..577c1b701d 100755 --- a/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/Allrun +++ b/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/Allrun @@ -11,7 +11,7 @@ fi restore0Dir -m4 < ./system/blockMeshDict.m4 > ./system/blockMeshDict +m4 system/blockMeshDict.m4 > system/blockMeshDict runApplication blockMesh diff --git a/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/decomposeParDict b/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/decomposeParDict index acbb812864..cd902f1d5c 100644 --- a/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/decomposeParDict +++ b/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/decomposeParDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -16,12 +16,11 @@ FoamFile numberOfSubdomains 2; -method simple; +method simple; coeffs { - n ( 2 1 1 ); + n ( 2 1 1 ); } - // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/decomposeParDict.4 b/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/decomposeParDict.4 new file mode 100644 index 0000000000..27bc1f1170 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/decomposeParDict.4 @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2206 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method scotch; + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/Allclean b/tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/Allclean index c77ab8663b..426e7ad42e 100755 --- a/tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/Allclean +++ b/tutorials/incompressible/pimpleFoam/laminar/inclinedPlaneFilm/Allclean @@ -5,6 +5,4 @@ cd "${0%/*}" || exit # Run from this directory cleanCase -cleanFaMesh - #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/Allrun.pre b/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/Allrun.pre index 5a991c3d4f..54be8f6c10 100755 --- a/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/Allrun.pre +++ b/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/Allrun.pre @@ -3,7 +3,7 @@ cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions #------------------------------------------------------------------------------ -m4 < system/blockMeshDict.m4 > system/blockMeshDict +m4 system/blockMeshDict.m4 > system/blockMeshDict runApplication blockMesh diff --git a/tutorials/incompressible/pimpleFoam/laminar/sloshing2D/Allclean b/tutorials/incompressible/pimpleFoam/laminar/sloshing2D/Allclean index 0a1cd42146..0be282c7e2 100755 --- a/tutorials/incompressible/pimpleFoam/laminar/sloshing2D/Allclean +++ b/tutorials/incompressible/pimpleFoam/laminar/sloshing2D/Allclean @@ -5,8 +5,6 @@ cd "${0%/*}" || exit # Run from this directory cleanCase0 -cleanFaMesh - (cd makeWave && wclean) rm -rf history diff --git a/tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/Allclean b/tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/Allclean index c77ab8663b..426e7ad42e 100755 --- a/tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/Allclean +++ b/tutorials/lagrangian/kinematicParcelFoam/pitzDailyWithSprinklers/Allclean @@ -5,6 +5,4 @@ cd "${0%/*}" || exit # Run from this directory cleanCase -cleanFaMesh - #------------------------------------------------------------------------------ diff --git a/tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/Allclean b/tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/Allclean index c77ab8663b..426e7ad42e 100755 --- a/tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/Allclean +++ b/tutorials/lagrangian/reactingParcelFoam/liquidFilmStepWithSprinklers/Allclean @@ -5,6 +5,4 @@ cd "${0%/*}" || exit # Run from this directory cleanCase -cleanFaMesh - #------------------------------------------------------------------------------ diff --git a/tutorials/mesh/parallel/cavity/Allrun b/tutorials/mesh/parallel/cavity/Allrun index 61b51581bb..3fd4e2e0e5 100755 --- a/tutorials/mesh/parallel/cavity/Allrun +++ b/tutorials/mesh/parallel/cavity/Allrun @@ -7,7 +7,7 @@ restore0Dir runApplication blockMesh -decompDict5="-decomposeParDict system/decomposeParDict-5" +decompDict5="-decomposeParDict system/decomposeParDict.5" # redistributePar to do decomposition runParallel -s decompose redistributePar -decompose diff --git a/tutorials/mesh/parallel/cavity/system/decomposeParDict-5 b/tutorials/mesh/parallel/cavity/system/decomposeParDict.5 similarity index 100% rename from tutorials/mesh/parallel/cavity/system/decomposeParDict-5 rename to tutorials/mesh/parallel/cavity/system/decomposeParDict.5 diff --git a/tutorials/mesh/snappyHexMesh/sphere_gapClosure/Allclean b/tutorials/mesh/snappyHexMesh/sphere_gapClosure/Allclean index 4b95e7ad99..465a1d019f 100755 --- a/tutorials/mesh/snappyHexMesh/sphere_gapClosure/Allclean +++ b/tutorials/mesh/snappyHexMesh/sphere_gapClosure/Allclean @@ -1,8 +1,10 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions +#------------------------------------------------------------------------------ cleanCase -rm *.obj + +rm -f *.obj #------------------------------------------------------------------------------ diff --git a/tutorials/mesh/snappyHexMesh/sphere_gapClosure/Allrun b/tutorials/mesh/snappyHexMesh/sphere_gapClosure/Allrun index ffca58c2f7..805fe74f0a 100755 --- a/tutorials/mesh/snappyHexMesh/sphere_gapClosure/Allrun +++ b/tutorials/mesh/snappyHexMesh/sphere_gapClosure/Allrun @@ -1,6 +1,7 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ runApplication blockMesh diff --git a/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allrun b/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allrun index 8b7584d5c4..6f55149e42 100755 --- a/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allrun +++ b/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allrun @@ -5,8 +5,8 @@ cd "${0%/*}" || exit # Run from this directory restore0Dir -# Create the underlying block mesh -m4 system/pachuka.m4 > system/blockMeshDict +# Create the mesh +m4 system/blockMeshDict.m4 > system/blockMeshDict runApplication blockMesh # Create faceSet for burner inlet and faceZone for coupled wall diff --git a/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/system/pachuka.m4 b/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/system/blockMeshDict.m4 similarity index 98% rename from tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/system/pachuka.m4 rename to tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/system/blockMeshDict.m4 index ab14fb2801..a9bb89334b 100644 --- a/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/system/pachuka.m4 +++ b/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/system/blockMeshDict.m4 @@ -8,7 +8,7 @@ FoamFile { version 2.0; - format ascii; + `format' ascii; class dictionary; object blockMeshDict; } @@ -16,8 +16,8 @@ FoamFile scale 0.001; -changecom(//)changequote([,]) -define(calc, [esyscmd(perl -e 'printf ($1)')]) +changecom(//)changequote([,]) dnl> +define(calc, [esyscmd(perl -e 'printf ($1)')]) dnl> define(VCOUNT, 0) define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) @@ -931,3 +931,5 @@ boundary ); } ); + +// ************************************************************************* //