34 namespace LAPACKFullMatrixImplementation
48 std::vector<T> &real_part_eigenvalues,
49 std::vector<T> &imag_part_eigenvalues,
50 std::vector<T> &left_eigenvectors,
51 std::vector<T> &right_eigenvectors,
52 std::vector<T> &real_work,
57 static_assert(std::is_same_v<T, double> || std::is_same_v<T, float>,
58 "Only implemented for double and float");
59 Assert(
matrix.size() ==
static_cast<std::size_t
>(n_rows * n_rows),
61 Assert(
static_cast<std::size_t
>(n_rows) <= real_part_eigenvalues.size(),
63 Assert(
static_cast<std::size_t
>(n_rows) <= imag_part_eigenvalues.size(),
66 Assert(
static_cast<std::size_t
>(n_rows * n_rows) <=
67 left_eigenvectors.size(),
70 Assert(
static_cast<std::size_t
>(n_rows * n_rows) <=
71 right_eigenvectors.size(),
74 static_cast<std::size_t
>(2 * n_rows) <= real_work.size(),
76 Assert(work_flag == -1 || std::max<long int>(1, 3 * n_rows) <= work_flag,
83 real_part_eigenvalues.data(),
84 imag_part_eigenvalues.data(),
85 left_eigenvectors.data(),
87 right_eigenvectors.data(),
104 std::vector<std::complex<T>> &left_eigenvectors,
105 std::vector<std::complex<T>> &right_eigenvectors,
106 std::vector<std::complex<T>> &complex_work,
107 std::vector<T> &real_work,
112 std::is_same_v<T, double> || std::is_same_v<T, float>,
113 "Only implemented for std::complex<double> and std::complex<float>");
114 Assert(
matrix.size() ==
static_cast<std::size_t
>(n_rows * n_rows),
119 Assert(
static_cast<std::size_t
>(n_rows * n_rows) <=
120 left_eigenvectors.size(),
123 Assert(
static_cast<std::size_t
>(n_rows * n_rows) <=
124 right_eigenvectors.size(),
127 std::max<std::size_t>(1, work_flag) <= real_work.size(),
129 Assert(work_flag == -1 || std::max<long int>(1, 2 * n_rows) <= work_flag,
138 left_eigenvectors.data(),
140 right_eigenvectors.data(),
150 template <
typename T>
156 std::vector<T> &singular_values,
159 std::vector<T> &real_work,
161 std::vector<types::blas_int> &integer_work,
165 Assert(job ==
'A' || job ==
'S' || job ==
'O' || job ==
'N',
167 Assert(
static_cast<std::size_t
>(n_rows * n_cols) ==
matrix.size(),
169 Assert(std::min<std::size_t>(n_rows, n_cols) <= singular_values.size(),
171 Assert(8 * std::min<std::size_t>(n_rows, n_cols) <= integer_work.size(),
174 static_cast<std::size_t
>(work_flag) <= real_work.size(),
181 singular_values.data(),
184 right_vectors.
data(),
194 template <
typename T>
200 std::vector<T> &singular_values,
203 std::vector<std::complex<T>> &work,
204 std::vector<T> &real_work,
205 std::vector<types::blas_int> &integer_work,
209 Assert(job ==
'A' || job ==
'S' || job ==
'O' || job ==
'N',
211 Assert(
static_cast<std::size_t
>(n_rows * n_cols) ==
matrix.size(),
214 singular_values.size(),
216 Assert(8 * std::min<std::size_t>(n_rows, n_cols) <= integer_work.size(),
219 static_cast<std::size_t
>(work_flag) <= real_work.size(),
227 singular_values.data(),
230 right_vectors.
data(),
243template <
typename number>
252template <
typename number>
261template <
typename number>
270template <
typename number>
282template <
typename number>
292template <
typename number>
301 (*
this)(i, j) = copy(i, j);
306template <
typename number>
309 const std::array<number, 3> &csr,
322 const number t =
A(i, j);
323 A(i, j) = csr[0] *
A(i, j) + csr[1] *
A(k, j);
324 A(k, j) = -csr[1] * t + csr[0] *
A(k, j);
331 const number t =
A(j, i);
332 A(j, i) = csr[0] *
A(j, i) + csr[1] *
A(j, k);
333 A(j, k) = -csr[1] * t + csr[0] *
A(j, k);
340template <
typename number>
356 const size_type jj = (j < col ? j : j + 1);
359 const size_type ii = (i < row ? i : i + 1);
360 (*this)(i, j) = copy(ii, jj);
367template <
typename number>
377template <
typename number>
378template <
typename number2>
384 for (
size_type i = 0; i < this->m(); ++i)
385 for (
size_type j = 0; j < this->n(); ++j)
386 (*
this)(i, j) = M(i, j);
395template <
typename number>
396template <
typename number2>
402 for (
size_type i = 0; i < this->m(); ++i)
403 for (
size_type j = 0; j < this->n(); ++j)
404 (*
this)(i, j) = M.
el(i, j);
413template <
typename number>
419 if (this->n_elements() != 0)
420 this->reset_values();
428template <
typename number>
437 const char type =
'G';
438 const number cfrom = 1.;
445 number *values = this->values.data();
447 lascl(&type, &kl, &kl, &cfrom, &factor, &m, &n, values, &lda, &info);
457template <
typename number>
468 const char type =
'G';
469 const number cto = 1.;
476 number *values = this->values.data();
478 lascl(&type, &kl, &kl, &factor, &cto, &m, &n, values, &lda, &info);
488template <
typename number>
506 number *values = this->values.data();
507 const number *values_A =
A.values.data();
509 axpy(&n, &a, values_A, &inc, values, &inc);
516 template <
typename number>
545 const std::array<number, 3> csr =
551 const number t =
A(i, k);
552 A(i, k) = csr[0] *
A(i, k) + csr[1] * z(i);
553 z(i) = -csr[1] * t + csr[0] * z(i);
588 const std::array<number, 3> csr =
594 const number t =
A(i, k);
595 A(i, k) = csr[0] *
A(i, k) - csr[1] * z(i);
596 z(i) = -csr[1] * t + csr[0] * z(i);
603 template <
typename number>
606 const std::complex<number> ,
607 const Vector<std::complex<number>> & )
615template <
typename number>
634 syr(&uplo, &
N, &a, v.
begin(), &incx, this->values.begin(), &lda);
643 (*
this)(i, j) = (*
this)(j, i);
647 cholesky_rank1(*
this, a, v);
655template <
typename number>
659 const bool adding)
const
663 const number alpha = 1.;
664 const number beta = (adding ? 1. : 0.);
665 const number null = 0.;
669 (mm == nn) && state ==
matrix)
676 const char diag =
'N';
677 const char trans =
'N';
688 &uplo, &trans, &diag, &
N, this->values.data(), &lda, w.data(), &incx);
716 std::scoped_lock lock(mutex);
725 svd_vt->values.data(),
733 for (
size_type i = 0; i < wr.size(); ++i)
740 svd_u->values.data(),
751 std::scoped_lock lock(mutex);
760 svd_u->values.data(),
768 for (size_type i = 0; i < wr.size(); ++i)
775 svd_vt->values.data(),
791template <
typename number>
795 const bool adding)
const
799 const number alpha = 1.;
800 const number beta = (adding ? 1. : 0.);
801 const number null = 0.;
805 (mm == nn) && state ==
matrix)
812 const char diag =
'N';
813 const char trans =
'T';
824 &uplo, &trans, &diag, &
N, this->values.data(), &lda, w.data(), &incx);
853 std::scoped_lock lock(mutex);
863 svd_u->values.data(),
871 for (
size_type i = 0; i < wr.size(); ++i)
878 svd_vt->values.data(),
889 std::scoped_lock lock(mutex);
899 svd_vt->values.data(),
907 for (size_type i = 0; i < wr.size(); ++i)
914 svd_u->values.data(),
930template <
typename number>
940template <
typename number>
950template <
typename number>
954 const bool adding)
const
965 const number alpha = 1.;
966 const number beta = (adding ? 1. : 0.);
985template <
typename number>
989 const bool adding)
const
999 const number alpha = 1.;
1000 const number beta = (adding ? 1. : 0.);
1012 this->values.data(),
1021template <
typename number>
1026 const bool adding)
const
1048 std::scoped_lock lock(mutex);
1050 work.resize(kk * nn);
1059 work[j * kk + i] =
V(i) * B(i, j);
1063 const number alpha = 1.;
1064 const number beta = (adding ? 1. : 0.);
1072 this->values.data(),
1083template <
typename number>
1092#ifdef DEAL_II_LAPACK_WITH_MKL
1093 const number
one = 1.;
1104template <
typename number>
1121template <
typename number>
1125 const bool adding)
const
1136 const number alpha = 1.;
1137 const number beta = (adding ? 1. : 0.);
1146 this->values.data(),
1167 this->values.data(),
1179template <
typename number>
1183 const bool adding)
const
1193 const number alpha = 1.;
1194 const number beta = (adding ? 1. : 0.);
1206 this->values.data(),
1215template <
typename number>
1219 const bool adding)
const
1230 const number alpha = 1.;
1231 const number beta = (adding ? 1. : 0.);
1240 this->values.data(),
1261 this->values.data(),
1273template <
typename number>
1277 const bool adding)
const
1287 const number alpha = 1.;
1288 const number beta = (adding ? 1. : 0.);
1300 this->values.data(),
1309template <
typename number>
1313 const bool adding)
const
1324 const number alpha = 1.;
1325 const number beta = (adding ? 1. : 0.);
1333 this->values.data(),
1344template <
typename number>
1348 const bool adding)
const
1358 const number alpha = 1.;
1359 const number beta = (adding ? 1. : 0.);
1371 this->values.data(),
1380template <
typename number>
1389 number *
const values = this->values.data();
1392 getrf(&mm, &nn, values, &mm, ipiv.data(), &info);
1404template <
typename number>
1413template <
typename number>
1417 const char type(
'O');
1423template <
typename number>
1427 const char type(
'I');
1433template <
typename number>
1437 const char type(
'F');
1443template <
typename number>
1447 std::scoped_lock lock(mutex);
1451 ExcMessage(
"norms can be called in matrix state only."));
1455 const number *
const values = this->values.data();
1460 (type ==
'I' || type ==
'O') ? std::max<types::blas_int>(1,
N) : 0;
1468 (type ==
'I') ? std::max<types::blas_int>(1, M) : 0;
1470 return lange(&type, &M, &
N, values, &lda, work.data());
1476template <
typename number>
1482 ExcMessage(
"Trace can be called in matrix state only."));
1486 for (
size_type i = 0; i < this->m(); ++i)
1487 tr += (*
this)(i, i);
1494template <
typename number>
1506 number *
const values = this->values.data();
1520template <
typename number>
1524 std::scoped_lock lock(mutex);
1529 const number *values = this->values.data();
1553template <
typename number>
1557 std::scoped_lock lock(mutex);
1563 const number *
const values = this->values.data();
1569 const char norm =
'1';
1570 const char diag =
'N';
1591template <
typename number>
1601 std::fill(wr.begin(), wr.end(), 0.);
1602 ipiv.resize(8 * mm);
1604 svd_u = std::make_unique<LAPACKFullMatrix<number>>(mm, mm);
1605 svd_vt = std::make_unique<LAPACKFullMatrix<number>>(nn, nn);
1613 std::vector<typename numbers::NumberTraits<number>::real_type> real_work;
1617 std::size_t min =
std::min(this->m(), this->n());
1618 std::size_t max =
std::max(this->m(), this->n());
1620 std::max(5 * min * min + 5 * min, 2 * max * min + 2 * min * min + min));
1668template <
typename number>
1678 const double lim =
std::abs(wr[0]) * threshold;
1679 for (
size_type i = 0; i < wr.size(); ++i)
1682 wr[i] =
one / wr[i];
1691template <
typename number>
1694 const unsigned int kernel_size)
1702 const unsigned int n_wr = wr.size();
1703 for (
size_type i = 0; i < n_wr - kernel_size; ++i)
1704 wr[i] =
one / wr[i];
1705 for (
size_type i = n_wr - kernel_size; i < n_wr; ++i)
1712template <
typename number>
1721 number *
const values = this->values.data();
1727 compute_lu_factorization();
1730 inv_work.resize(mm);
1731 getri(&mm, values, &mm, ipiv.data(), inv_work.data(), &mm, &info);
1736 compute_cholesky_factorization();
1744 this->el(i, j) = this->el(j, i);
1755template <
typename number>
1761 const char *trans = transposed ? &
T : &
N;
1763 const number *
const values = this->values.data();
1770 trans, &nn, &n_rhs, values, &nn, ipiv.data(), v.
begin(), &nn, &info);
1784 &uplo, trans,
"N", &nn, &n_rhs, values, &lda, v.
begin(), &ldb, &info);
1790 "The matrix has to be either factorized or triangular."));
1798template <
typename number>
1801 const bool transposed)
const
1807 const char *trans = transposed ? &
T : &
N;
1809 const number *
const values = this->values.data();
1858 "The matrix has to be either factorized or triangular."));
1866template <
typename number>
1890 for (
size_type i = 0; i < this->m(); ++i)
1892 (ipiv[i] ==
types::blas_int(i + 1) ? this->el(i, i) : -this->el(i, i));
1898template <
typename number>
1913 const char jobvr = (right) ?
V :
N;
1914 const char jobvl = (left) ?
V :
N;
1928 std::vector<typename numbers::NumberTraits<number>::real_type> real_work;
1931 real_work.resize(2 * this->m());
1954 real_work.resize(lwork);
1975 std::to_string(-info) +
1977 " parameter had an illegal value."));
1984 "Lapack error in geev: the QR algorithm failed to compute "
1985 "all the eigenvalues, and no eigenvectors have been computed."));
2003 template <
typename RealNumber>
2005 unpack_lapack_eigenvector_and_increment_index(
2006 const std::vector<RealNumber> &vr,
2007 const std::complex<RealNumber> &eigenvalue,
2008 FullMatrix<std::complex<RealNumber>> &result,
2009 unsigned int &index)
2011 const std::size_t n = result.n();
2012 if (eigenvalue.imag() != 0.)
2014 for (std::size_t j = 0; j < n; ++j)
2016 result(j, index).real(vr[index * n + j]);
2017 result(j, index + 1).real(vr[index * n + j]);
2018 result(j, index).imag(vr[(index + 1) * n + j]);
2019 result(j, index + 1).imag(-vr[(index + 1) * n + j]);
2028 for (
unsigned int j = 0; j < n; ++j)
2029 result(j, index).real(vr[index * n + j]);
2038 template <
typename ComplexNumber>
2040 unpack_lapack_eigenvector_and_increment_index(
2041 const std::vector<ComplexNumber> &vr,
2042 const ComplexNumber &,
2044 unsigned int &index)
2046 const std::size_t n = result.
n();
2047 for (
unsigned int j = 0; j < n; ++j)
2048 result(j, index) = vr[
index * n + j];
2057template <
typename number>
2062 Assert(vr.size() == this->n_rows() * this->n_cols(),
2063 ExcMessage(
"Right eigenvectors are not available! Did you "
2064 "set the associated flag in compute_eigenvalues()?"));
2069 for (
unsigned int i = 0; i < n();)
2070 unpack_lapack_eigenvector_and_increment_index(vr, eigenvalue(i), result, i);
2077template <
typename number>
2082 Assert(vl.size() == this->n_rows() * this->n_cols(),
2083 ExcMessage(
"Left eigenvectors are not available! Did you "
2084 "set the associated flag in compute_eigenvalues()?"));
2089 for (
unsigned int i = 0; i < n();)
2090 unpack_lapack_eigenvector_and_increment_index(vl, eigenvalue(i), result, i);
2097template <
typename number>
2100 const number lower_bound,
2101 const number upper_bound,
2102 const number abs_accuracy,
2113 number *
const values_A = this->values.data();
2114 number *
const values_eigenvectors = matrix_eigenvectors.
values.data();
2117 const char *
const jobz(&
V);
2118 const char *
const uplo(&
U);
2119 const char *
const range(&
V);
2121 std::vector<types::blas_int> iwork(
static_cast<size_type>(5 * nn));
2122 std::vector<types::blas_int> ifail(
static_cast<size_type>(nn));
2149 values_eigenvectors,
2162 work.resize(
static_cast<size_type>(lwork));
2178 values_eigenvectors,
2192 std::to_string(-info) +
2194 " parameter had an illegal value."));
2196 else if ((info > 0) && (info <= nn))
2200 "Lapack error in syevx: " + std::to_string(info) +
2201 " eigenvectors failed to converge."
2202 " (You may need to scale the abs_accuracy according"
2203 " to your matrix norm.)"));
2208 ExcMessage(
"Lapack error in syevx: unknown error."));
2214 for (
size_type i = 0; i < static_cast<size_type>(n_eigenpairs); ++i)
2218 for (
size_type j = 0; j < static_cast<size_type>(nn); ++j)
2220 eigenvectors(j, i) = values_eigenvectors[col_begin + j];
2229template <
typename number>
2233 const number lower_bound,
2234 const number upper_bound,
2235 const number abs_accuracy,
2249 number *
const values_A = this->values.data();
2250 number *
const values_B = B.
values.data();
2251 number *
const values_eigenvectors = matrix_eigenvectors.
values.data();
2254 const char *
const jobz(&
V);
2255 const char *
const uplo(&
U);
2256 const char *
const range(&
V);
2258 iwork.resize(
static_cast<size_type>(5 * nn));
2259 std::vector<types::blas_int> ifail(
static_cast<size_type>(nn));
2289 values_eigenvectors,
2304 work.resize(
static_cast<size_type>(lwork));
2323 values_eigenvectors,
2337 std::to_string(-info) +
2339 " parameter had an illegal value."));
2341 else if ((info > 0) && (info <= nn))
2346 "Lapack error in sygvx: ssyevx/dsyevx failed to converge, and " +
2347 std::to_string(info) +
2348 " eigenvectors failed to converge."
2349 " (You may need to scale the abs_accuracy"
2350 " according to the norms of matrices A and B.)"));
2352 else if ((info > nn) && (info <= 2 * nn))
2356 "Lapack error in sygvx: the leading minor of order " +
2357 std::to_string(info - nn) +
2358 " of matrix B is not positive-definite."
2359 " The factorization of B could not be completed and"
2360 " no eigenvalues or eigenvectors were computed."));
2365 ExcMessage(
"Lapack error in sygvx: unknown error."));
2371 for (
size_type i = 0; i < static_cast<size_type>(n_eigenpairs); ++i)
2376 for (
size_type j = 0; j < static_cast<size_type>(nn); ++j)
2378 eigenvectors[i](j) = values_eigenvectors[col_begin + j];
2387template <
typename number>
2400 ExcMessage(
"eigenvectors.size() > matrix.n()"));
2406 number *
const values_A = this->values.data();
2407 number *
const values_B = B.
values.data();
2411 const char *
const jobz = (
eigenvectors.size() > 0) ? (&
V) : (&
N);
2412 const char *
const uplo = (&
U);
2445 work.resize(
static_cast<size_type>(lwork));
2467 std::to_string(-info) +
2469 " parameter had an illegal value."));
2471 else if ((info > 0) && (info <= nn))
2476 "Lapack error in sygv: ssyev/dsyev failed to converge, and " +
2477 std::to_string(info) +
2478 " off-diagonal elements of an intermediate "
2479 " tridiagonal did not converge to zero."
2480 " (You may need to scale the abs_accuracy"
2481 " according to the norms of matrices A and B.)"));
2483 else if ((info > nn) && (info <= 2 * nn))
2487 "Lapack error in sygv: the leading minor of order " +
2488 std::to_string(info - nn) +
2489 " of matrix B is not positive-definite."
2490 " The factorization of B could not be completed and"
2491 " no eigenvalues or eigenvectors were computed."));
2496 ExcMessage(
"Lapack error in sygv: unknown error."));
2503 for (
size_type j = 0; j < static_cast<size_type>(nn); ++j)
2513template <
typename number>
2516 const unsigned int precision,
2517 const bool scientific,
2518 const unsigned int width_,
2519 const char *zero_string,
2520 const double denominator,
2521 const double threshold,
2522 const char *separator)
const
2524 unsigned int width = width_;
2534 std::ios::fmtflags old_flags = out.flags();
2535 std::streamsize old_precision = out.precision(precision);
2539 out.setf(std::ios::scientific, std::ios::floatfield);
2541 width = precision + 7;
2545 out.setf(std::ios::fixed, std::ios::floatfield);
2547 width = precision + 2;
2550 for (
size_type i = 0; i < this->m(); ++i)
2558 out << std::setw(width) << (*this)(i, j) << separator;
2559 else if (
std::abs(this->el(i, j)) > threshold)
2560 out << std::setw(width) << this->el(i, j) * denominator << separator;
2562 out << std::setw(width) << zero_string << separator;
2568 out.flags(old_flags);
2569 out.precision(old_precision);
2574template <
typename number>
2584template <
typename number>
2593template <
typename number>
2603template <
typename number>
2609 matrix->solve(dst,
false);
2613template <
typename number>
2619 matrix->solve(dst,
true);
2623template <
typename number>
2631 matrix->solve(*aux,
false);
2636template <
typename number>
2644 matrix->solve(*aux,
true);
2650#include "lac/lapack_full_matrix.inst"
void omatcopy(char, char, ::types::blas_int, ::types::blas_int, const number1, const number2 *, ::types::blas_int, number3 *, ::types::blas_int)
EnableObserverPointer & operator=(const EnableObserverPointer &)
LAPACKFullMatrix< number > & operator*=(const number factor)
number reciprocal_condition_number() const
void Tmmult(LAPACKFullMatrix< number > &C, const LAPACKFullMatrix< number > &B, const bool adding=false) const
void scale_rows(const Vector< number > &V)
FullMatrix< std::complex< typename numbers::NumberTraits< number >::real_type > > get_right_eigenvectors() const
void add(const number a, const LAPACKFullMatrix< number > &B)
void Tvmult(Vector< number2 > &w, const Vector< number2 > &v, const bool adding=false) const
void transpose(LAPACKFullMatrix< number > &B) const
void mTmult(LAPACKFullMatrix< number > &C, const LAPACKFullMatrix< number > &B, const bool adding=false) const
LAPACKSupport::State get_state() const
void compute_eigenvalues_symmetric(const number lower_bound, const number upper_bound, const number abs_accuracy, Vector< number > &eigenvalues, FullMatrix< number > &eigenvectors)
void vmult(Vector< number2 > &w, const Vector< number2 > &v, const bool adding=false) const
void reinit(const size_type size)
void compute_cholesky_factorization()
LAPACKFullMatrix< number > & operator=(const LAPACKFullMatrix< number > &)
void compute_lu_factorization()
FullMatrix< std::complex< typename numbers::NumberTraits< number >::real_type > > get_left_eigenvectors() const
void grow_or_shrink(const size_type size)
void apply_givens_rotation(const std::array< number, 3 > &csr, const size_type i, const size_type k, const bool left=true)
void set_property(const LAPACKSupport::Property property)
number norm(const char type) const
void solve(Vector< number > &v, const bool transposed=false) const
void compute_eigenvalues(const bool right_eigenvectors=false, const bool left_eigenvectors=false)
LAPACKSupport::State state
std::make_unsigned_t< types::blas_int > size_type
number frobenius_norm() const
LAPACKFullMatrix(const size_type size=0)
LAPACKSupport::Property property
void compute_inverse_svd(const double threshold=0.)
void compute_generalized_eigenvalues_symmetric(LAPACKFullMatrix< number > &B, const number lower_bound, const number upper_bound, const number abs_accuracy, Vector< number > &eigenvalues, std::vector< Vector< number > > &eigenvectors, const types::blas_int itype=1)
void vmult_add(Vector< number2 > &w, const Vector< number2 > &v) const
number linfty_norm() const
void TmTmult(LAPACKFullMatrix< number > &C, const LAPACKFullMatrix< number > &B, const bool adding=false) const
void compute_inverse_svd_with_kernel(const unsigned int kernel_size)
void Tvmult_add(Vector< number2 > &w, const Vector< number2 > &v) const
void rank1_update(const number a, const Vector< number > &v)
void remove_row_and_column(const size_type row, const size_type col)
LAPACKFullMatrix< number > & operator/=(const number factor)
number determinant() const
void mmult(LAPACKFullMatrix< number > &C, const LAPACKFullMatrix< number > &B, const bool adding=false) const
void print_formatted(std::ostream &out, const unsigned int precision=3, const bool scientific=true, const unsigned int width=0, const char *zero_string=" ", const double denominator=1., const double threshold=0., const char *separator=" ") const
void vmult(Vector< number > &, const Vector< number > &) const
void initialize(const LAPACKFullMatrix< number > &)
void Tvmult(Vector< number > &, const Vector< number > &) const
number el(const size_type i, const size_type j) const
AlignedVector< T > values
void reinit(const size_type size1, const size_type size2, const bool omit_default_initialization=false)
virtual size_type size() const override
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcIO()
static ::ExceptionBase & ExcZero()
static ::ExceptionBase & ExcNotImplemented()
static ::ExceptionBase & ExcErrorCode(std::string arg1, types::blas_int arg2)
static ::ExceptionBase & ExcScalarAssignmentOnlyForZeroValue()
static ::ExceptionBase & ExcProperty(Property arg1)
#define Assert(cond, exc)
static ::ExceptionBase & ExcSingular()
#define AssertIsFinite(number)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcNotInitialized()
static ::ExceptionBase & ExcNotQuadratic()
static ::ExceptionBase & ExcInvalidState()
static ::ExceptionBase & ExcMessage(std::string arg1)
static ::ExceptionBase & ExcState(State arg1)
#define AssertThrow(cond, exc)
void getrs(const char *, const ::types::blas_int *, const ::types::blas_int *, const number1 *, const ::types::blas_int *, const ::types::blas_int *, number2 *, const ::types::blas_int *, ::types::blas_int *)
void syrk(const char *, const char *, const ::types::blas_int *, const ::types::blas_int *, const number1 *, const number2 *, const ::types::blas_int *, const number3 *, number4 *, const ::types::blas_int *)
void geev(const char *, const char *, const ::types::blas_int *, number1 *, const ::types::blas_int *, number2 *, number3 *, number4 *, const ::types::blas_int *, number5 *, const ::types::blas_int *, number6 *, const ::types::blas_int *, ::types::blas_int *)
void gemm(const char *, const char *, const ::types::blas_int *, const ::types::blas_int *, const ::types::blas_int *, const number1 *, const number2 *, const ::types::blas_int *, const number3 *, const ::types::blas_int *, const number4 *, number5 *, const ::types::blas_int *)
void pocon(const char *, const ::types::blas_int *, const number1 *, const ::types::blas_int *, const number2 *, number3 *, number4 *, ::types::blas_int *, ::types::blas_int *)
void lascl(const char *, const ::types::blas_int *, const ::types::blas_int *, const number1 *, const number2 *, const ::types::blas_int *, const ::types::blas_int *, number3 *, const ::types::blas_int *, ::types::blas_int *)
void syr(const char *, const ::types::blas_int *, const number1 *, const number2 *, const ::types::blas_int *, number3 *, const ::types::blas_int *)
void trtrs(const char *, const char *, const char *, const ::types::blas_int *, const ::types::blas_int *, const number1 *, const ::types::blas_int *, number2 *, const ::types::blas_int *, ::types::blas_int *)
void syevx(const char *, const char *, const char *, const ::types::blas_int *, number1 *, const ::types::blas_int *, const number2 *, const number3 *, const ::types::blas_int *, const ::types::blas_int *, const number4 *, ::types::blas_int *, number5 *, number6 *, const ::types::blas_int *, number7 *, const ::types::blas_int *, ::types::blas_int *, ::types::blas_int *, ::types::blas_int *)
void trcon(const char *, const char *, const char *, const ::types::blas_int *, const number1 *, const ::types::blas_int *, number2 *, number3 *, ::types::blas_int *, ::types::blas_int *)
void gesdd(const char *, const ::types::blas_int *, const ::types::blas_int *, number1 *, const ::types::blas_int *, number2 *, number3 *, const ::types::blas_int *, number4 *, const ::types::blas_int *, number5 *, const ::types::blas_int *, ::types::blas_int *, ::types::blas_int *)
void axpy(const ::types::blas_int *, const number1 *, const number2 *, const ::types::blas_int *, number3 *, const ::types::blas_int *)
void trmv(const char *, const char *, const char *, const ::types::blas_int *, const number1 *, const ::types::blas_int *, number2 *, const ::types::blas_int *)
void sygvx(const ::types::blas_int *, const char *, const char *, const char *, const ::types::blas_int *, number1 *, const ::types::blas_int *, number2 *, const ::types::blas_int *, const number3 *, const number4 *, const ::types::blas_int *, const ::types::blas_int *, const number5 *, ::types::blas_int *, number6 *, number7 *, const ::types::blas_int *, number8 *, const ::types::blas_int *, ::types::blas_int *, ::types::blas_int *, ::types::blas_int *)
void gemv(const char *, const ::types::blas_int *, const ::types::blas_int *, const number1 *, const number2 *, const ::types::blas_int *, const number3 *, const ::types::blas_int *, const number4 *, number5 *, const ::types::blas_int *)
number1 lange(const char *, const ::types::blas_int *, const ::types::blas_int *, const number1 *, const ::types::blas_int *, number2 *)
void potrs(const char *, const ::types::blas_int *, const ::types::blas_int *, const number1 *, const ::types::blas_int *, number2 *, const ::types::blas_int *, ::types::blas_int *)
void sygv(const ::types::blas_int *, const char *, const char *, const ::types::blas_int *, number1 *, const ::types::blas_int *, number2 *, const ::types::blas_int *, number3 *, number4 *, const ::types::blas_int *, ::types::blas_int *)
void potri(const char *, const ::types::blas_int *, number1 *, const ::types::blas_int *, ::types::blas_int *)
number1 lansy(const char *, const char *, const ::types::blas_int *, const number1 *, const ::types::blas_int *, number2 *)
void potrf(const char *, const ::types::blas_int *, number1 *, const ::types::blas_int *, ::types::blas_int *)
void getrf(const ::types::blas_int *, const ::types::blas_int *, number1 *, const ::types::blas_int *, ::types::blas_int *, ::types::blas_int *)
void getri(const ::types::blas_int *, number1 *, const ::types::blas_int *, const ::types::blas_int *, number2 *, const ::types::blas_int *, ::types::blas_int *)
@ cholesky
Contents is a Cholesky decomposition.
@ lu
Contents is an LU decomposition.
@ matrix
Contents is actually a matrix.
@ unusable
Contents is something useless.
@ inverse_matrix
Contents is the inverse of a matrix.
@ svd
Matrix contains singular value decomposition,.
@ inverse_svd
Matrix is the inverse of a singular value decomposition.
@ eigenvalues
Eigenvalue vector is filled.
@ symmetric
Matrix is symmetric.
@ upper_triangular
Matrix is upper triangular.
@ lower_triangular
Matrix is lower triangular.
@ general
No special properties.
constexpr types::blas_int one
std::array< NumberType, 3 > givens_rotation(const NumberType &x, const NumberType &y)
std::array< NumberType, 3 > hyperbolic_rotation(const NumberType &x, const NumberType &y)
void gesdd_helper(const char job, const types::blas_int n_rows, const types::blas_int n_cols, AlignedVector< T > &matrix, std::vector< T > &singular_values, AlignedVector< T > &left_vectors, AlignedVector< T > &right_vectors, std::vector< T > &real_work, std::vector< T > &, std::vector< types::blas_int > &integer_work, const types::blas_int work_flag, types::blas_int &info)
void geev_helper(const char vl, const char vr, AlignedVector< T > &matrix, const types::blas_int n_rows, std::vector< T > &real_part_eigenvalues, std::vector< T > &imag_part_eigenvalues, std::vector< T > &left_eigenvectors, std::vector< T > &right_eigenvectors, std::vector< T > &real_work, std::vector< T > &, const types::blas_int work_flag, types::blas_int &info)
bool is_nan(const double x)
::VectorizedArray< Number, width > min(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > max(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > sqrt(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > abs(const ::VectorizedArray< Number, width > &)
static bool equal(const T *p1, const T *p2)
static constexpr const number & conjugate(const number &x)
std::array< std::pair< Number, Tensor< 1, dim, Number > >, dim > eigenvectors(const SymmetricTensor< 2, dim, Number > &T, const SymmetricTensorEigenvectorMethod method=SymmetricTensorEigenvectorMethod::ql_implicit_shifts)