| 1 | // ------------------------------------------------------------------------ |
| 2 | // |
| 3 | // SPDX-License-Identifier: LGPL-2.1-or-later |
| 4 | // Copyright (C) 2018 - 2024 by the deal.II authors |
| 5 | // |
| 6 | // This file is part of the deal.II library. |
| 7 | // |
| 8 | // Part of the source code is dual licensed under Apache-2.0 WITH |
| 9 | // LLVM-exception OR LGPL-2.1-or-later. Detailed license information |
| 10 | // governing the source code and code contributions can be found in |
| 11 | // LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II. |
| 12 | // |
| 13 | // ------------------------------------------------------------------------ |
| 14 | |
| 15 | #include <deal.II/lac/trilinos_tpetra_vector.templates.h> |
| 16 | |
| 17 | #ifdef DEAL_II_TRILINOS_WITH_TPETRA |
| 18 | |
| 19 | DEAL_II_NAMESPACE_OPEN |
| 20 | |
| 21 | namespace LinearAlgebra |
| 22 | { |
| 23 | namespace TpetraWrappers |
| 24 | { |
| 25 | // Instantiate these vectors types for specific scalar types. |
| 26 | // |
| 27 | // While there: |
| 28 | // Check that the class we declare here satisfies the |
| 29 | // vector-space-vector concept. If we catch it here, |
| 30 | // any mistake in the vector class declaration would |
| 31 | // show up in uses of this class later on as well. |
| 32 | |
| 33 | # ifdef HAVE_TPETRA_INST_FLOAT |
| 34 | # ifdef DEAL_II_HAVE_CXX20 |
| 35 | static_assert( |
| 36 | concepts::is_vector_space_vector<Vector<float, MemorySpace::Host>>); |
| 37 | static_assert( |
| 38 | concepts::is_vector_space_vector<Vector<float, MemorySpace::Default>>); |
| 39 | # endif |
| 40 | template class Vector<float, MemorySpace::Host>; |
| 41 | template class Vector<float, MemorySpace::Default>; |
| 42 | template Vector<float, MemorySpace::Host> & |
| 43 | Vector<float, MemorySpace::Host>::operator= |
| 44 | <float>(const dealii::Vector<float> &); |
| 45 | template Vector<float, MemorySpace::Default> & |
| 46 | Vector<float, MemorySpace::Default>::operator= |
| 47 | <float>(const dealii::Vector<float> &); |
| 48 | namespace internal |
| 49 | { |
| 50 | template class VectorReference<float, MemorySpace::Host>; |
| 51 | template class VectorReference<float, MemorySpace::Default>; |
| 52 | } // namespace internal |
| 53 | # endif |
| 54 | |
| 55 | # ifdef HAVE_TPETRA_INST_DOUBLE |
| 56 | # ifdef DEAL_II_HAVE_CXX20 |
| 57 | static_assert( |
| 58 | concepts::is_vector_space_vector<Vector<double, MemorySpace::Host>>); |
| 59 | static_assert( |
| 60 | concepts::is_vector_space_vector<Vector<double, MemorySpace::Default>>); |
| 61 | # endif |
| 62 | template class Vector<double, MemorySpace::Host>; |
| 63 | template class Vector<double, MemorySpace::Default>; |
| 64 | template Vector<double, MemorySpace::Host> & |
| 65 | Vector<double, MemorySpace::Host>::operator= |
| 66 | <double>(const dealii::Vector<double> &); |
| 67 | template Vector<double, MemorySpace::Default> & |
| 68 | Vector<double, MemorySpace::Default>::operator= |
| 69 | <double>(const dealii::Vector<double> &); |
| 70 | namespace internal |
| 71 | { |
| 72 | template class VectorReference<double, MemorySpace::Host>; |
| 73 | template class VectorReference<double, MemorySpace::Default>; |
| 74 | } // namespace internal |
| 75 | # endif |
| 76 | |
| 77 | # ifdef DEAL_II_WITH_COMPLEX_VALUES |
| 78 | # ifdef HAVE_TPETRA_INST_COMPLEX_FLOAT |
| 79 | # ifdef DEAL_II_HAVE_CXX20 |
| 80 | static_assert(concepts::is_vector_space_vector< |
| 81 | Vector<std::complex<float>, MemorySpace::Host>>); |
| 82 | static_assert(concepts::is_vector_space_vector< |
| 83 | Vector<std::complex<float>, MemorySpace::Default>>); |
| 84 | # endif |
| 85 | template class Vector<std::complex<float>, MemorySpace::Host>; |
| 86 | template class Vector<std::complex<float>, MemorySpace::Default>; |
| 87 | template Vector<std::complex<float>, MemorySpace::Host> & |
| 88 | Vector<std::complex<float>, MemorySpace::Host>::operator= |
| 89 | <std::complex<float>>(const dealii::Vector<std::complex<float>> &); |
| 90 | template Vector<std::complex<float>, MemorySpace::Default> & |
| 91 | Vector<std::complex<float>, MemorySpace::Default>::operator= |
| 92 | <std::complex<float>>(const dealii::Vector<std::complex<float>> &); |
| 93 | namespace internal |
| 94 | { |
| 95 | template class VectorReference<std::complex<float>, MemorySpace::Host>; |
| 96 | template class VectorReference<std::complex<float>, MemorySpace::Default>; |
| 97 | } // namespace internal |
| 98 | # endif |
| 99 | |
| 100 | # ifdef HAVE_TPETRA_INST_COMPLEX_DOUBLE |
| 101 | # ifdef DEAL_II_HAVE_CXX20 |
| 102 | static_assert(concepts::is_vector_space_vector< |
| 103 | Vector<std::complex<double>, MemorySpace::Host>>); |
| 104 | static_assert(concepts::is_vector_space_vector< |
| 105 | Vector<std::complex<double>, MemorySpace::Default>>); |
| 106 | # endif |
| 107 | template class Vector<std::complex<double>, MemorySpace::Host>; |
| 108 | template class Vector<std::complex<double>, MemorySpace::Default>; |
| 109 | template Vector<std::complex<double>, MemorySpace::Host> & |
| 110 | Vector<std::complex<double>, MemorySpace::Host>::operator= |
| 111 | <std::complex<double>>(const dealii::Vector<std::complex<double>> &); |
| 112 | template Vector<std::complex<double>, MemorySpace::Default> & |
| 113 | Vector<std::complex<double>, MemorySpace::Default>::operator= |
| 114 | <std::complex<double>>(const dealii::Vector<std::complex<double>> &); |
| 115 | namespace internal |
| 116 | { |
| 117 | template class VectorReference<std::complex<double>, MemorySpace::Host>; |
| 118 | template class VectorReference<std::complex<double>, |
| 119 | MemorySpace::Default>; |
| 120 | } // namespace internal |
| 121 | # endif |
| 122 | # endif |
| 123 | } // namespace TpetraWrappers |
| 124 | } // namespace LinearAlgebra |
| 125 | |
| 126 | DEAL_II_NAMESPACE_CLOSE |
| 127 | |
| 128 | #endif |