From 04dcee7680a191df6baa99056b28789df8b655a7 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 25 Mar 2016 22:35:03 +0000 Subject: [PATCH] RectangularMatrix: Removed the identity function (now in SquareMatrix) --- .../RectangularMatrix/RectangularMatrix.H | 5 ----- .../RectangularMatrix/RectangularMatrixI.H | 16 ---------------- .../matrices/SquareMatrix/SquareMatrixI.H | 4 ++-- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/src/OpenFOAM/matrices/RectangularMatrix/RectangularMatrix.H b/src/OpenFOAM/matrices/RectangularMatrix/RectangularMatrix.H index 84a8315113..dd7b5bb8ca 100644 --- a/src/OpenFOAM/matrices/RectangularMatrix/RectangularMatrix.H +++ b/src/OpenFOAM/matrices/RectangularMatrix/RectangularMatrix.H @@ -40,7 +40,6 @@ SourceFiles #include "Matrix.H" #include "SquareMatrix.H" -#include "Identity.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -79,10 +78,6 @@ public: // initializing all elements to zero inline RectangularMatrix(const label m, const label n, const zero); - //- Construct given number of rows/columns - // Initializing to the identity matrix - inline RectangularMatrix(const label n, const Identity); - //- Construct with given number of rows and columns // and value for all elements. inline RectangularMatrix(const label m, const label n, const Type&); diff --git a/src/OpenFOAM/matrices/RectangularMatrix/RectangularMatrixI.H b/src/OpenFOAM/matrices/RectangularMatrix/RectangularMatrixI.H index 1cb6e0c0c9..e07888e25b 100644 --- a/src/OpenFOAM/matrices/RectangularMatrix/RectangularMatrixI.H +++ b/src/OpenFOAM/matrices/RectangularMatrix/RectangularMatrixI.H @@ -77,22 +77,6 @@ inline Foam::RectangularMatrix::RectangularMatrix {} -template -inline Foam::RectangularMatrix::RectangularMatrix -( - const label n, - const Identity -) -: - Matrix, Type>(n, n, Zero) -{ - for (label i=0; ioperator()(i, i) = I; - } -} - - template inline Foam::RectangularMatrix::RectangularMatrix ( diff --git a/src/OpenFOAM/matrices/SquareMatrix/SquareMatrixI.H b/src/OpenFOAM/matrices/SquareMatrix/SquareMatrixI.H index 7dbc3bde28..12ecd2530f 100644 --- a/src/OpenFOAM/matrices/SquareMatrix/SquareMatrixI.H +++ b/src/OpenFOAM/matrices/SquareMatrix/SquareMatrixI.H @@ -103,7 +103,7 @@ inline Foam::SquareMatrix::SquareMatrix { for (label i=0; ioperator()(i, i) = I; + this->operator()(i, i) = Type(I); } } @@ -176,7 +176,7 @@ void Foam::SquareMatrix::operator=(const Identity) Matrix, Type>::operator=(Zero); for (label i=0; in(); i++) { - this->operator()(i, i) = I; + this->operator()(i, i) = Type(I); } }