Commit 04dcee76 authored by Henry Weller's avatar Henry Weller
Browse files

RectangularMatrix: Removed the identity function (now in SquareMatrix)

parent e3f3c03c
......@@ -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<Type>);
//- Construct with given number of rows and columns
// and value for all elements.
inline RectangularMatrix(const label m, const label n, const Type&);
......
......@@ -77,22 +77,6 @@ inline Foam::RectangularMatrix<Type>::RectangularMatrix
{}
template<class Type>
inline Foam::RectangularMatrix<Type>::RectangularMatrix
(
const label n,
const Identity<Type>
)
:
Matrix<RectangularMatrix<Type>, Type>(n, n, Zero)
{
for (label i=0; i<n; i++)
{
this->operator()(i, i) = I;
}
}
template<class Type>
inline Foam::RectangularMatrix<Type>::RectangularMatrix
(
......
......@@ -103,7 +103,7 @@ inline Foam::SquareMatrix<Type>::SquareMatrix
{
for (label i=0; i<n; i++)
{
this->operator()(i, i) = I;
this->operator()(i, i) = Type(I);
}
}
......@@ -176,7 +176,7 @@ void Foam::SquareMatrix<Type>::operator=(const Identity<Type>)
Matrix<SquareMatrix<Type>, Type>::operator=(Zero);
for (label i=0; i<this->n(); i++)
{
this->operator()(i, i) = I;
this->operator()(i, i) = Type(I);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment