37 namespace LAPACKFullMatrixImplementation
51 std::vector<T> & real_part_eigenvalues,
52 std::vector<T> & imag_part_eigenvalues,
53 std::vector<T> & left_eigenvectors,
54 std::vector<T> & right_eigenvectors,
55 std::vector<T> & real_work,
60 static_assert(std::is_same<T, double>::value ||
61 std::is_same<T, float>::value,
62 "Only implemented for double and float");
63 Assert(
matrix.size() ==
static_cast<std::size_t
>(n_rows * n_rows),
65 Assert(
static_cast<std::size_t
>(n_rows) <= real_part_eigenvalues.size(),
67 Assert(
static_cast<std::size_t
>(n_rows) <= imag_part_eigenvalues.size(),
70 Assert(
static_cast<std::size_t
>(n_rows * n_rows) <=
71 left_eigenvectors.size(),
74 Assert(
static_cast<std::size_t
>(n_rows * n_rows) <=
75 right_eigenvectors.size(),
78 static_cast<std::size_t
>(2 * n_rows) <= real_work.size(),
80 Assert(work_flag == -1 || std::max<long int>(1, 3 * n_rows) <= work_flag,
87 real_part_eigenvalues.data(),
88 imag_part_eigenvalues.data(),
89 left_eigenvectors.data(),
91 right_eigenvectors.data(),
100 template <
typename T>
108 std::vector<std::complex<T>> &left_eigenvectors,
109 std::vector<std::complex<T>> &right_eigenvectors,
110 std::vector<std::complex<T>> &complex_work,
111 std::vector<T> & real_work,
116 std::is_same<T, double>::value || std::is_same<T, float>::value,
117 "Only implemented for std::complex<double> and std::complex<float>");
118 Assert(
matrix.size() ==
static_cast<std::size_t
>(n_rows * n_rows),
123 Assert(
static_cast<std::size_t
>(n_rows * n_rows) <=
124 left_eigenvectors.size(),
127 Assert(
static_cast<std::size_t
>(n_rows * n_rows) <=
128 right_eigenvectors.size(),
131 std::max<std::size_t>(1, work_flag) <= real_work.size(),
133 Assert(work_flag == -1 || std::max<long int>(1, 2 * n_rows) <= work_flag,
142 left_eigenvectors.data(),
144 right_eigenvectors.data(),
154 template <
typename T>
160 std::vector<T> & singular_values,
163 std::vector<T> & real_work,
165 std::vector<types::blas_int> &integer_work,
169 Assert(job ==
'A' || job ==
'S' || job ==
'O' || job ==
'N',
171 Assert(
static_cast<std::size_t
>(n_rows * n_cols) ==
matrix.size(),
173 Assert(std::min<std::size_t>(n_rows, n_cols) <= singular_values.size(),
175 Assert(8 * std::min<std::size_t>(n_rows, n_cols) <= integer_work.size(),
178 static_cast<std::size_t
>(work_flag) <= real_work.size(),
185 singular_values.data(),
188 right_vectors.
data(),
198 template <
typename T>
204 std::vector<T> & singular_values,
207 std::vector<std::complex<T>> & work,
208 std::vector<T> & real_work,
209 std::vector<types::blas_int> & integer_work,
213 Assert(job ==
'A' || job ==
'S' || job ==
'O' || job ==
'N',
215 Assert(
static_cast<std::size_t
>(n_rows * n_cols) ==
matrix.size(),
218 singular_values.size(),
220 Assert(8 * std::min<std::size_t>(n_rows, n_cols) <= integer_work.size(),
223 static_cast<std::size_t
>(work_flag) <= real_work.size(),
231 singular_values.data(),
234 right_vectors.
data(),
247template <
typename number>
256template <
typename number>
265template <
typename number>
274template <
typename number>
286template <
typename number>
296template <
typename number>
305 (*
this)(i, j) = copy(i, j);
310template <
typename number>
313 const std::array<number, 3> &csr,
326 const number t =
A(i, j);
327 A(i, j) = csr[0] *
A(i, j) + csr[1] *
A(k, j);
328 A(k, j) = -csr[1] * t + csr[0] *
A(k, j);
335 const number t =
A(j, i);
336 A(j, i) = csr[0] *
A(j, i) + csr[1] *
A(j, k);
337 A(j, k) = -csr[1] * t + csr[0] *
A(j, k);
344template <
typename number>
360 const size_type jj = (j < col ? j : j + 1);
363 const size_type ii = (i < row ? i : i + 1);
364 (*this)(i, j) = copy(ii, jj);
371template <
typename number>
381template <
typename number>
382template <
typename number2>
388 for (
size_type i = 0; i < this->m(); ++i)
389 for (
size_type j = 0; j < this->n(); ++j)
390 (*
this)(i, j) = M(i, j);
399template <
typename number>
400template <
typename number2>
406 for (
size_type i = 0; i < this->m(); ++i)
407 for (
size_type j = 0; j < this->n(); ++j)
408 (*
this)(i, j) = M.
el(i, j);
417template <
typename number>
424 if (this->n_elements() != 0)
425 this->reset_values();
433template <
typename number>
442 const char type =
'G';
443 const number cfrom = 1.;
450 number * values = this->values.data();
452 lascl(&type, &kl, &kl, &cfrom, &factor, &m, &n, values, &lda, &info);
462template <
typename number>
473 const char type =
'G';
474 const number cto = 1.;
481 number * values = this->values.data();
483 lascl(&type, &kl, &kl, &factor, &cto, &m, &n, values, &lda, &info);
493template <
typename number>
511 number * values = this->values.data();
512 const number * values_A =
A.values.data();
514 axpy(&n, &a, values_A, &inc, values, &inc);
521 template <
typename number>
550 const std::array<number, 3> csr =
556 const number t =
A(i, k);
557 A(i, k) = csr[0] *
A(i, k) + csr[1] * z(i);
558 z(i) = -csr[1] * t + csr[0] * z(i);
593 const std::array<number, 3> csr =
599 const number t =
A(i, k);
600 A(i, k) = csr[0] *
A(i, k) - csr[1] * z(i);
601 z(i) = -csr[1] * t + csr[0] * z(i);
608 template <
typename number>
611 const std::complex<number> ,
612 const Vector<std::complex<number>> & )
620template <
typename number>
639 syr(&uplo, &
N, &a, v.
begin(), &incx, this->values.begin(), &lda);
642 const size_type
N = this->m();
646 for (size_type i = 0; i <
N; ++i)
648 (*
this)(i, j) = (*
this)(j, i);
652 cholesky_rank1(*
this, a, v);
660template <
typename number>
664 const bool adding)
const
668 const number alpha = 1.;
669 const number beta = (adding ? 1. : 0.);
670 const number null = 0.;
674 (mm == nn) && state ==
matrix)
681 const char diag =
'N';
682 const char trans =
'N';
693 &uplo, &trans, &diag, &
N, this->values.data(), &lda, w.data(), &incx);
721 std::lock_guard<std::mutex> lock(mutex);
730 svd_vt->values.data(),
738 for (size_type i = 0; i < wr.size(); ++i)
745 svd_u->values.data(),
756 std::lock_guard<std::mutex> lock(mutex);
765 svd_u->values.data(),
773 for (size_type i = 0; i < wr.size(); ++i)
780 svd_vt->values.data(),
796template <
typename number>
800 const bool adding)
const
804 const number alpha = 1.;
805 const number beta = (adding ? 1. : 0.);
806 const number null = 0.;
810 (mm == nn) && state ==
matrix)
817 const char diag =
'N';
818 const char trans =
'T';
829 &uplo, &trans, &diag, &
N, this->values.data(), &lda, w.data(), &incx);
858 std::lock_guard<std::mutex> lock(mutex);
868 svd_u->values.data(),
876 for (
size_type i = 0; i < wr.size(); ++i)
883 svd_vt->values.data(),
894 std::lock_guard<std::mutex> lock(mutex);
904 svd_vt->values.data(),
912 for (
size_type i = 0; i < wr.size(); ++i)
919 svd_u->values.data(),
935template <
typename number>
945template <
typename number>
955template <
typename number>
959 const bool adding)
const
970 const number alpha = 1.;
971 const number beta = (adding ? 1. : 0.);
990template <
typename number>
994 const bool adding)
const
1004 const number alpha = 1.;
1005 const number beta = (adding ? 1. : 0.);
1017 this->values.data(),
1026template <
typename number>
1031 const bool adding)
const
1053 std::lock_guard<std::mutex> lock(mutex);
1055 work.resize(kk * nn);
1064 work[j * kk + i] =
V(i) * B(i, j);
1068 const number alpha = 1.;
1069 const number beta = (adding ? 1. : 0.);
1077 this->values.data(),
1088template <
typename number>
1097#ifdef DEAL_II_LAPACK_WITH_MKL
1098 const number
one = 1.;
1109template <
typename number>
1126template <
typename number>
1130 const bool adding)
const
1141 const number alpha = 1.;
1142 const number beta = (adding ? 1. : 0.);
1151 this->values.data(),
1172 this->values.data(),
1184template <
typename number>
1188 const bool adding)
const
1198 const number alpha = 1.;
1199 const number beta = (adding ? 1. : 0.);
1211 this->values.data(),
1220template <
typename number>
1224 const bool adding)
const
1235 const number alpha = 1.;
1236 const number beta = (adding ? 1. : 0.);
1245 this->values.data(),
1266 this->values.data(),
1278template <
typename number>
1282 const bool adding)
const
1292 const number alpha = 1.;
1293 const number beta = (adding ? 1. : 0.);
1305 this->values.data(),
1314template <
typename number>
1318 const bool adding)
const
1329 const number alpha = 1.;
1330 const number beta = (adding ? 1. : 0.);
1338 this->values.data(),
1349template <
typename number>
1353 const bool adding)
const
1363 const number alpha = 1.;
1364 const number beta = (adding ? 1. : 0.);
1376 this->values.data(),
1385template <
typename number>
1394 number *
const values = this->values.data();
1397 getrf(&mm, &nn, values, &mm, ipiv.data(), &info);
1409template <
typename number>
1418template <
typename number>
1422 const char type(
'O');
1428template <
typename number>
1432 const char type(
'I');
1438template <
typename number>
1442 const char type(
'F');
1448template <
typename number>
1452 std::lock_guard<std::mutex> lock(mutex);
1456 ExcMessage(
"norms can be called in matrix state only."));
1460 const number *
const values = this->values.data();
1465 (type ==
'I' || type ==
'O') ? std::max<types::blas_int>(1,
N) : 0;
1473 (type ==
'I') ? std::max<types::blas_int>(1, M) : 0;
1475 return lange(&type, &M, &
N, values, &lda, work.data());
1481template <
typename number>
1487 ExcMessage(
"Trace can be called in matrix state only."));
1491 for (
size_type i = 0; i < this->m(); ++i)
1492 tr += (*
this)(i, i);
1499template <
typename number>
1512 number *
const values = this->values.data();
1526template <
typename number>
1530 std::lock_guard<std::mutex> lock(mutex);
1535 const number * values = this->values.data();
1559template <
typename number>
1563 std::lock_guard<std::mutex> lock(mutex);
1569 const number *
const values = this->values.data();
1575 const char norm =
'1';
1576 const char diag =
'N';
1597template <
typename number>
1607 std::fill(wr.begin(), wr.end(), 0.);
1608 ipiv.resize(8 * mm);
1610 svd_u = std::make_unique<LAPACKFullMatrix<number>>(mm, mm);
1611 svd_vt = std::make_unique<LAPACKFullMatrix<number>>(nn, nn);
1619 std::vector<typename numbers::NumberTraits<number>::real_type> real_work;
1623 std::size_t min =
std::min(this->m(), this->n());
1624 std::size_t max =
std::max(this->m(), this->n());
1626 std::max(5 * min * min + 5 * min, 2 * max * min + 2 * min * min + min));
1674template <
typename number>
1684 const double lim =
std::abs(wr[0]) * threshold;
1685 for (
size_type i = 0; i < wr.size(); ++i)
1688 wr[i] =
one / wr[i];
1697template <
typename number>
1700 const unsigned int kernel_size)
1708 const unsigned int n_wr = wr.size();
1709 for (
size_type i = 0; i < n_wr - kernel_size; ++i)
1710 wr[i] =
one / wr[i];
1711 for (
size_type i = n_wr - kernel_size; i < n_wr; ++i)
1718template <
typename number>
1727 number *
const values = this->values.data();
1733 compute_lu_factorization();
1736 inv_work.resize(mm);
1737 getri(&mm, values, &mm, ipiv.data(), inv_work.data(), &mm, &info);
1742 compute_cholesky_factorization();
1750 this->el(i, j) = this->el(j, i);
1761template <
typename number>
1767 const char * trans = transposed ? &
T : &
N;
1769 const number *
const values = this->values.data();
1776 trans, &nn, &n_rhs, values, &nn, ipiv.data(), v.
begin(), &nn, &info);
1790 &uplo, trans,
"N", &nn, &n_rhs, values, &lda, v.
begin(), &ldb, &info);
1796 "The matrix has to be either factorized or triangular."));
1804template <
typename number>
1807 const bool transposed)
const
1813 const char * trans = transposed ? &
T : &
N;
1815 const number *
const values = this->values.data();
1864 "The matrix has to be either factorized or triangular."));
1872template <
typename number>
1896 for (
size_type i = 0; i < this->m(); ++i)
1898 (ipiv[i] ==
types::blas_int(i + 1) ? this->el(i, i) : -this->el(i, i));
1904template <
typename number>
1919 const char jobvr = (right) ?
V :
N;
1920 const char jobvl = (left) ?
V :
N;
1934 std::vector<typename numbers::NumberTraits<number>::real_type> real_work;
1937 real_work.resize(2 * this->m());
1960 real_work.resize(lwork);
1981 std::to_string(-info) +
1983 " parameter had an illegal value."));
1990 "Lapack error in geev: the QR algorithm failed to compute "
1991 "all the eigenvalues, and no eigenvectors have been computed."));
2009 template <
typename RealNumber>
2011 unpack_lapack_eigenvector_and_increment_index(
2012 const std::vector<RealNumber> & vr,
2013 const std::complex<RealNumber> & eigenvalue,
2014 FullMatrix<std::complex<RealNumber>> &result,
2015 unsigned int & index)
2017 const std::size_t n = result.n();
2018 if (eigenvalue.imag() != 0.)
2020 for (std::size_t j = 0; j < n; ++j)
2022 result(j, index).real(vr[index * n + j]);
2023 result(j, index + 1).real(vr[index * n + j]);
2024 result(j, index).imag(vr[(index + 1) * n + j]);
2025 result(j, index + 1).imag(-vr[(index + 1) * n + j]);
2034 for (
unsigned int j = 0; j < n; ++j)
2035 result(j, index).real(vr[index * n + j]);
2044 template <
typename ComplexNumber>
2046 unpack_lapack_eigenvector_and_increment_index(
2047 const std::vector<ComplexNumber> &vr,
2048 const ComplexNumber &,
2050 unsigned int & index)
2052 const std::size_t n = result.
n();
2053 for (
unsigned int j = 0; j < n; ++j)
2054 result(j, index) = vr[
index * n + j];
2063template <
typename number>
2068 Assert(vr.size() == this->n_rows() * this->n_cols(),
2069 ExcMessage(
"Right eigenvectors are not available! Did you "
2070 "set the associated flag in compute_eigenvalues()?"));
2075 for (
unsigned int i = 0; i < n();)
2076 unpack_lapack_eigenvector_and_increment_index(vr, eigenvalue(i), result, i);
2083template <
typename number>
2088 Assert(vl.size() == this->n_rows() * this->n_cols(),
2089 ExcMessage(
"Left eigenvectors are not available! Did you "
2090 "set the associated flag in compute_eigenvalues()?"));
2095 for (
unsigned int i = 0; i < n();)
2096 unpack_lapack_eigenvector_and_increment_index(vl, eigenvalue(i), result, i);
2103template <
typename number>
2106 const number lower_bound,
2107 const number upper_bound,
2108 const number abs_accuracy,
2119 number *
const values_A = this->values.data();
2120 number *
const values_eigenvectors = matrix_eigenvectors.
values.data();
2123 const char *
const jobz(&
V);
2124 const char *
const uplo(&
U);
2125 const char *
const range(&
V);
2127 std::vector<types::blas_int> iwork(
static_cast<size_type>(5 * nn));
2128 std::vector<types::blas_int> ifail(
static_cast<size_type>(nn));
2155 values_eigenvectors,
2168 work.resize(
static_cast<size_type>(lwork));
2184 values_eigenvectors,
2198 std::to_string(-info) +
2200 " parameter had an illegal value."));
2202 else if ((info > 0) && (info <= nn))
2206 "Lapack error in syevx: " + std::to_string(info) +
2207 " eigenvectors failed to converge."
2208 " (You may need to scale the abs_accuracy according"
2209 " to your matrix norm.)"));
2214 ExcMessage(
"Lapack error in syevx: unknown error."));
2220 for (
size_type i = 0; i < static_cast<size_type>(n_eigenpairs); ++i)
2224 for (
size_type j = 0; j < static_cast<size_type>(nn); ++j)
2226 eigenvectors(j, i) = values_eigenvectors[col_begin + j];
2235template <
typename number>
2239 const number lower_bound,
2240 const number upper_bound,
2241 const number abs_accuracy,
2255 number *
const values_A = this->values.data();
2256 number *
const values_B = B.
values.data();
2257 number *
const values_eigenvectors = matrix_eigenvectors.
values.data();
2260 const char *
const jobz(&
V);
2261 const char *
const uplo(&
U);
2262 const char *
const range(&
V);
2264 iwork.resize(
static_cast<size_type>(5 * nn));
2265 std::vector<types::blas_int> ifail(
static_cast<size_type>(nn));
2295 values_eigenvectors,
2310 work.resize(
static_cast<size_type>(lwork));
2329 values_eigenvectors,
2343 std::to_string(-info) +
2345 " parameter had an illegal value."));
2347 else if ((info > 0) && (info <= nn))
2352 "Lapack error in sygvx: ssyevx/dsyevx failed to converge, and " +
2353 std::to_string(info) +
2354 " eigenvectors failed to converge."
2355 " (You may need to scale the abs_accuracy"
2356 " according to the norms of matrices A and B.)"));
2358 else if ((info > nn) && (info <= 2 * nn))
2362 "Lapack error in sygvx: the leading minor of order " +
2363 std::to_string(info - nn) +
2364 " of matrix B is not positive-definite."
2365 " The factorization of B could not be completed and"
2366 " no eigenvalues or eigenvectors were computed."));
2371 ExcMessage(
"Lapack error in sygvx: unknown error."));
2377 for (
size_type i = 0; i < static_cast<size_type>(n_eigenpairs); ++i)
2382 for (
size_type j = 0; j < static_cast<size_type>(nn); ++j)
2384 eigenvectors[i](j) = values_eigenvectors[col_begin + j];
2393template <
typename number>
2406 ExcMessage(
"eigenvectors.size() > matrix.n()"));
2412 number *
const values_A = this->values.data();
2413 number *
const values_B = B.
values.data();
2417 const char *
const jobz = (
eigenvectors.size() > 0) ? (&
V) : (&
N);
2418 const char *
const uplo = (&
U);
2451 work.resize(
static_cast<size_type>(lwork));
2473 std::to_string(-info) +
2475 " parameter had an illegal value."));
2477 else if ((info > 0) && (info <= nn))
2482 "Lapack error in sygv: ssyev/dsyev failed to converge, and " +
2483 std::to_string(info) +
2484 " off-diagonal elements of an intermediate "
2485 " tridiagonal did not converge to zero."
2486 " (You may need to scale the abs_accuracy"
2487 " according to the norms of matrices A and B.)"));
2489 else if ((info > nn) && (info <= 2 * nn))
2493 "Lapack error in sygv: the leading minor of order " +
2494 std::to_string(info - nn) +
2495 " of matrix B is not positive-definite."
2496 " The factorization of B could not be completed and"
2497 " no eigenvalues or eigenvectors were computed."));
2502 ExcMessage(
"Lapack error in sygv: unknown error."));
2509 for (
size_type j = 0; j < static_cast<size_type>(nn); ++j)
2519template <
typename number>
2522 const unsigned int precision,
2523 const bool scientific,
2524 const unsigned int width_,
2525 const char * zero_string,
2526 const double denominator,
2527 const double threshold)
const
2529 unsigned int width = width_;
2539 std::ios::fmtflags old_flags = out.flags();
2540 std::streamsize old_precision = out.precision(precision);
2544 out.setf(std::ios::scientific, std::ios::floatfield);
2546 width = precision + 7;
2550 out.setf(std::ios::fixed, std::ios::floatfield);
2552 width = precision + 2;
2555 for (
size_type i = 0; i < this->m(); ++i)
2563 out << std::setw(width) << (*this)(i, j) <<
' ';
2564 else if (
std::abs(this->el(i, j)) > threshold)
2565 out << std::setw(width) << this->el(i, j) * denominator <<
' ';
2567 out << std::setw(width) << zero_string <<
' ';
2573 out.flags(old_flags);
2574 out.precision(old_precision);
2580template <
typename number>
2589template <
typename number>
2599template <
typename number>
2605 matrix->solve(dst,
false);
2609template <
typename number>
2615 matrix->solve(dst,
true);
2619template <
typename number>
2627 matrix->solve(*aux,
false);
2632template <
typename number>
2640 matrix->solve(*aux,
true);
2646#include "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)
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
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)
std::make_unsigned< types::blas_int >::type size_type
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 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
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
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 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
Subscriptor & operator=(const Subscriptor &)
AlignedVector< T > values
void reinit(const size_type size1, const size_type size2, const bool omit_default_initialization=false)
#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.
static const 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 > >, std::integral_constant< int, dim >::value > eigenvectors(const SymmetricTensor< 2, dim, Number > &T, const SymmetricTensorEigenvectorMethod method=SymmetricTensorEigenvectorMethod::ql_implicit_shifts)