Loading [MathJax]/extensions/TeX/newcommand.js
 Reference documentation for deal.II version 9.1.1
\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
read_write_vector.cc
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2015 - 2019 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 
16 #include <deal.II/lac/read_write_vector.h>
17 #include <deal.II/lac/read_write_vector.templates.h>
18 
19 DEAL_II_NAMESPACE_OPEN
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  template void
45  const distributed::Vector<float, ::MemorySpace::Host> &,
47  const std::shared_ptr<const CommunicationPatternBase> &);
48 
49  template void
51  const distributed::Vector<double, ::MemorySpace::Host> &,
53  const std::shared_ptr<const CommunicationPatternBase> &);
54 #ifdef DEAL_II_WITH_COMPLEX_VALUES
55  template void
56  ReadWriteVector<std::complex<float>>::import(
57  const distributed::Vector<std::complex<float>, ::MemorySpace::Host>
58  &,
60  const std::shared_ptr<const CommunicationPatternBase> &);
61 
62  template void
63  ReadWriteVector<std::complex<double>>::import(
64  const distributed::Vector<std::complex<double>, ::MemorySpace::Host>
65  &,
67  const std::shared_ptr<const CommunicationPatternBase> &);
68 #endif
69 } // namespace LinearAlgebra
70 
71 DEAL_II_NAMESPACE_CLOSE
void import(const distributed::Vector< Number, MemorySpace > &vec, VectorOperation::values operation, const std::shared_ptr< const CommunicationPatternBase > &communication_pattern=std::shared_ptr< const CommunicationPatternBase >())
LinearAlgebra::distributed::Vector< Number > Vector