diff --git a/include/cantera/numerics/GeneralMatrix.h b/include/cantera/numerics/GeneralMatrix.h index 10083904f..195dbf608 100644 --- a/include/cantera/numerics/GeneralMatrix.h +++ b/include/cantera/numerics/GeneralMatrix.h @@ -16,6 +16,7 @@ #include "cantera/base/ct_defs.h" #include "cantera/base/ctexceptions.h" +#include "cantera/base/global.h" namespace Cantera { @@ -25,15 +26,13 @@ class GeneralMatrix { public: //! Base Constructor - /*! - * @param matType Matrix type - * 0 full - * 1 banded - */ - GeneralMatrix(int matType); + explicit GeneralMatrix(int matType=-1) : m_factored(false) { + if (matType != -1) { + warn_deprecated("GeneralMatrix", "Integer argument to constructor " + "is deprecated and will be removed after Cantera 2.3."); + } + } - GeneralMatrix(const GeneralMatrix& right); - GeneralMatrix& operator=(const GeneralMatrix& right); virtual ~GeneralMatrix() {} //! Duplicator member function @@ -207,13 +206,6 @@ public: */ virtual size_t checkColumns(doublereal& valueSmall) const = 0; - //! Matrix type - /*! - * 0 Square - * 1 Banded - */ - int matrixType_; - protected: //! Indicates whether the matrix is factored. 0 for unfactored; Non-zero //! values indicate a particular factorization (LU=1, QR=2). diff --git a/src/numerics/BandMatrix.cpp b/src/numerics/BandMatrix.cpp index 435bfdb9f..51dc341dc 100644 --- a/src/numerics/BandMatrix.cpp +++ b/src/numerics/BandMatrix.cpp @@ -26,7 +26,6 @@ namespace Cantera { BandMatrix::BandMatrix() : - GeneralMatrix(1), m_n(0), m_kl(0), m_ku(0), @@ -35,7 +34,6 @@ BandMatrix::BandMatrix() : } BandMatrix::BandMatrix(size_t n, size_t kl, size_t ku, doublereal v) : - GeneralMatrix(1), m_n(n), m_kl(kl), m_ku(ku), diff --git a/src/numerics/GeneralMatrix.cpp b/src/numerics/GeneralMatrix.cpp deleted file mode 100644 index 937b4d3aa..000000000 --- a/src/numerics/GeneralMatrix.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//! @file GeneralMatrix.cpp - -/* - * Copyright 2004 Sandia Corporation. Under the terms of Contract - * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government - * retains certain rights in this software. - * See file License.txt for licensing information. - */ - -#include "cantera/numerics/GeneralMatrix.h" -using namespace std; - -namespace Cantera -{ - -GeneralMatrix::GeneralMatrix(int matType) : - matrixType_(matType), - m_factored(0) -{ -} - -GeneralMatrix::GeneralMatrix(const GeneralMatrix& y) : - matrixType_(y.matrixType_), - m_factored(y.m_factored) -{ -} - -GeneralMatrix& GeneralMatrix::operator=(const GeneralMatrix& y) -{ - if (&y == this) { - return *this; - } - matrixType_ = y.matrixType_; - m_factored = y.m_factored; - return *this; -} - -} diff --git a/src/numerics/SquareMatrix.cpp b/src/numerics/SquareMatrix.cpp index 9e595d0a7..6e78735f5 100644 --- a/src/numerics/SquareMatrix.cpp +++ b/src/numerics/SquareMatrix.cpp @@ -17,7 +17,6 @@ namespace Cantera { SquareMatrix::SquareMatrix() : - GeneralMatrix(0), a1norm_(0.0), useQR_(0) { @@ -27,7 +26,6 @@ SquareMatrix::SquareMatrix() : SquareMatrix::SquareMatrix(size_t n, doublereal v) : DenseMatrix(n, n, v), - GeneralMatrix(0), a1norm_(0.0), useQR_(0) { @@ -37,7 +35,7 @@ SquareMatrix::SquareMatrix(size_t n, doublereal v) : SquareMatrix::SquareMatrix(const SquareMatrix& y) : DenseMatrix(y), - GeneralMatrix(0), + GeneralMatrix(y), a1norm_(y.a1norm_), useQR_(y.useQR_) {