From dd11813c20581168233cc70d5b1ed03db4ed92c1 Mon Sep 17 00:00:00 2001 From: David Wells Date: Tue, 21 Mar 2023 17:17:48 -0400 Subject: [PATCH] Unconditionally instantiate complex FullMatrix. Like the previous commit - we need it for complex eigenvalues. --- source/lac/full_matrix.cc | 13 +++++++------ source/lac/full_matrix.inst.in | 2 -- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/source/lac/full_matrix.cc b/source/lac/full_matrix.cc index b0c19ccb38..63f50b2631 100644 --- a/source/lac/full_matrix.cc +++ b/source/lac/full_matrix.cc @@ -23,11 +23,14 @@ DEAL_II_NAMESPACE_OPEN #ifndef DOXYGEN -# ifndef DEAL_II_WITH_COMPLEX_VALUES -// instantiate for std::complex because we use it internally in -// FESeries. +// We use FullMatrix> for complex eigenvalues so ignore the +// value of DEAL_II_WITH_COMPLEX_VALUES and always instantiate. As a consequence +// we cannot use REAL_AND_COMPLEX_SCALARS without getting duplicate +// instantiations so do float and double here too. +template class FullMatrix; +template class FullMatrix; +template class FullMatrix>; template class FullMatrix>; -# endif // instantiate for long double manually because we use it in a few places // inside the library @@ -74,12 +77,10 @@ FullMatrix::add(const long double, TEMPL_OP_EQ(double, float); TEMPL_OP_EQ(float, double); -# ifdef DEAL_II_WITH_COMPLEX_VALUES TEMPL_OP_EQ(std::complex, std::complex); TEMPL_OP_EQ(std::complex, std::complex); TEMPL_OP_EQ(std::complex, double); TEMPL_OP_EQ(std::complex, float); -# endif # undef TEMPL_OP_EQ diff --git a/source/lac/full_matrix.inst.in b/source/lac/full_matrix.inst.in index 90b48df135..23e334aeb8 100644 --- a/source/lac/full_matrix.inst.in +++ b/source/lac/full_matrix.inst.in @@ -17,8 +17,6 @@ for (S : REAL_AND_COMPLEX_SCALARS) { - template class FullMatrix; - template void FullMatrix::print(LogStream &, const unsigned int, const unsigned int) const; -- 2.39.5