mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
TUT: simple test for redistributePar with distributed roots
TUT: prefer 'subtract' instead of old 'delete' TUT: enable multiFieldValue function object, update topoSet action
This commit is contained in:
@ -5,7 +5,7 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
|
|
||||||
cleanCase0
|
cleanCase0
|
||||||
|
|
||||||
rm -rf machineA
|
rm -rf machine*
|
||||||
rm -rf machineB
|
rm -rf test-*
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
53
tutorials/IO/fileHandler/Allrun-redistribute
Executable file
53
tutorials/IO/fileHandler/Allrun-redistribute
Executable file
@ -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
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
@ -68,6 +68,7 @@ functions
|
|||||||
#include "FOs/FOlog"
|
#include "FOs/FOlog"
|
||||||
#include "FOs/FOmag"
|
#include "FOs/FOmag"
|
||||||
#include "FOs/FOmagSqr"
|
#include "FOs/FOmagSqr"
|
||||||
|
#include "FOs/FOmultiFieldValue"
|
||||||
#include "FOs/FOmultiply"
|
#include "FOs/FOmultiply"
|
||||||
#include "FOs/FOmomentum"
|
#include "FOs/FOmomentum"
|
||||||
#include "FOs/FOnearWallFields"
|
#include "FOs/FOnearWallFields"
|
||||||
|
|||||||
@ -27,7 +27,7 @@ actions
|
|||||||
{
|
{
|
||||||
name f0;
|
name f0;
|
||||||
type faceSet;
|
type faceSet;
|
||||||
action delete;
|
action subtract;
|
||||||
source boundaryToFace;
|
source boundaryToFace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,7 @@ actions
|
|||||||
{
|
{
|
||||||
name c1;
|
name c1;
|
||||||
type cellSet;
|
type cellSet;
|
||||||
action delete;
|
action subtract;
|
||||||
source cellToCell;
|
source cellToCell;
|
||||||
|
|
||||||
set c2;
|
set c2;
|
||||||
|
|||||||
Reference in New Issue
Block a user