Merge Request #31: BUGFIX: Minor bugfixes to coupled Matrix. Author: Henrik Rusche. Merge: Henrik Rusche
https://sourceforge.net/p/foam-extend/foam-extend-3.2/merge-requests/31/
This commit is contained in:
commit
81847628ea
3 changed files with 6 additions and 3 deletions
|
@ -105,6 +105,7 @@ Foam::coupledFvMatrix<Type>::solve(const dictionary& solverControls)
|
|||
source.set(rowI, new Field<Type>(curMatrix.source()));
|
||||
sourceCmpt.set(rowI, new scalarField(curMatrix.psi().size()));
|
||||
|
||||
curMatrix.completeAssembly();
|
||||
curMatrix.addBoundarySource(source[rowI]);
|
||||
|
||||
interfaces[rowI] = curMatrix.psi().boundaryField().interfaces();
|
||||
|
|
|
@ -68,6 +68,8 @@ coupledSolverPerformance coupledFvMatrix<scalar>::solve
|
|||
fvScalarMatrix& curMatrix =
|
||||
static_cast<fvScalarMatrix&>(matrices[rowI]);
|
||||
|
||||
curMatrix.completeAssembly();
|
||||
|
||||
saveDiag.set(rowI, new scalarField(curMatrix.diag()));
|
||||
|
||||
// Need to be able to compare references to support hacks
|
||||
|
|
|
@ -89,13 +89,13 @@ Foam::scalar Foam::coupledIterativeSolver::normFactor
|
|||
{
|
||||
typedef FieldField<Field, scalar> scalarFieldField;
|
||||
|
||||
// Calculate reference value of x
|
||||
scalar xRef = gAverage(x);
|
||||
|
||||
scalarFieldField pA(x.size());
|
||||
|
||||
forAll (x, rowI)
|
||||
{
|
||||
// Calculate reference value of x
|
||||
scalar xRef = gAverage(x[rowI]);
|
||||
|
||||
pA.set(rowI, new scalarField(x[rowI].size(), xRef));
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue