Reference documentation for deal.II version GIT e8f57130d0 2023-09-28 07:00:03+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
read_write_vector.cc
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2015 - 2023 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
17 #include <deal.II/lac/read_write_vector.templates.h>
18 
20 
21 #include "read_write_vector.inst"
22 
23 namespace LinearAlgebra
24 {
25  // do a few functions that currently don't fit the scheme because they have
26  // two template arguments that need to be different (the case of same
27  // arguments is covered by the default copy constructor and copy operator that
28  // is declared separately)
29 
30 #define TEMPL_COPY_CONSTRUCTOR(S1, S2) \
31  template ReadWriteVector<S1> &ReadWriteVector<S1>::operator= \
32  <S2>(const ReadWriteVector<S2> &)
33 
34  TEMPL_COPY_CONSTRUCTOR(double, float);
35  TEMPL_COPY_CONSTRUCTOR(float, double);
36 #ifdef DEAL_II_WITH_COMPLEX_VALUES
37  TEMPL_COPY_CONSTRUCTOR(std::complex<double>, std::complex<float>);
38  TEMPL_COPY_CONSTRUCTOR(std::complex<float>, std::complex<double>);
39 #endif
40 
41 #undef TEMPL_COPY_CONSTRUCTOR
42 
43 #ifndef DOXYGEN
44  template void
48  const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
49  template void
53  const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
54 
55  template void
59  const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
60  template void
64  const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
65 # ifdef DEAL_II_WITH_COMPLEX_VALUES
66  template void
67  ReadWriteVector<std::complex<float>>::import_elements(
68  const distributed::Vector<std::complex<float>, ::MemorySpace::Host>
69  &,
71  const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
72 
73  template void
74  ReadWriteVector<std::complex<double>>::import_elements(
75  const distributed::Vector<std::complex<double>, ::MemorySpace::Host>
76  &,
78  const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
79 # endif
80 
81 
82 
83 # ifdef HAVE_TPETRA_INST_FLOAT
84  template void
88  const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
89 # endif
90 # ifdef HAVE_TPETRA_INST_DOUBLE
91  template void
95  const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
96 # endif
97 # ifdef DEAL_II_WITH_COMPLEX_VALUES
98 # ifdef HAVE_TPETRA_INST_COMPLEX_FLOAT
99  template void
100  ReadWriteVector<std::complex<float>>::import_elements(
101  const LinearAlgebra::TpetraWrappers::Vector<std::complex<float>> &,
103  const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
104 # endif
105 # ifdef HAVE_TPETRA_INST_COMPLEX_DOUBLE
106  template void
107  ReadWriteVector<std::complex<double>>::import_elements(
108  const LinearAlgebra::TpetraWrappers::Vector<std::complex<double>> &,
110  const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
111 # endif
112 # endif
113 
114 #endif
115 } // namespace LinearAlgebra
116 
void import_elements(const ::Vector< Number > &vec, VectorOperation::values operation, const std::shared_ptr< const Utilities::MPI::CommunicationPatternBase > &communication_pattern={})
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:477
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:478
TEMPL_COPY_CONSTRUCTOR(double, float)