BUG: masterCoarsest: do not agglomerate: Fixes #2455.

If the initial mesh does not have enough levels
do not do any agglomeration
This commit is contained in:
mattijs 2022-05-04 17:56:10 +01:00
parent d00445ace9
commit df63b47fbc

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2013-2017 OpenFOAM Foundation
Copyright (C) 2021 OpenCFD Ltd.
Copyright (C) 2021-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -279,7 +279,7 @@ bool Foam::GAMGProcAgglomeration::agglomerate
const lduMesh& levelMesh = agglom_.meshLevels_[fineLevelIndex];
label levelComm = levelMesh.comm();
if (Pstream::myProcNo(levelComm) != -1)
if (fineLevelIndex > 0 && Pstream::myProcNo(levelComm) != -1)
{
// Collect meshes and restrictAddressing onto master
// Overwrites the fine mesh (meshLevels_[index-1]) and addressing