Inconsistency of globalIndex
Summary
I am trying to generate a list of global cellIDs "for a cellSet" using local cellIDs of a decomposed case.
Steps to reproduce
Following code snip was used:
globalIndex globalNumbering(mesh.nCells());
word cellSetName = "b1";
cellSet c1(mesh, cellSetName);
labelList channelID = c1.toc();
labelList gloProc(channelID.size());
labelList locProc(channelID.size());
for(int d=0; d<channelID.size(); d++)
{
const label globalCId = globalNumbering.toGlobal(channelID[d]);
gloProc[d] = globalCId;
const label localCId = globalNumbering.toLocal(globalCId);
locProc[d] = localCId;
}
Pout << "Local Lists on all Procs " << locProc << nl;
Pout << "Global Lists on all Procs " << gloProc << nl;
Example case
I have tested my code for two cases; cavity and 1D straight channel.
What is the current bug behaviour?
Here, the global cellIDs generated from local match with non-decomposed cellIds (i.e, in constant/polyMesh/sets/) for only the channel case.
They do not match in any way for the cavity case.
What is the expected correct behavior?
The global cellIDs should match with those generated from local cellIDs, for any case.
Relevant logs and/or images
Environment information
- OpenFOAM version : v1806
- Operating system : Ubuntu 18.04
- Hardware info : Hp laptop, i7-5th gen, 4 cores
- Compiler : gcc
Test cases: test_cases.tar.gz
Solver used: testIco.tar.gz
Edited by Ashish Magar