From cdec2e90c7ab43d402aa4ddf13fcfc2648c076a2 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Tue, 5 Aug 2014 23:11:58 +0000 Subject: [PATCH] Fixes need to restore capability to solve banded systems with nonlinear solver --- include/cantera/numerics/BandMatrix.h | 9 +++++++++ src/numerics/BandMatrix.cpp | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/include/cantera/numerics/BandMatrix.h b/include/cantera/numerics/BandMatrix.h index 80bb60e33..65b0a4909 100644 --- a/include/cantera/numerics/BandMatrix.h +++ b/include/cantera/numerics/BandMatrix.h @@ -301,6 +301,15 @@ public: */ virtual size_t checkColumns(doublereal& valueSmall) const; + //! Change the way the matrix is factored + /*! + * @param fAlgorithm integer + * 0 LU factorization + * 1 QR factorization + */ + virtual void useFactorAlgorithm(int fAlgorithm); + + protected: //! Matrix data diff --git a/src/numerics/BandMatrix.cpp b/src/numerics/BandMatrix.cpp index 3601d5b6e..95c2a7d49 100644 --- a/src/numerics/BandMatrix.cpp +++ b/src/numerics/BandMatrix.cpp @@ -441,4 +441,10 @@ void BandMatrix::copyData(const GeneralMatrix& y) (void) memcpy(DATA_PTR(data), yyPtr->ptrColumn(0), n); } +void BandMatrix::useFactorAlgorithm(int fAlgorithm) +{ +// useQR_ = fAlgorithm; +} + + }