Reference documentation for deal.II version 9.3.2
\(\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\}}\)
copy.h
Go to the documentation of this file.
1 //-----------------------------------------------------------
2 //
3 // Copyright (C) 2017 - 2018 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 #ifndef dealii_sundials_copy_h
17 #define dealii_sundials_copy_h
18 
19 #include <deal.II/base/config.h>
20 #ifdef DEAL_II_WITH_SUNDIALS
21 
22 # include <sundials/sundials_nvector.h>
23 # ifdef DEAL_II_WITH_MPI
24 # include <nvector/nvector_parallel.h>
25 # endif
29 # include <deal.II/lac/vector.h>
30 
31 # include <nvector/nvector_serial.h>
32 
33 # ifdef DEAL_II_WITH_TRILINOS
36 # endif
37 
38 # ifdef DEAL_II_WITH_PETSC
41 # endif
42 
44 namespace SUNDIALS
45 {
46  namespace internal
47  {
48  // The following internal functions are used by SUNDIALS wrappers to copy
49  // to and from deal.II vector types.
50 # ifdef DEAL_II_WITH_MPI
51 
52 # ifdef DEAL_II_WITH_TRILINOS
53  void
54  copy(TrilinosWrappers::MPI::Vector &dst, const N_Vector &src);
55  void
56  copy(N_Vector &dst, const TrilinosWrappers::MPI::Vector &src);
57  void
58  copy(TrilinosWrappers::MPI::BlockVector &dst, const N_Vector &src);
59  void
60  copy(N_Vector &dst, const TrilinosWrappers::MPI::BlockVector &src);
61 # endif // DEAL_II_WITH_TRILINOS
62 
63 # ifdef DEAL_II_WITH_PETSC
64 # ifndef PETSC_USE_COMPLEX
65  void
66  copy(PETScWrappers::MPI::Vector &dst, const N_Vector &src);
67  void
68  copy(N_Vector &dst, const PETScWrappers::MPI::Vector &src);
69  void
70  copy(PETScWrappers::MPI::BlockVector &dst, const N_Vector &src);
71  void
72  copy(N_Vector &dst, const PETScWrappers::MPI::BlockVector &src);
73 # endif // PETSC_USE_COMPLEX
74 # endif // DEAL_II_WITH_PETSC
75 
76 # endif
77 
78  void
79  copy(BlockVector<double> &dst, const N_Vector &src);
80  void
81  copy(N_Vector &dst, const BlockVector<double> &src);
82 
83  void
84  copy(Vector<double> &dst, const N_Vector &src);
85  void
86  copy(N_Vector &dst, const Vector<double> &src);
87 
88  void
90  const N_Vector & src);
91  void
92  copy(N_Vector & dst,
94 
95  void
96  copy(LinearAlgebra::distributed::Vector<double> &dst, const N_Vector &src);
97  void
98  copy(N_Vector &dst, const LinearAlgebra::distributed::Vector<double> &src);
99  } // namespace internal
100 } // namespace SUNDIALS
102 
103 #endif // DEAL_II_WITH_SUNDIALS
104 #endif // dealii_sundials_copy_h
Definition: vector.h:110
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:396
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:397
void copy(TrilinosWrappers::MPI::Vector &dst, const N_Vector &src)
Definition: copy.cc:136