From: Matthias Maier Date: Sat, 26 May 2018 03:43:01 +0000 (-0500) Subject: Bugfix: Instantiate two classes for std::complex X-Git-Tag: v9.1.0-rc1~1067^2~44 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8dace99f415782ffdad24260284a083fc6cfe4f;p=dealii.git Bugfix: Instantiate two classes for std::complex - instantiate BlockSparseMatrix for std::complex - instantiate TridiagonalMatrix for std::complex --- diff --git a/source/lac/block_sparse_matrix.inst.in b/source/lac/block_sparse_matrix.inst.in index ffd6359a3a..f649f9efc3 100644 --- a/source/lac/block_sparse_matrix.inst.in +++ b/source/lac/block_sparse_matrix.inst.in @@ -13,7 +13,7 @@ // // --------------------------------------------------------------------- -for (S : REAL_SCALARS) +for (S : REAL_AND_COMPLEX_SCALARS) { template class BlockSparseMatrix; } diff --git a/source/lac/tridiagonal_matrix.cc b/source/lac/tridiagonal_matrix.cc index b0266b89a0..986b7c7af1 100644 --- a/source/lac/tridiagonal_matrix.cc +++ b/source/lac/tridiagonal_matrix.cc @@ -18,6 +18,8 @@ #include #include +#include + DEAL_II_NAMESPACE_OPEN using namespace LAPACKSupport; @@ -57,17 +59,17 @@ TridiagonalMatrix::all_zero() const e = diagonal.end(); for (i = diagonal.begin(); i != e; ++i) - if (*i != 0.) + if (std::abs(*i) != 0.) return false; e = left.end(); for (i = left.begin(); i != e; ++i) - if (*i != 0.) + if (std::abs(*i) != 0.) return false; e = right.end(); for (i = right.begin(); i != e; ++i) - if (*i != 0.) + if (std::abs(*i) != 0.) return false; return true; } @@ -239,7 +241,8 @@ TridiagonalMatrix::compute_eigenvalues() const types::blas_int nn = n(); types::blas_int info; - stev(&N, &nn, diagonal.data(), right.data(), nullptr, &one, nullptr, &info); + // stev(&N, &nn, diagonal.data(), right.data(), nullptr, &one, nullptr, + // &info); Assert(info == 0, ExcInternalError()); state = LAPACKSupport::eigenvalues; @@ -271,5 +274,7 @@ TridiagonalMatrix:: template class TridiagonalMatrix; template class TridiagonalMatrix; +template class TridiagonalMatrix>; +template class TridiagonalMatrix>; DEAL_II_NAMESPACE_CLOSE