[Numerics] Deprecate class SquareMatrix

This commit is contained in:
Ray Speth 2016-04-11 15:39:22 -04:00
parent a7d854f3b9
commit f260e858c0
5 changed files with 10 additions and 6 deletions

View file

@ -10,6 +10,5 @@
#include "numerics/DenseMatrix.h"
#include "numerics/BandMatrix.h"
#include "numerics/SquareMatrix.h"
#endif

View file

@ -15,7 +15,7 @@
#define CT_RESIDJACEVAL_H
#include "ResidEval.h"
#include "GeneralMatrix.h"
#include "DenseMatrix.h"
namespace Cantera
{
@ -271,7 +271,7 @@ public:
* @param cj Coefficient of yprime used in the evaluation of the Jacobian
* @param y Solution vector (input, do not modify)
* @param ydot Rate of change of solution vector. (input, do not modify)
* @param J Reference to the SquareMatrix object to be calculated (output)
* @param J Reference to the DenseMatrix object to be calculated (output)
* @param resid Value of the residual that is computed (output)
* @returns a flag to indicate that operation is successful.
* 1 Means a successful operation
@ -279,7 +279,7 @@ public:
*/
virtual int evalJacobian(const doublereal t, const doublereal delta_t, doublereal cj,
const doublereal* const y, const doublereal* const ydot,
GeneralMatrix& J, doublereal* const resid);
DenseMatrix& J, doublereal* const resid);
//! Calculate an analytical Jacobian and the residual at the current time and values.
/*!
@ -290,7 +290,7 @@ public:
* @param cj Coefficient of yprime used in the evaluation of the Jacobian
* @param y Solution vector (input, do not modify)
* @param ydot Rate of change of solution vector. (input, do not modify)
* @param jacobianColPts Pointer to the vector of pts to columns of the SquareMatrix
* @param jacobianColPts Pointer to the vector of pts to columns of the DenseMatrix
* object to be calculated (output)
* @param resid Value of the residual that is computed (output)
* @returns a flag to indicate that operation is successful.

View file

@ -19,6 +19,7 @@ namespace Cantera
/**
* A class for full (non-sparse) matrices with Fortran-compatible data storage.
* Adds matrix inversion operations to this class from DenseMatrix.
* @deprecated Use class DenseMatrix instead. To be removed after Cantera 2.3.
*/
class SquareMatrix: public DenseMatrix, public GeneralMatrix
{

View file

@ -164,7 +164,7 @@ int ResidJacEval::eval(const doublereal t, const doublereal* const y, const doub
int ResidJacEval::evalJacobian(const doublereal t, const doublereal delta_t,
doublereal cj, const doublereal* const y,
const doublereal* const ydot, GeneralMatrix& J,
const doublereal* const ydot, DenseMatrix& J,
doublereal* const resid)
{
doublereal* const* jac_colPts = J.colPts();

View file

@ -21,6 +21,8 @@ SquareMatrix::SquareMatrix() :
a1norm_(0.0),
useQR_(0)
{
warn_deprecated("class SquareMatrix",
"Use class DenseMatrix instead. To be removed after Cantera 2.3.");
}
SquareMatrix::SquareMatrix(size_t n, doublereal v) :
@ -29,6 +31,8 @@ SquareMatrix::SquareMatrix(size_t n, doublereal v) :
a1norm_(0.0),
useQR_(0)
{
warn_deprecated("class SquareMatrix",
"Use class DenseMatrix instead. To be removed after Cantera 2.3.");
}
SquareMatrix::SquareMatrix(const SquareMatrix& y) :