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
23
26
27namespace Tpetra {
28
29template <class Scalar,
30 class LocalOrdinal,
31 class GlobalOrdinal,
32 class Node>
33class FEMultiVector : public MultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
34 private:
36 friend base_type;
37
39 void beginFill();
40
42 void endFill();
43
44 public:
46
47
49 using scalar_type = Scalar;
51 using local_ordinal_type = LocalOrdinal;
53 using global_ordinal_type = GlobalOrdinal;
54
56 using device_type = typename base_type::device_type;
57
59 using execution_space = typename base_type::execution_space;
60
62 using node_type = Node;
63
65 using dual_view_type = typename base_type::dual_view_type;
66
68 using map_type = typename base_type::map_type;
69
71 using impl_scalar_type = typename base_type::impl_scalar_type;
72
74 using dot_type = typename base_type::dot_type;
75
77 using mag_type = typename base_type::mag_type;
78
80
82
84 FEMultiVector() = delete;
85
113 FEMultiVector(const Teuchos::RCP<const map_type>& map,
114 const Teuchos::RCP<const Import<local_ordinal_type, global_ordinal_type, node_type>>& importer,
115 const size_t numVecs,
116 const bool zeroOut = true);
117
120
123
127
131
141 virtual ~FEMultiVector() = default;
142
144
146
148 void beginAssembly();
149
151 void endAssembly();
152
153 void beginModify();
154 void endModify();
155
158 void globalAssemble();
159
165 void doOwnedPlusSharedToOwned(const CombineMode CM = Tpetra::ADD);
166
171 void doOwnedToOwnedPlusShared(const CombineMode CM = Tpetra::ADD);
172
174 void switchActiveMultiVector();
175
176 protected:
181 void replaceMap(const Teuchos::RCP<const map_type>& map);
182
183 Teuchos::RCP<FE::FillState> fillState_;
184
186 Teuchos::RCP<base_type> inactiveMultiVector_;
187
193 Teuchos::RCP<FE::WhichActive> activeMultiVector_;
194
196 Teuchos::RCP<const Import<local_ordinal_type, global_ordinal_type, node_type>> importer_;
197};
198
199} // namespace Tpetra
200
201#endif // TPETRA_FEMULTIVECTOR_DECL_HPP
Forward declaration of Tpetra::FEMultiVector.
Declaration of the Tpetra::MultiVector class.
A distributed MultiVector for finite element assembly.
Struct that holds views of the contents of a CrsMatrix.
typename KokkosKernels::Details::InnerProductSpaceTraits< impl_scalar_type >::dot_type dot_type
Type of an inner ("dot") product result.
MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & operator=(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &)=default
Copy assigment (shallow copy).
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.
typename KokkosKernels::ArithTraits< impl_scalar_type >::mag_type mag_type
Type of a norm result.
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
The type of the Map specialization used by this class.
typename device_type::execution_space execution_space
Type of the (new) Kokkos execution space.
typename KokkosKernels::ArithTraits< Scalar >::val_type impl_scalar_type
The type used internally in place of Scalar.
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.