SCRATCH_INITIALIZER(double, d);
SCRATCH_INITIALIZER(float, f);
+#ifdef DEAL_II_WITH_COMPLEX_VALUES
SCRATCH_INITIALIZER(std::complex<double>, cd);
SCRATCH_INITIALIZER(std::complex<float>, cf);
+#endif
#undef SCRATCH_INITIALIZER
} // namespace internals
template BlockVector<double>::BlockVector(const BlockVector<float> &);
template BlockVector<float>::BlockVector(const BlockVector<double> &);
+#ifdef DEAL_II_WITH_COMPLEX_VALUES
template BlockVector<std::complex<double>>::BlockVector(
const BlockVector<std::complex<float>> &);
template BlockVector<std::complex<float>>::BlockVector(
const BlockVector<std::complex<double>> &);
+#endif
DEAL_II_NAMESPACE_CLOSE
#include "full_matrix.inst"
+#ifndef DEAL_II_WITH_COMPLEX_VALUES
+// instantiate for std::complex<double> because we use it internally.
+template class FullMatrix<std::complex<double>>;
+#endif
+
// instantiate for long double manually because we use it in a few places
// inside the library
template class FullMatrix<long double>;
TEMPL_OP_EQ(double, float);
TEMPL_OP_EQ(float, double);
+#ifdef DEAL_II_WITH_COMPLEX_VALUES
TEMPL_OP_EQ(std::complex<double>, std::complex<float>);
TEMPL_OP_EQ(std::complex<float>, std::complex<double>);
TEMPL_OP_EQ(std::complex<double>, double);
TEMPL_OP_EQ(std::complex<float>, float);
+#endif
#undef TEMPL_OP_EQ
TEMPL_COPY_CONSTRUCTOR(double, float);
TEMPL_COPY_CONSTRUCTOR(float, double);
-
+#ifdef DEAL_II_WITH_COMPLEX_VALUES
TEMPL_COPY_CONSTRUCTOR(std::complex<double>, std::complex<float>);
TEMPL_COPY_CONSTRUCTOR(std::complex<float>, std::complex<double>);
+#endif
#undef TEMPL_COPY_CONSTRUCTOR
} // namespace distributed
TEMPL_COPY_CONSTRUCTOR(double, float);
TEMPL_COPY_CONSTRUCTOR(float, double);
+# ifdef DEAL_II_WITH_COMPLEX_VALUES
TEMPL_COPY_CONSTRUCTOR(std::complex<double>, std::complex<float>);
TEMPL_COPY_CONSTRUCTOR(std::complex<float>, std::complex<double>);
+# endif
# undef TEMPL_COPY_CONSTRUCTOR
} // namespace LinearAlgebra
TEMPL_COPY_CONSTRUCTOR(double, float);
TEMPL_COPY_CONSTRUCTOR(float, double);
-
+#ifdef DEAL_II_WITH_COMPLEX_VALUES
TEMPL_COPY_CONSTRUCTOR(std::complex<double>, std::complex<float>);
TEMPL_COPY_CONSTRUCTOR(std::complex<float>, std::complex<double>);
+#endif
#undef TEMPL_COPY_CONSTRUCTOR
} // namespace LinearAlgebra
template class TridiagonalMatrix<float>;
template class TridiagonalMatrix<double>;
+#ifdef DEAL_II_WITH_COMPLEX_VALUES
template class TridiagonalMatrix<std::complex<float>>;
template class TridiagonalMatrix<std::complex<double>>;
+#endif
DEAL_II_NAMESPACE_CLOSE
#include "vector.inst"
+#ifndef DEAL_II_WITH_COMPLEX_VALUES
+// instantiate for std::complex<double> since we are using it internally.
+template class Vector<std::complex<double>>;
+#endif
+
// instantiate for integers:
template class Vector<int>;
template Vector<double> &Vector<double>::
TEMPL_COPY_CONSTRUCTOR(double, float);
TEMPL_COPY_CONSTRUCTOR(float, double);
+#ifdef DEAL_II_WITH_COMPLEX_VALUES
TEMPL_COPY_CONSTRUCTOR(std::complex<double>, std::complex<float>);
TEMPL_COPY_CONSTRUCTOR(std::complex<float>, std::complex<double>);
+#endif
#undef TEMPL_COPY_CONSTRUCTOR
TEMPL_OP_EQ(float, double);
+#ifdef DEAL_II_WITH_COMPLEX_VALUES
TEMPL_OP_EQ(std::complex<double>, std::complex<float>);
TEMPL_OP_EQ(std::complex<float>, std::complex<double>);
+#endif
#undef TEMPL_OP_EQ
check_norms<float>();
check_norms<double>();
+#ifdef DEAL_II_WITH_COMPLEX_VALUES
check_norms<std::complex<double>>();
+#endif
deallog << "OK" << std::endl;
}
check<float>();
check<double>();
+#ifdef DEAL_II_WITH_COMPLEX_VALUES
check<std::complex<double>>();
+#endif
deallog << "OK" << std::endl;
}
--- /dev/null
+
+DEAL::Add and dot should be 0.30, is 0.30
+DEAL::Add and dot should be 13.40, is 13.40
+DEAL::Add and dot should be 26.50, is 26.50
+DEAL::Add and dot should be 39.61, is 39.61
+DEAL::Add and dot should be 52.71, is 52.71
+DEAL::Vector add reference: 0.03 0.03 0.04 0.05 0.06 0.06 0.07 0.08 0.09 0.09 0.10 0.11 0.12 0.12 0.13 0.14 0.15
+DEAL::Vector check reference: 0.03 0.03 0.04 0.05 0.06 0.06 0.07 0.08 0.09 0.09 0.10 0.11 0.12 0.12 0.13 0.14 0.15
+DEAL::Vector add constant: 1.03 1.03 1.04 1.05 1.06 1.06 1.07 1.08 1.09 1.09 1.10 1.11 1.12 1.12 1.13 1.14 1.15
+DEAL::Add and dot should be 0.30, is 0.30
+DEAL::Add and dot should be 13.40, is 13.40
+DEAL::Add and dot should be 26.50, is 26.50
+DEAL::Add and dot should be 39.61, is 39.61
+DEAL::Add and dot should be 52.71, is 52.71
+DEAL::OK
check_norms<float>();
check_norms<double>();
+#ifdef DEAL_II_WITH_COMPLEX_VALUES
check_complex_norms<double>();
check_complex_norms<float>();
+#endif
deallog << "OK" << std::endl;
}
check_norms<float>();
check_norms<double>();
check_norms<long double>();
+#ifdef DEAL_II_WITH_COMPLEX_VALUES
check_norms<std::complex<double>>();
+#endif
}
--- /dev/null
+
+DEAL::Vector difference: 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
+DEAL::Vector difference: 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0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0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
+DEAL::Vector difference: 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
+DEAL::Vector difference: 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
check<float>();
check<double>();
check<long double>();
+#ifdef DEAL_II_WITH_COMPLEX_VALUES
check<std::complex<double>>();
+#endif
deallog << "OK" << std::endl;
}
--- /dev/null
+
+DEAL::Add and dot should be 0.30, is 0.30
+DEAL::Add and dot should be 13.40, is 13.40
+DEAL::Add and dot should be 26.50, is 26.50
+DEAL::Add and dot should be 39.61, is 39.61
+DEAL::Add and dot should be 52.71, is 52.71
+DEAL::Vector add reference: 0.03 0.03 0.04 0.05 0.06 0.06 0.07 0.08 0.09 0.09 0.10 0.11 0.12 0.12 0.13 0.14 0.15
+DEAL::Vector check reference: 0.03 0.03 0.04 0.05 0.06 0.06 0.07 0.08 0.09 0.09 0.10 0.11 0.12 0.12 0.13 0.14 0.15
+DEAL::Add and dot should be 0.30, is 0.30
+DEAL::Add and dot should be 13.40, is 13.40
+DEAL::Add and dot should be 26.50, is 26.50
+DEAL::Add and dot should be 39.61, is 39.61
+DEAL::Add and dot should be 52.71, is 52.71
+DEAL::Add and dot should be 0.30, is 0.30
+DEAL::Add and dot should be 13.40, is 13.40
+DEAL::Add and dot should be 26.50, is 26.50
+DEAL::Add and dot should be 39.61, is 39.61
+DEAL::Add and dot should be 52.71, is 52.71
+DEAL::OK
check_norms<float>();
check_norms<double>();
check_norms<long double>();
+#ifdef DEAL_II_WITH_COMPLEX_VALUES
check_complex_norms<double>();
check_complex_norms<float>();
+#endif
deallog << "OK" << std::endl;
}
deallog.push("double");
test<double>();
deallog.pop();
+#ifdef DEAL_II_WITH_COMPLEX_VALUES
deallog.push("complex<double>");
test<std::complex<double>>();
+#endif
deallog.pop();
}
else
{
test<float>();
test<double>();
+#ifdef DEAL_II_WITH_COMPLEX_VALUES
test<std::complex<double>>();
+#endif
}
}
--- /dev/null
+
+DEAL:float::Ok
+DEAL:double::Ok
--- /dev/null
+
+DEAL:float::Ok
+DEAL:double::Ok
--- /dev/null
+
+DEAL:float::Ok
+DEAL:double::Ok