Tpetra parallel linear algebra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
19 namespace Tpetra {
20 
21  template <class Scalar,
22  class LocalOrdinal,
23  class GlobalOrdinal,
24  class Node>
25  class FEMultiVector :
26  public MultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node>
27  {
28  private:
30  friend base_type;
31 
33  void beginFill ();
34 
36  void endFill ();
37 
38  public:
40 
41 
43  using scalar_type = Scalar;
45  using local_ordinal_type = LocalOrdinal;
47  using global_ordinal_type = GlobalOrdinal;
48 
50  using device_type = typename base_type::device_type;
51 
53  using execution_space = typename base_type::execution_space;
54 
56  using node_type = Node;
57 
59  using dual_view_type = typename base_type::dual_view_type;
60 
62  using map_type = typename base_type::map_type;
63 
65  using impl_scalar_type = typename base_type::impl_scalar_type;
66 
68  using dot_type = typename base_type::dot_type;
69 
71  using mag_type = typename base_type::mag_type;
72 
74 
76 
78  FEMultiVector () = delete;
79 
107  FEMultiVector (const Teuchos::RCP<const map_type>& map,
108  const Teuchos::RCP<const Import<local_ordinal_type, global_ordinal_type, node_type>>& importer,
109  const size_t numVecs,
110  const bool zeroOut = true);
111 
113  FEMultiVector (const FEMultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node>&) = delete;
114 
116  FEMultiVector (FEMultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node>&&) = delete;
117 
119  FEMultiVector&
120  operator= (const FEMultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node>&) = delete;
121 
123  FEMultiVector&
124  operator= (FEMultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node>&&) = delete;
125 
135  virtual ~FEMultiVector () = default;
136 
138 
140 
142  void beginAssembly ();
143 
145  void endAssembly ();
146 
147  void beginModify ();
148  void endModify ();
149 
152  void globalAssemble ();
153 
159  void doOwnedPlusSharedToOwned(const CombineMode CM=Tpetra::ADD);
160 
165  void doOwnedToOwnedPlusShared(const CombineMode CM=Tpetra::ADD);
166 
168  void switchActiveMultiVector();
169 
170  protected:
175  void replaceMap (const Teuchos::RCP<const map_type>& map);
176 
177  Teuchos::RCP<FE::FillState> fillState_;
178 
180  Teuchos::RCP<base_type> inactiveMultiVector_;
181 
187  Teuchos::RCP<FE::WhichActive> activeMultiVector_;
188 
190  Teuchos::RCP<const Import<local_ordinal_type, global_ordinal_type, node_type>> importer_;
191  };
192 
193 } // namespace Tpetra
194 
195 #endif // TPETRA_FEMULTIVECTOR_DECL_HPP
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.
void replaceMap(const Teuchos::RCP< const map_type > &map)
Replace the underlying Map in place.
typename map_type::device_type device_type
This class&#39; preferred Kokkos device type.
int local_ordinal_type
Default value of Scalar template parameter.
typename Kokkos::ArithTraits< Scalar >::val_type impl_scalar_type
The type used internally in place of Scalar.
Declaration of the Tpetra::MultiVector class.
CombineMode
Rule for combining data in an Import or Export.
Sum new values.
Kokkos::DualView< impl_scalar_type **, Kokkos::LayoutLeft, device_type > dual_view_type
Kokkos::DualView specialization used by this class.
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
The type of the Map specialization used by this class.
Forward declaration of Tpetra::FEMultiVector.
typename Kokkos::Details::InnerProductSpaceTraits< impl_scalar_type >::dot_type dot_type
Type of an inner (&quot;dot&quot;) product result.