From 57c4b27b8be8babaa9d69d9a4ee5e9022e7ca076 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 23 Jun 2022 17:20:53 +0200 Subject: [PATCH] TUT: simple test for redistributePar with distributed roots TUT: prefer 'subtract' instead of old 'delete' TUT: enable multiFieldValue function object, update topoSet action --- tutorials/IO/fileHandler/Allclean | 4 +- tutorials/IO/fileHandler/Allrun-redistribute | 53 +++++++++++++++++++ .../cavity/system/{ => FOs}/FOmultiFieldValue | 0 .../pisoFoam/RAS/cavity/system/controlDict | 1 + .../faceZoneExtrusion/system/topoSetDict | 2 +- .../background/system/topoSetDict | 2 +- 6 files changed, 58 insertions(+), 4 deletions(-) create mode 100755 tutorials/IO/fileHandler/Allrun-redistribute rename tutorials/incompressible/pisoFoam/RAS/cavity/system/{ => FOs}/FOmultiFieldValue (100%) diff --git a/tutorials/IO/fileHandler/Allclean b/tutorials/IO/fileHandler/Allclean index f0f0c0c84c..611ad150b1 100755 --- a/tutorials/IO/fileHandler/Allclean +++ b/tutorials/IO/fileHandler/Allclean @@ -5,7 +5,7 @@ cd "${0%/*}" || exit # Run from this directory cleanCase0 -rm -rf machineA -rm -rf machineB +rm -rf machine* +rm -rf test-* #------------------------------------------------------------------------------ diff --git a/tutorials/IO/fileHandler/Allrun-redistribute b/tutorials/IO/fileHandler/Allrun-redistribute new file mode 100755 index 0000000000..1eac6a371f --- /dev/null +++ b/tutorials/IO/fileHandler/Allrun-redistribute @@ -0,0 +1,53 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +if isTest "$@" +then + # Reset the controlDict + if [ -f system/controlDict.orig ] + then + echo "$0: restoring the controlDict from controlDict.orig" + mv -f system/controlDict.orig system/controlDict + fi +fi + +restore0Dir +runApplication blockMesh + +rm -rf test-distribute +masterDecompParDict="test-distribute/machineA/testcase/system/decomposeParDict" + +for subdir in machineA machineB machineC machineD +do + mkdir -p test-distribute/"$subdir"/testcase +done + +# master +cp -R 0 constant system test-distribute/machineA/testcase +# others (nothing to copy) + + +cat<< CASE_ROOTS >> "$masterDecompParDict" + +distributed true; + +roots +( + //master: "$PWD/test-distribute/machineA" + "$PWD/test-distribute/machineB" + "$PWD/test-distribute/machineC" + "$PWD/test-distribute/machineD" +); +CASE_ROOTS + +#export FOAM_ABORT=true + +runParallel redistributePar -decompose -case test-distribute/machineA/testcase + +runParallel checkMesh -case test-distribute/machineA/testcase + +exit 0 + +#------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pisoFoam/RAS/cavity/system/FOmultiFieldValue b/tutorials/incompressible/pisoFoam/RAS/cavity/system/FOs/FOmultiFieldValue similarity index 100% rename from tutorials/incompressible/pisoFoam/RAS/cavity/system/FOmultiFieldValue rename to tutorials/incompressible/pisoFoam/RAS/cavity/system/FOs/FOmultiFieldValue diff --git a/tutorials/incompressible/pisoFoam/RAS/cavity/system/controlDict b/tutorials/incompressible/pisoFoam/RAS/cavity/system/controlDict index e340791b2c..1f0c2eccfd 100644 --- a/tutorials/incompressible/pisoFoam/RAS/cavity/system/controlDict +++ b/tutorials/incompressible/pisoFoam/RAS/cavity/system/controlDict @@ -68,6 +68,7 @@ functions #include "FOs/FOlog" #include "FOs/FOmag" #include "FOs/FOmagSqr" + #include "FOs/FOmultiFieldValue" #include "FOs/FOmultiply" #include "FOs/FOmomentum" #include "FOs/FOnearWallFields" diff --git a/tutorials/mesh/extrudeMesh/faceZoneExtrusion/system/topoSetDict b/tutorials/mesh/extrudeMesh/faceZoneExtrusion/system/topoSetDict index 3298e756df..02354e6d8a 100644 --- a/tutorials/mesh/extrudeMesh/faceZoneExtrusion/system/topoSetDict +++ b/tutorials/mesh/extrudeMesh/faceZoneExtrusion/system/topoSetDict @@ -27,7 +27,7 @@ actions { name f0; type faceSet; - action delete; + action subtract; source boundaryToFace; } diff --git a/tutorials/multiphase/overInterDyMFoam/rigidBodyHull/background/system/topoSetDict b/tutorials/multiphase/overInterDyMFoam/rigidBodyHull/background/system/topoSetDict index 6915c79242..58325d9c8f 100644 --- a/tutorials/multiphase/overInterDyMFoam/rigidBodyHull/background/system/topoSetDict +++ b/tutorials/multiphase/overInterDyMFoam/rigidBodyHull/background/system/topoSetDict @@ -53,7 +53,7 @@ actions { name c1; type cellSet; - action delete; + action subtract; source cellToCell; set c2;