[Numerics] Deprecate matrix-type argument to GeneralMatrix
This commit is contained in:
parent
f260e858c0
commit
01d3679664
4 changed files with 8 additions and 58 deletions
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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_)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue