ENH: simplify calling of decomposition, support CompactListList

- combined most of the unweighted and weighted decomposition routines
  such that an empty weight field is treated as uniform weighting.
  This allows default parameters and cuts down on the number of
  decompose methods.

- for topology-driven decomposition, it is now possible to pass in the
  owner/neighbour connectivity as a CompactListList directly instead
  of first creating a labelListList (which was internally repacked into
  a CompactListList in many cases).
  However, multiLevelDecomp still uses unpacking (to avoid a larger
  reworking of code).

- support direct creation of some methods (eg, random, scotch etc)
  without a dictionary

- fix incorrect neighbour face weighting (fixes #3019)

ENH: relocate calcCellCells from decompositionMethod to globalMeshData

- makes it more universally available
This commit is contained in:
Mark Olesen
2023-11-05 20:46:12 +01:00
parent 507805c330
commit 98246a438e
50 changed files with 1365 additions and 965 deletions

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2018-2021 OpenCFD Ltd.
Copyright (C) 2018-2023 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -27,6 +27,7 @@ License
#include "domainDecompositionDryRun.H"
#include "volFields.H"
#include "globalMeshData.H"
#include "decompositionModel.H"
#include "decompositionInformation.H"
@ -112,12 +113,12 @@ void Foam::domainDecompositionDryRun::execute
decompositionMethod& method = model.decomposer();
CompactListList<label> cellCells;
decompositionMethod::calcCellCells
globalMeshData::calcCellCells
(
mesh_,
identity(mesh_.nCells()),
mesh_.nCells(),
false,
false, // false = local only
cellCells
);