From a33f1787b7a960300563c2d10afa3ecbb16b8475 Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 21 Mar 2019 17:55:05 +0000 Subject: [PATCH] ENH: globalIndex: helper function to get remote values --- .../test/globalIndex/Test-globalIndex.C | 49 +++++++++++ .../polyMesh/globalMeshData/globalIndex.C | 60 +++++++++++++ .../polyMesh/globalMeshData/globalIndex.H | 27 ++++++ .../globalMeshData/globalIndexTemplates.C | 84 +++++++++++++++++++ 4 files changed, 220 insertions(+) diff --git a/applications/test/globalIndex/Test-globalIndex.C b/applications/test/globalIndex/Test-globalIndex.C index b33fb21306..1587a1352e 100644 --- a/applications/test/globalIndex/Test-globalIndex.C +++ b/applications/test/globalIndex/Test-globalIndex.C @@ -36,6 +36,7 @@ Description #include "Time.H" #include "polyMesh.H" #include "IOstreams.H" +#include "Random.H" using namespace Foam; @@ -163,6 +164,54 @@ int main(int argc, char *argv[]) } } + + + // Get a few cell indices + const label nTotalCells = globalNumbering.size(); + + Random rndGen(Pstream::myProcNo()); + DynamicList