diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index 2134420ead..0fcf2e626d 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -1168,7 +1168,7 @@ void Foam::fvMatrix::operator*= } -// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * // template void Foam::checkMethod @@ -1297,7 +1297,27 @@ Foam::lduMatrix::solverPerformance Foam::solve(const tmp >& tfvm) } -// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // +template +Foam::tmp > Foam::correction +( + const fvMatrix& A +) +{ + return A - (A & A.psi()); +} + + +template +Foam::tmp > Foam::correction +( + const tmp >& tA +) +{ + return tA - (tA() & tA().psi()); +} + + +// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * // template Foam::tmp > Foam::operator== diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H index e14c0fe497..8ae502cb57 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H @@ -547,6 +547,18 @@ template lduMatrix::solverPerformance solve(const tmp >&); +//- Return the correction form of the given matrix +// by subtracting the matrix multiplied by the current field +template +tmp > correction(const fvMatrix&); + + +//- Return the correction form of the given temporary matrix +// by subtracting the matrix multiplied by the current field +template +tmp > correction(const tmp >&); + + // * * * * * * * * * * * * * * * Global operators * * * * * * * * * * * * * // template