From a14dd6c72346bf42b6b9aa1642bb155367f327a5 Mon Sep 17 00:00:00 2001
From: andy <andy>
Date: Tue, 7 Jun 2011 10:48:11 +0100
Subject: [PATCH] BUG: corrected residual calc in solve

---
 src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C
index 93d52276fcb..db9d05db908 100644
--- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C
+++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C
@@ -219,7 +219,7 @@ Foam::lduMatrix::solverPerformance Foam::fvMatrix<Type>::solve()
 template<class Type>
 Foam::tmp<Foam::Field<Type> > Foam::fvMatrix<Type>::residual() const
 {
-    tmp<Field<Type> > tres(source_);
+    tmp<Field<Type> > tres(new Field<Type>(source_));
     Field<Type>& res = tres();
 
     addBoundarySource(res);
-- 
GitLab