diff --git a/applications/test/mapDistributePolyMesh/cavity/system/renumberMeshDict-random b/applications/test/mapDistributePolyMesh/cavity/system/renumberMeshDict-random
deleted file mode 100644
index d3d55f4fd1..0000000000
--- a/applications/test/mapDistributePolyMesh/cavity/system/renumberMeshDict-random
+++ /dev/null
@@ -1,112 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| ========= | |
-| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
-| \\ / O peration | Version: v2312 |
-| \\ / A nd | Website: www.openfoam.com |
-| \\/ M anipulation | |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
- version 2.0;
- format ascii;
- class dictionary;
- note "mesh renumbering dictionary";
- object renumberMeshDict;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-// Write maps from renumbered back to original mesh
-writeMaps true;
-
-// Optional entry: sort cells on coupled boundaries to last for use with
-// e.g. nonBlockingGaussSeidel.
-sortCoupledFaceCells false;
-
-// Optional entry: renumber on a block-by-block basis. It uses a
-// blockCoeffs dictionary to construct a decompositionMethod to do
-// a block subdivision) and then applies the renumberMethod to each
-// block in turn. This can be used in large cases to keep the blocks
-// fitting in cache with all the cache misses bunched at the end.
-// This number is the approximate size of the blocks - this gets converted
-// to a number of blocks that is the input to the decomposition method.
-//blockSize 1000;
-
-// Optional entry: sort points into internal and boundary points
-//orderPoints false;
-
-// Optional: suppress renumbering cellSets,faceSets,pointSets
-//renumberSets false;
-
-
-//method CuthillMcKee;
-//method Sloan;
-//method manual;
-method random;
-//method structured;
-//method spring;
-//method zoltan; // only if compiled with zoltan support
-
-//CuthillMcKeeCoeffs
-//{
-// // Reverse CuthillMcKee (RCM) or plain
-// reverse true;
-//}
-
-manualCoeffs
-{
- // In system directory: new-to-original (i.e. order) labelIOList
- dataFile "cellMap";
-}
-
-
-// For extruded (i.e. structured in one direction) meshes
-structuredCoeffs
-{
- // Patches that mesh was extruded from. These determine the starting
- // layer of cells
- patches (movingWall);
- // Method to renumber the starting layer of cells
- method random;
-
- // Renumber in columns (depthFirst) or in layers
- depthFirst true;
-
- // Reverse ordering
- reverse false;
-}
-
-
-springCoeffs
-{
- // Maximum jump of cell indices. Is fraction of number of cells
- maxCo 0.01;
-
- // Limit the amount of movement; the fraction maxCo gets decreased
- // with every iteration
- freezeFraction 0.999;
-
- // Maximum number of iterations
- maxIter 1000;
-}
-
-
-blockCoeffs
-{
- method scotch;
- //method hierarchical;
- //hierarchicalCoeffs
- //{
- // n (1 2 1);
- // delta 0.001;
- // order xyz;
- //}
-}
-
-
-zoltanCoeffs
-{
- ORDER_METHOD LOCAL_HSFC;
-}
-
-
-// ************************************************************************* //
diff --git a/applications/utilities/mesh/manipulation/renumberMesh/Allwmake b/applications/utilities/mesh/manipulation/renumberMesh/Allwmake
deleted file mode 100755
index 0f0d32738e..0000000000
--- a/applications/utilities/mesh/manipulation/renumberMesh/Allwmake
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-cd "${0%/*}" || exit # Run from this directory
-. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments # (error catching)
-. ${WM_PROJECT_DIR:?}/wmake/scripts/sysFunctions # General system functions
-. ${WM_PROJECT_DIR:?}/wmake/scripts/have_zoltan
-
-#------------------------------------------------------------------------------
-
-unset COMP_FLAGS LINK_FLAGS
-
-if findLibrary "$FOAM_LIBBIN/libSloanRenumber" > /dev/null
-then
- echo " found libSloanRenumber -- enabling sloan renumbering support."
- export LINK_FLAGS="$LINK_FLAGS -lSloanRenumber"
-fi
-
-if findLibrary "$FOAM_LIBBIN/libzoltanRenumber" > /dev/null && have_zoltan
-then
- echo " found libzoltanRenumber -- enabling zoltan renumbering support."
- export COMP_FLAGS="$COMP_FLAGS -DHAVE_ZOLTAN"
- export LINK_FLAGS="$LINK_FLAGS -lzoltanRenumber -L$ZOLTAN_LIB_DIR -lzoltan"
-fi
-
-wmake $targetType
-
-#------------------------------------------------------------------------------
diff --git a/applications/utilities/mesh/manipulation/renumberMesh/Make/options b/applications/utilities/mesh/manipulation/renumberMesh/Make/options
index 004f82049f..8aca81f2dc 100644
--- a/applications/utilities/mesh/manipulation/renumberMesh/Make/options
+++ b/applications/utilities/mesh/manipulation/renumberMesh/Make/options
@@ -1,21 +1,22 @@
EXE_INC = \
- $(COMP_FLAGS) \
- -I$(LIB_SRC)/finiteVolume/lnInclude \
+ -I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
+ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/renumber/renumberMethods/lnInclude \
- -I$(LIB_SRC)/renumber/zoltanRenumber/lnInclude \
+ -I$(LIB_SRC)/parallel/decompose/decompose/lnInclude \
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude
EXE_LIBS = \
- -lfiniteVolume \
+ -lfileFormats \
-lmeshTools \
-ldynamicMesh \
+ -lfiniteVolume \
-lgenericPatchFields \
-lrenumberMethods \
+ -ldecompose \
-lreconstruct \
- $(LINK_FLAGS) \
-ldecompositionMethods \
-L$(FOAM_LIBBIN)/dummy \
-lkahipDecomp -lmetisDecomp -lscotchDecomp
diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C
index b35202a4ad..7c08c679a5 100644
--- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C
+++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C
@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
- Copyright (C) 2016-2022 OpenCFD Ltd.
+ Copyright (C) 2016-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@@ -34,12 +34,96 @@ Description
Renumbers the cell list in order to reduce the bandwidth, reading and
renumbering all fields from all the time directories.
- By default uses bandCompression (CuthillMcKee) but will
- read system/renumberMeshDict if -dict option is present
+ By default uses bandCompression (Cuthill-McKee) or the method
+ specified by the -renumber-method option, but will read
+ system/renumberMeshDict if -dict option is present
+
+Usage
+ \b renumberMesh [OPTIONS]
+
+ Options:
+ - \par -allRegions
+ Use all regions in regionProperties
+
+ - \par -case \
+ Specify case directory to use (instead of the cwd).
+
+ - \par -constant
+ Include the 'constant/' dir in the times list.
+
+ - \par -decompose
+ Aggregate initially with a decomposition method (serial only)
+
+ - \par -decomposeParDict \
+ Use specified file for decomposePar dictionary.
+
+ - \par -dict \
+ Use specified file for renumberMeshDict dictionary.
+
+ - \par -dry-run
+ Test only
+
+ - \par -frontWidth
+ Calculate the rms of the front-width
+
+ - \par -latestTime
+ Select the latest time.
+
+ - \par -lib \
+ Additional library or library list to load (can be used multiple times).
+
+ - \par -no-fields
+ Suppress renumber of fields
+
+ - \par -noZero
+ Exclude the \a 0 dir from the times list.
+
+ - \par -overwrite
+ Overwrite existing mesh/results files
+
+ - \par -parallel
+ Run in parallel
+
+ - \par -region \
+ Renumber named region.
+
+ - \par -regions \
+ Renumber named regions.
+
+ - \par -renumber-coeffs \
+ String to create renumber dictionary contents.
+
+ - \par -renumber-method \
+ Specify renumber method (default: CuthillMcKee) without dictionary
+
+ - \par -time \
+ Specify time to select
+
+ - \par -verbose
+ Additional verbosity.
+
+ - \par -doc
+ Display documentation in browser.
+
+ - \par -doc-source
+ Display source code in browser.
+
+ - \par -help
+ Display short help and exit.
+
+ - \par -help-man
+ Display full help (manpage format) and exit.
+
+ - \par -help-notes
+ Display help notes (description) and exit.
+
+ - \par -help-full
+ Display full help and exit.
\*---------------------------------------------------------------------------*/
#include "argList.H"
+#include "timeSelector.H"
#include "IOobjectList.H"
#include "fvMesh.H"
#include "polyTopoChange.H"
@@ -48,8 +132,9 @@ Description
#include "surfaceFields.H"
#include "SortableList.H"
#include "decompositionMethod.H"
+#include "decompositionModel.H"
#include "renumberMethod.H"
-#include "zeroGradientFvPatchFields.H"
+#include "foamVtkInternalMeshWriter.H"
#include "CuthillMcKeeRenumber.H"
#include "fvMeshSubset.H"
#include "cellSet.H"
@@ -60,11 +145,6 @@ Description
#include "regionProperties.H"
#include "polyMeshTools.H"
-#ifdef HAVE_ZOLTAN
- #include "zoltanRenumber.H"
-#endif
-
-
using namespace Foam;
@@ -80,16 +160,17 @@ tmp createScalarField
(
name,
mesh,
- dimensionedScalar(dimless, Zero),
+ dimensionedScalar(word::null, dimless, -1),
fvPatchFieldBase::zeroGradientType()
);
auto& fld = tfld.ref();
- forAll(fld, celli)
+ forAll(elems, celli)
{
fld[celli] = elems[celli];
}
+ fld.correctBoundaryConditions();
return tfld;
}
@@ -140,10 +221,10 @@ void getBand
bandwidth = max(cellBandwidth);
// Do not use field algebra because of conversion label to scalar
- profile = 0.0;
- forAll(cellBandwidth, celli)
+ profile = 0;
+ for (const label width : cellBandwidth)
{
- profile += 1.0*cellBandwidth[celli];
+ profile += scalar(width);
}
sumSqrIntersect = 0.0;
@@ -175,54 +256,46 @@ labelList getFaceOrder
label newFacei = 0;
- labelList nbr;
- labelList order;
+ DynamicList