From 076919ae5575906db9cc39a4f5a8b58a74bfc538 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Wed, 1 May 2019 09:40:29 +0100 Subject: [PATCH] Bugfix: call to completeAssembly in wrong place. Henrik Rusche --- .../coupledFvMatrices/coupledFvMatrix/coupledFvMatrix.C | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/coupledMatrix/coupledFvMatrices/coupledFvMatrix/coupledFvMatrix.C b/src/coupledMatrix/coupledFvMatrices/coupledFvMatrix/coupledFvMatrix.C index 6dade9e19..b982884a3 100644 --- a/src/coupledMatrix/coupledFvMatrices/coupledFvMatrix/coupledFvMatrix.C +++ b/src/coupledMatrix/coupledFvMatrices/coupledFvMatrix/coupledFvMatrix.C @@ -100,12 +100,14 @@ Foam::coupledFvMatrix::solve(const dictionary& solverControls) fvMatrix& curMatrix = static_cast& >(matrices[rowI]); + // HR 12.03.19: Complete assembly before making copies. + curMatrix.completeAssembly(); + saveDiag.set(rowI, new scalarField(curMatrix.diag())); psiCmpt.set(rowI, new scalarField(curMatrix.psi().size())); source.set(rowI, new Field(curMatrix.source())); sourceCmpt.set(rowI, new scalarField(curMatrix.psi().size())); - curMatrix.completeAssembly(); curMatrix.addBoundarySource(source[rowI]); interfaces[rowI] = curMatrix.psi().boundaryField().interfaces();