diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index f78213e1d9..31d557601b 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -456,10 +456,10 @@ void Foam::fvMatrix::setValues if (internalCoeffs_[patchi].size()) { - label patchFacei = + label patchFacei = mesh.boundaryMesh()[patchi].whichFace(facei); - internalCoeffs_[patchi][patchFacei] = + internalCoeffs_[patchi][patchFacei] = pTraits::zero; boundaryCoeffs_[patchi][patchFacei] = @@ -477,10 +477,11 @@ template void Foam::fvMatrix::setReference ( const label cell, - const Type& value + const Type& value, + const bool forceReference ) { - if (psi_.needReference()) + if (psi_.needReference() || forceReference) { if (Pstream::master()) { @@ -653,7 +654,7 @@ Foam::tmp Foam::fvMatrix::A() const template -Foam::tmp > +Foam::tmp > Foam::fvMatrix::H() const { tmp > tHphi @@ -838,7 +839,7 @@ flux() const forAll(fieldFlux.boundaryField(), patchI) { - fieldFlux.boundaryField()[patchI] = + fieldFlux.boundaryField()[patchI] = InternalContrib[patchI] - NeighbourContrib[patchI]; } @@ -1255,7 +1256,7 @@ Foam::lduMatrix::solverPerformance Foam::solve Istream& solverControls ) { - lduMatrix::solverPerformance solverPerf = + lduMatrix::solverPerformance solverPerf = const_cast&>(tfvm()).solve(solverControls); tfvm.clear(); diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H index f9c82a2d58..5abb7ca0d6 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H @@ -327,7 +327,8 @@ public: void setReference ( const label cell, - const Type& value + const Type& value, + const bool forceReference = false ); //- Set reference level for a component of the solution