Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Thyra_DefaultClusteredSpmdProductVector_decl.hpp
1 // @HEADER
2 // *****************************************************************************
3 // Thyra: Interfaces and Support for Abstract Numerical Algorithms
4 //
5 // Copyright 2004 NTESS and the Thyra contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef THYRA_DEFAULT_CLUSTERED_SPMD_PRODUCT_VECTOR_DECL_HPP
11 #define THYRA_DEFAULT_CLUSTERED_SPMD_PRODUCT_VECTOR_DECL_HPP
12 
13 #include "Thyra_ProductVectorBase.hpp"
14 #include "Thyra_VectorDefaultBase.hpp"
15 
16 namespace Thyra {
17 
19 template <class Scalar> class DefaultClusteredSpmdProductVectorSpace;
20 
30 template<class Scalar>
32  : virtual public ProductVectorBase<Scalar>
33  , virtual protected VectorDefaultBase<Scalar>
34 {
35 public:
36 
37 #ifndef _MSC_VER
38 
40 #endif
41 
44 
47 
51  ,const Teuchos::RCP<VectorBase<Scalar> > vecs[]
52  );
53 
58  void initialize(
60  ,const Teuchos::RCP<VectorBase<Scalar> > vecs[]
61  );
62 
67  void uninitialize(
69  ,Teuchos::RCP<VectorBase<Scalar> > vecs[] = NULL
70  );
71 
73 
76 
81 
83 
86 
90  bool blockIsConst(const int k) const;
95 
97 
100 
103 
105 
106 protected:
107 
110 
112  void applyOpImpl(
113  const RTOpPack::RTOpT<Scalar> &op,
114  const ArrayView<const Ptr<const VectorBase<Scalar> > > &vecs,
115  const ArrayView<const Ptr<VectorBase<Scalar> > > &targ_vecs,
116  const Ptr<RTOpPack::ReductTarget> &reduct_obj,
117  const Ordinal global_offset
118  ) const;
119 
121 
122 private:
123 
124  // //////////////////////////////
125  // Private data members
126 
128  std::vector<Teuchos::RCP<VectorBase<Scalar> > > vecs_;
129 
130 };
131 
132 } // namespace Thyra
133 
134 #endif // THYRA_DEFAULT_CLUSTERED_SPMD_PRODUCT_VECTOR_DECL_HPP
void uninitialize(Teuchos::RCP< const DefaultClusteredSpmdProductVectorSpace< Scalar > > *productSpace=NULL, Teuchos::RCP< VectorBase< Scalar > > vecs[]=NULL)
Uninitialize.
Teuchos::RCP< const ProductVectorSpaceBase< Scalar > > productSpace() const
Base interface for product vectors.
void applyOpImpl(const RTOpPack::RTOpT< Scalar > &op, const ArrayView< const Ptr< const VectorBase< Scalar > > > &vecs, const ArrayView< const Ptr< VectorBase< Scalar > > > &targ_vecs, const Ptr< RTOpPack::ReductTarget > &reduct_obj, const Ordinal global_offset) const
Teuchos::RCP< const VectorBase< Scalar > > getVectorBlock(const int k) const
Teuchos::RCP< const MultiVectorBase< Scalar > > getMultiVectorBlock(const int k) const
Convenient node subclass for concrete VectorBase subclasses that relies on a default MultiVectorBase ...
Teuchos::Ordinal Ordinal
Type for the dimension of a vector space. `*.
void initialize(const Teuchos::RCP< const DefaultClusteredSpmdProductVectorSpace< Scalar > > &productSpace, const Teuchos::RCP< VectorBase< Scalar > > vecs[])
Initialize.
Teuchos::RCP< MultiVectorBase< Scalar > > getNonconstMultiVectorBlock(const int k)
Concrete implementation of a clustered Spmd-based product vector.
Abstract interface for finite-dimensional dense vectors.
Teuchos::RCP< const VectorSpaceBase< Scalar > > space() const
Teuchos::RCP< VectorBase< Scalar > > getNonconstVectorBlock(const int k)
DefaultClusteredSpmdProductVector()
Constructs to uninitialized (see postconditions for uninitialize()).