Reference documentation for deal.II version 9.6.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\}}\)
Loading...
Searching...
No Matches
trilinos_tpetra_communication_pattern.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2018 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_trilinos_tpetra_communication_pattern_h
16#define dealii_trilinos_tpetra_communication_pattern_h
17
18
19#include <deal.II/base/config.h>
20
22
24
25#ifdef DEAL_II_TRILINOS_WITH_TPETRA
26
29
30# include <Tpetra_Export.hpp>
31# include <Tpetra_Import.hpp>
32
33# include <memory>
34
36
37namespace LinearAlgebra
38{
39 namespace TpetraWrappers
40 {
44 template <typename MemorySpace = ::MemorySpace::Host>
46 {
47 static_assert(std::is_same_v<MemorySpace, ::MemorySpace::Default> ||
48 std::is_same_v<MemorySpace, ::MemorySpace::Host>);
49
50 public:
64 CommunicationPattern(const IndexSet &locally_owned_indices,
65 const IndexSet &ghost_indices,
66 const MPI_Comm communicator);
67
81 virtual void
82 reinit(const IndexSet &locally_owned_indices,
83 const IndexSet &ghost_indices,
84 const MPI_Comm communicator) override;
85
89 virtual MPI_Comm
90 get_mpi_communicator() const override;
91
96 get_tpetra_import() const;
97
101 Teuchos::RCP<TpetraTypes::ImportType<MemorySpace>>
102 get_tpetra_import_rcp() const;
103
108 get_tpetra_export() const;
109
113 Teuchos::RCP<TpetraTypes::ExportType<MemorySpace>>
114 get_tpetra_export_rcp() const;
115
116 private:
120 Teuchos::RCP<const MPI_Comm> comm;
121
125 Teuchos::RCP<TpetraTypes::ImportType<MemorySpace>> tpetra_import;
126
130 Teuchos::RCP<TpetraTypes::ExportType<MemorySpace>> tpetra_export;
131 };
132 } // end of namespace TpetraWrappers
133} // end of namespace LinearAlgebra
134
136
137#endif
138
139#endif
const TpetraTypes::ImportType< MemorySpace > & get_tpetra_import() const
virtual void reinit(const IndexSet &locally_owned_indices, const IndexSet &ghost_indices, const MPI_Comm communicator) override
CommunicationPattern(const IndexSet &locally_owned_indices, const IndexSet &ghost_indices, const MPI_Comm communicator)
Teuchos::RCP< TpetraTypes::ImportType< MemorySpace > > tpetra_import
Teuchos::RCP< TpetraTypes::ImportType< MemorySpace > > get_tpetra_import_rcp() const
Teuchos::RCP< TpetraTypes::ExportType< MemorySpace > > tpetra_export
Teuchos::RCP< TpetraTypes::ExportType< MemorySpace > > get_tpetra_export_rcp() const
const TpetraTypes::ExportType< MemorySpace > & get_tpetra_export() const
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:503
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:504
Tpetra::Import< LO, GO, NodeType< MemorySpace > > ImportType
Tpetra::Export< LO, GO, NodeType< MemorySpace > > ExportType