Bugfix: call to completeAssembly in wrong place. Henrik Rusche

This commit is contained in:
Hrvoje Jasak 2019-05-01 09:40:29 +01:00
parent a7f9e38d5c
commit 076919ae55

View file

@ -100,12 +100,14 @@ Foam::coupledFvMatrix<Type>::solve(const dictionary& solverControls)
fvMatrix<Type>& curMatrix = fvMatrix<Type>& curMatrix =
static_cast<fvMatrix<Type>& >(matrices[rowI]); static_cast<fvMatrix<Type>& >(matrices[rowI]);
// HR 12.03.19: Complete assembly before making copies.
curMatrix.completeAssembly();
saveDiag.set(rowI, new scalarField(curMatrix.diag())); saveDiag.set(rowI, new scalarField(curMatrix.diag()));
psiCmpt.set(rowI, new scalarField(curMatrix.psi().size())); psiCmpt.set(rowI, new scalarField(curMatrix.psi().size()));
source.set(rowI, new Field<Type>(curMatrix.source())); source.set(rowI, new Field<Type>(curMatrix.source()));
sourceCmpt.set(rowI, new scalarField(curMatrix.psi().size())); sourceCmpt.set(rowI, new scalarField(curMatrix.psi().size()));
curMatrix.completeAssembly();
curMatrix.addBoundarySource(source[rowI]); curMatrix.addBoundarySource(source[rowI]);
interfaces[rowI] = curMatrix.psi().boundaryField().interfaces(); interfaces[rowI] = curMatrix.psi().boundaryField().interfaces();