Tpetra parallel linear algebra Version of the Day
Loading...
Searching...
No Matches
Tpetra_FEMultiVector_decl.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Tpetra: Templated Linear Algebra Services Package
4//
5// Copyright 2008 NTESS and the Tpetra contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef TPETRA_FEMULTIVECTOR_DECL_HPP
11#define TPETRA_FEMULTIVECTOR_DECL_HPP
12
15
18
19namespace Tpetra {
20
21template <class Scalar,
22 class LocalOrdinal,
23 class GlobalOrdinal,
24 class Node>
25class FEMultiVector : public MultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
26 private:
28 friend base_type;
29
31 void beginFill();
32
34 void endFill();
35
36 public:
38
39
41 using scalar_type = Scalar;
43 using local_ordinal_type = LocalOrdinal;
45 using global_ordinal_type = GlobalOrdinal;
46
48 using device_type = typename base_type::device_type;
49
51 using execution_space = typename base_type::execution_space;
52
54 using node_type = Node;
55
57 using dual_view_type = typename base_type::dual_view_type;
58
60 using map_type = typename base_type::map_type;
61
63 using impl_scalar_type = typename base_type::impl_scalar_type;
64
66 using dot_type = typename base_type::dot_type;
67
69 using mag_type = typename base_type::mag_type;
70
72
74
76 FEMultiVector() = delete;
77
105 FEMultiVector(const Teuchos::RCP<const map_type>& map,
106 const Teuchos::RCP<const Import<local_ordinal_type, global_ordinal_type, node_type>>& importer,
107 const size_t numVecs,
108 const bool zeroOut = true);
109
111 FEMultiVector(const FEMultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node>&) = delete;
112
114 FEMultiVector(FEMultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node>&&) = delete;
115
117 FEMultiVector&
118 operator=(const FEMultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node>&) = delete;
119
121 FEMultiVector&
122 operator=(FEMultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node>&&) = delete;
123
133 virtual ~FEMultiVector() = default;
134
136
138
140 void beginAssembly();
141
143 void endAssembly();
144
145 void beginModify();
146 void endModify();
147
150 void globalAssemble();
151
157 void doOwnedPlusSharedToOwned(const CombineMode CM = Tpetra::ADD);
158
163 void doOwnedToOwnedPlusShared(const CombineMode CM = Tpetra::ADD);
164
166 void switchActiveMultiVector();
167
168 protected:
173 void replaceMap(const Teuchos::RCP<const map_type>& map);
174
175 Teuchos::RCP<FE::FillState> fillState_;
176
178 Teuchos::RCP<base_type> inactiveMultiVector_;
179
185 Teuchos::RCP<FE::WhichActive> activeMultiVector_;
186
188 Teuchos::RCP<const Import<local_ordinal_type, global_ordinal_type, node_type>> importer_;
189};
190
191} // namespace Tpetra
192
193#endif // TPETRA_FEMULTIVECTOR_DECL_HPP
Forward declaration of Tpetra::FEMultiVector.
Declaration of the Tpetra::MultiVector class.
Struct that holds views of the contents of a CrsMatrix.
MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & operator=(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &)=default
Copy assigment (shallow copy).
typename Kokkos::Details::InnerProductSpaceTraits< impl_scalar_type >::dot_type dot_type
Type of an inner ("dot") product result.
Kokkos::DualView< impl_scalar_type **, Kokkos::LayoutLeft, device_type > dual_view_type
Kokkos::DualView specialization used by this class.
typename map_type::device_type device_type
This class' preferred Kokkos device type.
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
The type of the Map specialization used by this class.
typename Kokkos::ArithTraits< Scalar >::val_type impl_scalar_type
The type used internally in place of Scalar.
typename device_type::execution_space execution_space
Type of the (new) Kokkos execution space.
typename Kokkos::ArithTraits< impl_scalar_type >::mag_type mag_type
Type of a norm result.
int local_ordinal_type
Default value of Scalar template parameter.
Namespace Tpetra contains the class and methods constituting the Tpetra library.
CombineMode
Rule for combining data in an Import or Export.
@ ADD
Sum new values.