Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Thyra_SpmdMultiVectorBase.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_SPMD_MULTI_VECTOR_BASE_DECL_HPP
11 #define THYRA_SPMD_MULTI_VECTOR_BASE_DECL_HPP
12 
13 
14 #include "Thyra_MultiVectorBase.hpp"
15 
16 
17 namespace Thyra {
18 
19 
20 template<class Scalar> class SpmdVectorSpaceBase;
21 
22 
34 template<class Scalar>
35 class SpmdMultiVectorBase : virtual public MultiVectorBase<Scalar>
36 {
37 public:
38 
41 
46  { return spmdSpaceImpl(); }
47 
52 
56  { return getLocalSubMultiVectorImpl(); }
57 
79  const Ptr<ArrayRCP<Scalar> > &localValues, const Ptr<Ordinal> &leadingDim
80  )
81  { getNonconstLocalMultiVectorDataImpl(localValues, leadingDim); }
82 
104  const Ptr<ArrayRCP<const Scalar> > &localValues, const Ptr<Ordinal> &leadingDim
105  ) const
106  { getLocalMultiVectorDataImpl(localValues, leadingDim); }
107 
109 
110 protected:
111 
114 
117 
121 
124  getLocalSubMultiVectorImpl() const = 0;
125 
128  const Ptr<ArrayRCP<Scalar> > &localValues, const Ptr<Ordinal> &leadingDim
129  ) = 0;
130 
132  virtual void getLocalMultiVectorDataImpl(
133  const Ptr<ArrayRCP<const Scalar> > &localValues, const Ptr<Ordinal> &leadingDim
134  ) const = 0;
135 
137 
138 }; // end class SpmdMultiVectorBase
139 
140 
141 } // end namespace Thyra
142 
143 
144 #endif // THYRA_SPMD_MULTI_VECTOR_BASE_DECL_HPP
RTOpPack::ConstSubMultiVectorView< Scalar > getLocalSubMultiVector() const
Get a const generalized view of local multi-vector data.
void getLocalData(const Ptr< ArrayRCP< const Scalar > > &localValues, const Ptr< Ordinal > &leadingDim) const
Returns a const pointer to a Fortran-style view of the local multi-vector data.
void getNonconstLocalData(const Ptr< ArrayRCP< Scalar > > &localValues, const Ptr< Ordinal > &leadingDim)
Returns a non-const pointer to a Fortran-style view of the local multi-vector data.
Base interface class for SPMD multi-vectors.
virtual void getNonconstLocalMultiVectorDataImpl(const Ptr< ArrayRCP< Scalar > > &localValues, const Ptr< Ordinal > &leadingDim)=0
Virtual implementation for getNonconstLocalData().
virtual RTOpPack::SubMultiVectorView< Scalar > getNonconstLocalSubMultiVectorImpl()=0
Virtual implementation for getNonconstLocalSubMultiVector().
Interface for a collection of column vectors called a multi-vector.
RTOpPack::SubMultiVectorView< Scalar > getNonconstLocalSubMultiVector()
Get a non-const generalized view of local multi-vector data.
virtual RCP< const SpmdVectorSpaceBase< Scalar > > spmdSpaceImpl() const =0
Virtual implementation for spmdSpace().
virtual RTOpPack::ConstSubMultiVectorView< Scalar > getLocalSubMultiVectorImpl() const =0
Virtual implementation for getLocalSubMultiVector().
RCP< const SpmdVectorSpaceBase< Scalar > > spmdSpace() const
Returns the SPMD vector space object for the range of *this multi-vector.
Base abstract VectorSpaceBase class for all SPMD-based vector spaces.
virtual void getLocalMultiVectorDataImpl(const Ptr< ArrayRCP< const Scalar > > &localValues, const Ptr< Ordinal > &leadingDim) const =0
Virtual implementation for getLocalData().