ENH: add maxSize() and maxNonLocalSize() to globalIndex

- useful for establishing and preallocating a max buffer size
  when reading from sub-procs
This commit is contained in:
Mark Olesen
2021-05-06 21:28:43 +02:00
parent 56db12fca1
commit 86a2ae4f03
4 changed files with 68 additions and 14 deletions

View File

@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -92,6 +93,11 @@ int main(int argc, char *argv[])
}
Info<< "Max number of cells: " << globalNumbering.maxSize() << nl;
Pout<< "nCells: "
<< globalNumbering.localSize() << " Max off-processor: "
<< globalNumbering.maxNonLocalSize() << nl;
// Try whichProcID on a few borderline cases.
if (mesh.nCells() < 1)