ENH: redistributePar: create dummy sets on non-existing processors

This commit is contained in:
mattijs
2017-10-26 09:10:21 +01:00
parent 9a7c236add
commit 6fd6610b57
2 changed files with 50 additions and 3 deletions

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -1348,7 +1348,15 @@ Foam::labelList Foam::decompositionMethod::decompose
{
// If no processor specified use the one from the
// 0th element
proci = finalDecomp[mesh.faceOwner()[set[0]]];
if (set.size())
{
proci = finalDecomp[mesh.faceOwner()[set[0]]];
}
else
{
// Zero-sized processor (e.g. from redistributePar)
proci = 0;
}
}
forAll(set, fI)