Files
OpenFOAM-12/src/Allwmake
Henry Weller bf5f056296 fvMeshDistributors: New library for mesh redistribution and load-balancing
Basic support is now provided for dynamic mesh redistribution, particularly for
load-balancing.  The mesh distributor is selected in the optional 'distributor'
entry in dynamicMeshDict, for example in the
multiphase/interFoam/RAS/floatingObject tutorial case when run in parallel using
the new Allrun-parallel script

distributor
{
    type            decomposer;

    libs            ("libfvMeshDistributors.so");

    redistributionInterval  10;
}

in which the 'decomposer' form of redistribution is selected to call the mesh
decomposition method specified in decomposeParDict to re-decompose the mesh for
redistribution.  The redistributionInterval entry specifies how frequently mesh
redistribution takes place, in the above every 10th time-step.  An optional
maxImbalance entry is also provided to control redistribution based on the cell
distribution imbalance:

Class
    Foam::fvMeshDistributor::decomposer

Description
    Dynamic mesh redistribution using the decomposer

Usage
    Example of single field based refinement in all cells:
    \verbatim
    distributor
    {
        type            decomposer;

        libs            ("libfvMeshDistributors.so");

        // How often to redistribute
        redistributionInterval  10;

        // Maximum fractional cell distribution imbalance
        // before rebalancing
        maxImbalance    0.1;
    }
    \endverbatim

Currently mesh refinement/unrefinement and motion with redistribution is
supported but many aspects of OpenFOAM are not yet and will require further
development, in particular fvModels and Lagrangian.

Also only the geometry-based simple and hierarchical decomposition method are
well behaved for redistribution, scotch and ptScotch cause dramatic changes in
mesh distribution with a corresponding heavy communications overhead limiting
their usefulness or at least the frequency with which they should be called to
redistribute the mesh.
2021-12-09 14:06:45 +00:00

89 lines
2.6 KiB
Bash
Executable File

#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
. ../wmake/scripts/AllwmakeParseArguments
# Perform various checks
wmakeCheckPwd "$WM_PROJECT_DIR/src" || {
echo "Allwmake error: Current directory is not \$WM_PROJECT_DIR/src"
echo " The environment variables are inconsistent with the installation."
echo " Check the OpenFOAM entries in your dot-files and source them."
exit 1
}
[ -n "$FOAM_EXT_LIBBIN" ] || {
echo "Allwmake error: FOAM_EXT_LIBBIN not set"
echo " Check the OpenFOAM entries in your dot-files and source them."
exit 1
}
# Update OpenFOAM version strings if required
wmakePrintBuild -check || wrmo OpenFOAM/global/global.o 2>/dev/null
Pstream/Allwmake $targetType $*
OSspecific/${WM_OSTYPE:-POSIX}/Allwmake $targetType $*
wmake $targetType OpenFOAM
wmake $targetType fileFormats
wmake $targetType surfMesh
wmake $targetType triSurface
wmake $targetType meshTools
# Decomposition methods needed by dummyThirdParty
# (dummy metisDecomp, scotchDecomp etc) needed by e.g. meshTools
dummyThirdParty/Allwmake $targetType $*
wmake $targetType finiteVolume
wmake $targetType lagrangian/basic
wmake $targetType lagrangian/distributionModels
wmake $targetType genericPatchFields
wmake $targetType mesh/extrudeModel
wmake $targetType dynamicMesh
# Compile scotchDecomp, metisDecomp etc.
parallel/Allwmake $targetType $*
wmake $targetType fvMeshMovers
wmake $targetType fvMeshTopoChangers
wmake $targetType fvMeshDistributors
wmake $targetType conversion
wmake $targetType sampling
wmake $targetType ODE
wmake $targetType randomProcesses
wmake $targetType physicalProperties
thermophysicalModels/Allwmake $targetType $*
twoPhaseModels/Allwmake $targetType $*
MomentumTransportModels/Allwmake $targetType $*
ThermophysicalTransportModels/Allwmake $targetType $*
wmake $targetType radiationModels
wmake $targetType combustionModels
regionModels/Allwmake $targetType $*
lagrangian/Allwmake $targetType $*
mesh/Allwmake $targetType $*
renumber/Allwmake $targetType $*
fvAgglomerationMethods/Allwmake $targetType $*
wmake $targetType fvMotionSolver
wmake $targetType fvModels
wmake $targetType fvConstraints
functionObjects/Allwmake $targetType $*
wmake $targetType sixDoFRigidBodyMotion
wmake $targetType sixDoFRigidBodyState
wmake $targetType rigidBodyDynamics
wmake $targetType rigidBodyMeshMotion
wmake $targetType rigidBodyState
wmake $targetType specieTransfer
wmake $targetType atmosphericModels
wmake $targetType waves
#------------------------------------------------------------------------------