Reference documentation for deal.II version 9.0.0
trilinos_epetra_communication_pattern.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2015 - 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 at
12 // the top level of the deal.II distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_trilinos_epetra_communication_pattern_h
17 #define dealii_trilinos_epetra_communication_pattern_h
18 
19 
20 #include <deal.II/base/config.h>
21 
22 #ifdef DEAL_II_WITH_TRILINOS
23 
24 #ifdef DEAL_II_WITH_MPI
25 
26 #include <deal.II/lac/communication_pattern_base.h>
27 
28 # include <Epetra_Import.h>
29 
30 #include <memory>
31 
32 DEAL_II_NAMESPACE_OPEN
33 
34 namespace LinearAlgebra
35 {
36  namespace EpetraWrappers
37  {
42  {
43  public:
51  CommunicationPattern(const IndexSet &vector_space_vector_index_set,
52  const IndexSet &read_write_vector_index_set,
53  const MPI_Comm &communicator);
54 
58  void reinit(const IndexSet &vector_space_vector_index_set,
59  const IndexSet &read_write_vector_index_set,
60  const MPI_Comm &communicator);
61 
65  const MPI_Comm &get_mpi_communicator() const;
66 
70  const Epetra_Import &get_epetra_import() const;
71 
72  private:
76  std::shared_ptr<const MPI_Comm> comm;
77 
81  std::unique_ptr<Epetra_Import> import;
82  };
83  } // end of namespace EpetraWrappers
84 } // end of namespace LinearAlgebra
85 
86 DEAL_II_NAMESPACE_CLOSE
87 
88 #endif
89 
90 #endif
91 
92 #endif
void reinit(const IndexSet &vector_space_vector_index_set, const IndexSet &read_write_vector_index_set, const MPI_Comm &communicator)
CommunicationPattern(const IndexSet &vector_space_vector_index_set, const IndexSet &read_write_vector_index_set, const MPI_Comm &communicator)