ENH: extend globalMeshData::calcCellCells handling

- add convenience forms for common combinations

- avoid allocation for 1:1 identity agglomerations

- support subsetting forms (avoids an intermediate fvMeshSubset)
  that also return the cellMap

- refactored to eliminate code duplication between weighted and
  unweighted forms
This commit is contained in:
Mark Olesen
2024-02-19 11:50:20 +01:00
parent 04d880e2ce
commit 337e672d53
19 changed files with 399 additions and 278 deletions

View File

@ -123,15 +123,9 @@ int main(int argc, char *argv[])
const label nDomains = max(cellToProc) + 1;
// Local mesh connectivity
CompactListList<label> cellCells;
globalMeshData::calcCellCells
(
mesh,
identity(mesh.nCells()),
mesh.nCells(),
false,
cellCells
);
globalMeshData::calcCellCells(mesh, cellCells);
decompositionInformation info
(

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2018-2023 OpenCFD Ltd.
Copyright (C) 2018-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -112,15 +112,9 @@ void Foam::domainDecompositionDryRun::execute
decompositionMethod& method = model.decomposer();
// Local mesh connectivity
CompactListList<label> cellCells;
globalMeshData::calcCellCells
(
mesh_,
identity(mesh_.nCells()),
mesh_.nCells(),
false, // false = local only
cellCells
);
globalMeshData::calcCellCells(mesh_, cellCells);
labelList cellToProc = method.decompose(mesh_, cellWeights);