10#ifndef CT_GENERALMATRIX_H
11#define CT_GENERALMATRIX_H
38 virtual void mult(
const double* b,
double* prod)
const = 0;
45 virtual void leftMult(
const double*
const b,
double*
const prod)
const = 0;
80 virtual double rcond(
double a1norm) = 0;
99 virtual size_t nRows()
const = 0;
113 virtual int solve(
double* b,
size_t nrhs=1,
size_t ldb=0) = 0;
148 virtual vector<double>::iterator
begin() = 0;
154 virtual vector<double>::const_iterator
begin()
const = 0;
virtual double rcondQR()
Returns an estimate of the inverse of the condition number for the matrix.
GeneralMatrix()=default
Base Constructor.
virtual int factor()=0
Factors the A matrix, overwriting A.
virtual size_t checkColumns(double &valueSmall) const =0
Check to see if we have any zero columns in the Jacobian.
virtual vector< double >::iterator begin()=0
Return an iterator pointing to the first element.
virtual void clearFactorFlag()
clear the factored flag
virtual size_t checkRows(double &valueSmall) const =0
Check to see if we have any zero rows in the Jacobian.
virtual vector< double >::const_iterator begin() const =0
Return a const iterator pointing to the first element.
virtual double rcond(double a1norm)=0
Returns an estimate of the inverse of the condition number for the matrix.
virtual int factorQR()
Factors the A matrix using the QR algorithm, overwriting A.
virtual int factorAlgorithm() const =0
Return the factor algorithm used.
virtual int solve(double *b, size_t nrhs=1, size_t ldb=0)=0
Solves the Ax = b system returning x in the b spot.
virtual double oneNorm() const =0
Calculate the one norm of the matrix.
virtual size_t nRows() const =0
Return the number of rows in the matrix.
virtual double & operator()(size_t i, size_t j)=0
Index into the (i,j) element.
virtual double operator()(size_t i, size_t j) const =0
Constant Index into the (i,j) element.
virtual double *const * colPts()=0
Return a vector of const pointers to the columns.
virtual void zero()=0
Zero the matrix elements.
int m_factored
Indicates whether the matrix is factored.
virtual void useFactorAlgorithm(int fAlgorithm)
Change the way the matrix is factored.
virtual double * ptrColumn(size_t j)=0
Return a pointer to the top of column j, columns are assumed to be contiguous in memory.
virtual void leftMult(const double *const b, double *const prod) const =0
Multiply b*A and write result to prod.
virtual void mult(const double *b, double *prod) const =0
Multiply A*b and write result to prod.
virtual bool factored() const
true if the current factorization is up to date with the matrix
An error indicating that an unimplemented function has been called.
This file contains definitions of constants, types and terms that are used in internal routines and a...
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
This file contains definitions for utility functions and text for modules, inputfiles and logging,...
Namespace for the Cantera kernel.