Reference documentation for deal.II version 9.2.0
\(\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
27 # include <deal.II/lac/vector.h>
28 
29 # include <nvector/nvector_serial.h>
30 
31 # ifdef DEAL_II_WITH_TRILINOS
34 # endif
35 
36 # ifdef DEAL_II_WITH_PETSC
39 # endif
40 
42 namespace SUNDIALS
43 {
44  namespace internal
45  {
46  // The following internal functions are used by SUNDIALS wrappers to copy
47  // to and from deal.II vector types.
48 # ifdef DEAL_II_WITH_MPI
49 
50 # ifdef DEAL_II_WITH_TRILINOS
51  void
52  copy(TrilinosWrappers::MPI::Vector &dst, const N_Vector &src);
53  void
54  copy(N_Vector &dst, const TrilinosWrappers::MPI::Vector &src);
55  void
56  copy(TrilinosWrappers::MPI::BlockVector &dst, const N_Vector &src);
57  void
58  copy(N_Vector &dst, const TrilinosWrappers::MPI::BlockVector &src);
59 # endif // DEAL_II_WITH_TRILINOS
60 
61 # ifdef DEAL_II_WITH_PETSC
62 # ifndef PETSC_USE_COMPLEX
63  void
64  copy(PETScWrappers::MPI::Vector &dst, const N_Vector &src);
65  void
66  copy(N_Vector &dst, const PETScWrappers::MPI::Vector &src);
67  void
68  copy(PETScWrappers::MPI::BlockVector &dst, const N_Vector &src);
69  void
70  copy(N_Vector &dst, const PETScWrappers::MPI::BlockVector &src);
71 # endif // PETSC_USE_COMPLEX
72 # endif // DEAL_II_WITH_PETSC
73 
74 # endif
75 
76  void
77  copy(BlockVector<double> &dst, const N_Vector &src);
78  void
79  copy(N_Vector &dst, const BlockVector<double> &src);
80 
81  void
82  copy(Vector<double> &dst, const N_Vector &src);
83  void
84  copy(N_Vector &dst, const Vector<double> &src);
85  } // namespace internal
86 } // namespace SUNDIALS
88 
89 #endif // DEAL_II_WITH_SUNDIALS
90 #endif // dealii_sundials_copy_h
TrilinosWrappers::MPI::Vector
Definition: trilinos_vector.h:400
BlockVector< double >
SUNDIALS::internal::copy
void copy(TrilinosWrappers::MPI::Vector &dst, const N_Vector &src)
Definition: copy.cc:65
TrilinosWrappers::MPI::BlockVector
Definition: trilinos_parallel_block_vector.h:75
SUNDIALS
Definition: arkode.h:58
block_vector.h
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
petsc_block_vector.h
PETScWrappers::MPI::BlockVector
Definition: petsc_block_vector.h:61
PETScWrappers::MPI::Vector
Definition: petsc_vector.h:158
vector.h
petsc_vector.h
config.h
internal
Definition: aligned_vector.h:369
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
trilinos_vector.h
Vector< double >
trilinos_parallel_block_vector.h