From 8c239ea29233315cc84a403721f0347f3343aacc Mon Sep 17 00:00:00 2001
From: Tomas Oberhuber <tomas.oberhuber@fjfi.cvut.cz>
Date: Sun, 12 May 2013 23:45:39 +0200
Subject: [PATCH] Fixing the linear diffusion.

---
 src/matrix/tnlMatrix.h                     | 3 ++-
 src/schemes/diffusion/tnlLinearDiffusion.h | 1 +
 src/schemes/euler/fvm/tnlLaxFridrichs.h    | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/matrix/tnlMatrix.h b/src/matrix/tnlMatrix.h
index b86db4baa4..65ad440c4a 100644
--- a/src/matrix/tnlMatrix.h
+++ b/src/matrix/tnlMatrix.h
@@ -127,7 +127,8 @@ class tnlMatrix : public tnlObject
 
    bool load( const tnlString& fileName );
 
-   tnlMatrix< Real, Device, Index >& operator = ( const tnlMatrix< Real, Device, Index >& matrix );
+   template< typename Real2 >
+   tnlMatrix< Real, Device, Index >& operator = ( const tnlMatrix< Real2, Device, Index >& matrix );
 
    /*!
     * Computes permutation of the rows such that the rows would be
diff --git a/src/schemes/diffusion/tnlLinearDiffusion.h b/src/schemes/diffusion/tnlLinearDiffusion.h
index 0c1a0d00d0..cb0b59376c 100644
--- a/src/schemes/diffusion/tnlLinearDiffusion.h
+++ b/src/schemes/diffusion/tnlLinearDiffusion.h
@@ -21,6 +21,7 @@
 #include <mesh/tnlGrid.h>
 #include <mesh/tnlIdenticalGridGeometry.h>
 #include <core/tnlHost.h>
+#include <core/tnlSharedVector.h>
 
 template< typename Mesh >
 class tnlLinearDiffusion
diff --git a/src/schemes/euler/fvm/tnlLaxFridrichs.h b/src/schemes/euler/fvm/tnlLaxFridrichs.h
index 8ccd7232fc..70642b94ef 100644
--- a/src/schemes/euler/fvm/tnlLaxFridrichs.h
+++ b/src/schemes/euler/fvm/tnlLaxFridrichs.h
@@ -24,7 +24,7 @@
 #include <schemes/gradient/tnlCentralFDMGradient.h>
 
 template< typename MeshType,
-          typename PressureGradient >
+          typename PressureGradient = tnlCentralFDMGradient >
 class tnlLaxFridrichs
 {
 };
-- 
GitLab