Bugfix: Initialisation of child array

This commit is contained in:
Hrvoje Jasak 2018-05-15 10:38:36 +01:00
parent 5f8851bb50
commit d6ae246151

View file

@ -64,7 +64,6 @@ void Foam::pamgPolicy::calcChild()
if (matrix().diagonal()) if (matrix().diagonal())
{ {
// Diag only matrix. Reset and return // Diag only matrix. Reset and return
child_ = 0;
nCoarseEqns_ = 1; nCoarseEqns_ = 1;
return; return;
@ -152,14 +151,7 @@ void Foam::pamgPolicy::calcChild()
{ {
magOffDiag = mag(matrix().upper()); magOffDiag = mag(matrix().upper());
} }
else // Diag only matrix already handled. HJ, 21/Feb/2018
{
// Diag only matrix. Reset and return
child_ = 0;
nCoarseEqns_ = 1;
return;
}
nCoarseEqns_ = 0; nCoarseEqns_ = 0;
@ -349,7 +341,7 @@ Foam::pamgPolicy::pamgPolicy
groupSize, groupSize,
minCoarseEqns minCoarseEqns
), ),
child_(matrix.lduAddr().size()), child_(),
nSolo_(0), nSolo_(0),
nCoarseEqns_(0), nCoarseEqns_(0),
coarsen_(false) coarsen_(false)