Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Thyra_SpmdMultiVectorDefaultBase_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_SPMD_MULTI_VECTOR_DEFAULT_BASE_DECL_HPP
11 #define THYRA_SPMD_MULTI_VECTOR_DEFAULT_BASE_DECL_HPP
12 
13 #include "Thyra_SpmdMultiVectorBase.hpp"
14 #include "Thyra_MultiVectorAdapterBase_decl.hpp"
15 #include "Teuchos_BLAS.hpp"
16 
17 
18 namespace Thyra {
19 
20 
65 template<class Scalar>
67  : virtual public SpmdMultiVectorBase<Scalar>,
68  virtual public MultiVectorAdapterBase<Scalar>
69 {
70 public:
71 
74 
77 
79 
82 
85 
87 
88 protected:
89 
92 
95 
98 
100 
105  const RTOpPack::RTOpT<Scalar> &primary_op,
106  const ArrayView<const Ptr<const MultiVectorBase<Scalar> > > &multi_vecs,
107  const ArrayView<const Ptr<MultiVectorBase<Scalar> > > &targ_multi_vecs,
108  const ArrayView<const Ptr<RTOpPack::ReductTarget> > &reduct_objs,
109  const Ordinal primary_global_offset
110  ) const;
113  const Range1D &rowRng,
114  const Range1D &colRng
116  ) const;
120  ) const;
123  const Range1D &rowRng,
124  const Range1D &colRng,
126  );
130  );
132 
135 
141  void euclideanApply(
142  const EOpTransp M_trans,
143  const MultiVectorBase<Scalar> &X,
144  const Ptr<MultiVectorBase<Scalar> > &Y,
145  const Scalar alpha,
146  const Scalar beta
147  ) const;
148 
150 
153 
162  virtual void updateSpmdSpace();
163 
168  Range1D validateRowRange( const Range1D& rowRng ) const;
169 
174  Range1D validateColRange( const Range1D& rowCol ) const;
175 
177 
178 private:
179 
180  // ///////////////////////////////////////
181  // Private data members
182 
183  mutable bool in_applyOp_;
184 
185  mutable Teuchos::BLAS<int,Scalar> blas_;
186 
187  // cached
188  Ordinal globalDim_;
189  Ordinal localOffset_;
190  Ordinal localSubDim_;
191  Ordinal numCols_;
192 
193 }; // end class SpmdMultiVectorDefaultBase
194 
195 
196 } // end namespace Thyra
197 
198 
199 #endif // THYRA_SPMD_MULTI_VECTOR_DEFAULT_BASE_DECL_HPP
EOpTransp
Enumeration for determining how a linear operator is applied. `*.
RTOpPack::SubMultiVectorView< Scalar > getNonconstLocalSubMultiVectorImpl()
void euclideanApply(const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const
Uses GEMM() and Teuchos::reduceAll() to implement.
Base interface class for SPMD multi-vectors.
void mvMultiReductApplyOpImpl(const RTOpPack::RTOpT< Scalar > &primary_op, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &multi_vecs, const ArrayView< const Ptr< MultiVectorBase< Scalar > > > &targ_multi_vecs, const ArrayView< const Ptr< RTOpPack::ReductTarget > > &reduct_objs, const Ordinal primary_global_offset) const
Base node implementation class for SPMD multi-vectors.
RTOpPack::ConstSubMultiVectorView< Scalar > getLocalSubMultiVectorImpl() const
RCP< const ScalarProdVectorSpaceBase< Scalar > > rangeScalarProdVecSpc() const
Returns spmdSpace.
Teuchos::Ordinal Ordinal
Type for the dimension of a vector space. `*.
Interface for a collection of column vectors called a multi-vector.
void acquireDetachedMultiVectorViewImpl(const Range1D &rowRng, const Range1D &colRng, RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const
void commitNonconstDetachedMultiVectorViewImpl(RTOpPack::SubMultiVectorView< Scalar > *sub_mv)
void releaseDetachedMultiVectorViewImpl(RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const
Node subclass for MultiVectorBase subclasses that allows the insertion of an application defined scal...
Range1D validateColRange(const Range1D &rowCol) const
Validate and resize the column range.
void acquireNonconstDetachedMultiVectorViewImpl(const Range1D &rowRng, const Range1D &colRng, RTOpPack::SubMultiVectorView< Scalar > *sub_mv)
virtual void updateSpmdSpace()
Subclasses should call whenever the structure of the VectorSpaceBase changes.
Range1D validateRowRange(const Range1D &rowRng) const
Validate and resize the row range.