445 int m = theA.GetRows();
446 int n = theA.GetColumns();
448 int pivotSize = std::max(1, std::min(m, n));
450 m_ipivot = Array<OneD, int>(pivotSize);
456 std::string message =
"ERROR: The " + std::to_string(-info) +
"th parameter had an illegal parameter for dgetrf";
461 std::string message =
"ERROR: Element u_" + std::to_string(info) + std::to_string(info) +
" is 0 from dgetrf";
467 for(
unsigned int i = 0; i < theA.GetColumns(); ++i)
469 A[i] = 1.0/theA(i,i);
478 int pivotSize = theA.GetRows();
479 m_ipivot = Array<OneD, int>(pivotSize);
485 std::string message =
"ERROR: The " + std::to_string(-info) +
"th parameter had an illegal parameter for dsptrf";
490 std::string message =
"ERROR: Element u_" + std::to_string(info) + std::to_string(info) +
" is 0 from dsptrf";
502 std::string message =
"ERROR: The " + std::to_string(-info) +
"th parameter had an illegal parameter for dpptrf";
507 std::string message =
"ERROR: The leading minor of order " + std::to_string(info) +
" is not positive definite from dpptrf";
525 unsigned int rawRows = KL+KU+1;
526 A = Array<OneD, double>(requiredStorageSize);
529 for(
unsigned int i = 0; i < theA.GetColumns(); ++i)
531 std::copy(theA.GetRawPtr() + i*rawRows, theA.GetRawPtr() + (i+1)*rawRows,
532 A.get() + (i+1)*KL + i*rawRows);
536 int pivotSize = theA.GetRows();
537 m_ipivot = Array<OneD, int>(pivotSize);
543 std::string message =
"ERROR: The " + std::to_string(-info) +
"th parameter had an illegal parameter for dgbtrf";
548 std::string message =
"ERROR: Element u_" + std::to_string(info) + std::to_string(info) +
" is 0 from dgbtrf";
556 std::string(
"Number of sub- and superdiagonals should ") +
557 std::string(
"be equal for a symmetric banded matrix"));
565 std::string message =
"ERROR: The " + std::to_string(-info) +
"th parameter had an illegal parameter for dpbtrf";
570 std::string message =
"ERROR: The leading minor of order " + std::to_string(info) +
" is not positive definite from dpbtrf";
static void Dgetrf(const int &m, const int &n, double *a, const int &lda, int *ipiv, int &info)
General matrix LU factorisation.
#define ASSERTL0(condition, msg)
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
MatrixStorage m_matrixType
unsigned int m_numberOfSuperDiagonals
static void Dpbtrf(const char &uplo, const int &n, const int &kd, double *ab, const int &ldab, int &info)
Cholesky factorize a real positive-definite banded-symmetric matrix.
static void Dgbtrf(const int &m, const int &n, const int &kl, const int &ku, double *a, const int &lda, int *ipiv, int &info)
General banded matrix LU factorisation.
static void Dpptrf(const char &uplo, const int &n, double *ap, int &info)
Cholesky factor a real Positive Definite packed-symmetric matrix.
static void Dsptrf(const char &uplo, const int &n, double *ap, int *ipiv, int &info)
factor a real packed-symmetric matrix using Bunch-Kaufman pivoting.
unsigned int m_numberOfSubDiagonals
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
static unsigned int GetRequiredStorageSize(unsigned int totalRows, unsigned int totalColumns, unsigned int subDiags, unsigned int superDiags)
Calculates and returns the storage size required.
Array< OneD, int > m_ipivot