From: David Wells Date: Tue, 21 Mar 2023 21:17:48 +0000 (-0400) Subject: Unconditionally instantiate complex FullMatrix. X-Git-Tag: v9.5.0-rc1~436^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd11813c20581168233cc70d5b1ed03db4ed92c1;p=dealii.git Unconditionally instantiate complex FullMatrix. Like the previous commit - we need it for complex eigenvalues. --- 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;