Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Thyra_DefaultColumnwiseMultiVector_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_COLUMNWISE_MULTI_VECTOR_DECL_HPP
11 #define THYRA_DEFAULT_COLUMNWISE_MULTI_VECTOR_DECL_HPP
12 
13 #include "Thyra_MultiVectorDefaultBase_decl.hpp"
14 #include "Thyra_VectorSpaceBase_decl.hpp"
15 #include "Thyra_VectorBase.hpp"
16 
17 
18 namespace Thyra {
19 
20 
33 template<class Scalar>
35 {
36 public:
37 
40 
49 
52  const RCP<VectorBase<Scalar> > &col_vec
53  );
54 
57  const RCP<const VectorSpaceBase<Scalar> > &range,
58  const RCP<const VectorSpaceBase<Scalar> > &domain,
59  const ArrayView<const RCP<VectorBase<Scalar> > > &col_vecs = Teuchos::null
60  );
61 
78  void initialize(
79  const RCP<VectorBase<Scalar> > &col_vec
80  );
81 
118  void initialize(
119  const RCP<const VectorSpaceBase<Scalar> > &range,
120  const RCP<const VectorSpaceBase<Scalar> > &domain,
121  const ArrayView<const RCP<VectorBase<Scalar> > > &col_vecs = Teuchos::null
122  );
123 
125  void uninitialize();
126 
128 
136 
143  nonconstContigSubViewImpl( const Range1D& col_rng );
145 
146 protected:
147 
150 
152  virtual void assignImpl(Scalar alpha);
153 
155  virtual void assignMultiVecImpl(const MultiVectorBase<Scalar>& mv);
156 
158  virtual void scaleImpl(Scalar alpha);
159 
161  virtual void updateImpl(
162  Scalar alpha,
163  const MultiVectorBase<Scalar>& mv
164  );
165 
167  virtual void linearCombinationImpl(
168  const ArrayView<const Scalar>& alpha,
169  const ArrayView<const Ptr<const MultiVectorBase<Scalar> > >& mv,
170  const Scalar& beta
171  );
172 
174  virtual void dotsImpl(
175  const MultiVectorBase<Scalar>& mv,
176  const ArrayView<Scalar>& prods
177  ) const;
178 
180  virtual void norms1Impl(
182  ) const;
183 
185  virtual void norms2Impl(
187  ) const;
188 
190  virtual void normsInfImpl(
192  ) const;
193 
195 
198 
203  bool opSupportedImpl(EOpTransp M_trans) const;
204 
221  void applyImpl(
222  const EOpTransp M_trans,
223  const MultiVectorBase<Scalar> &X,
224  const Ptr<MultiVectorBase<Scalar> > &Y,
225  const Scalar alpha,
226  const Scalar beta
227  ) const;
228 
230 
231 private:
232 
235  Array<RCP<VectorBase<Scalar> > > col_vecs_;
236 
237 };
238 
239 
240 } // end namespace Thyra
241 
242 
243 #endif // THYRA_DEFAULT_COLUMNWISE_MULTI_VECTOR_DECL_HPP
virtual void assignMultiVecImpl(const MultiVectorBase< Scalar > &mv)
virtual void updateImpl(Scalar alpha, const MultiVectorBase< Scalar > &mv)
RCP< const VectorSpaceBase< Scalar > > range() const
EOpTransp
Enumeration for determining how a linear operator is applied. `*.
virtual void norms1Impl(const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const
void applyImpl(const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const
This function is implemented in terms of the multi-vector applyOp() function.
virtual void norms2Impl(const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const
Abstract interface for objects that represent a space for vectors.
virtual void linearCombinationImpl(const ArrayView< const Scalar > &alpha, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &mv, const Scalar &beta)
Node subclass that uses a default MultiVectorBase implementation to provide default implementations f...
Teuchos::Ordinal Ordinal
Type for the dimension of a vector space. `*.
Interface for a collection of column vectors called a multi-vector.
RCP< VectorBase< Scalar > > nonconstColImpl(Ordinal j)
Abstract interface for finite-dimensional dense vectors.
void initialize(const RCP< VectorBase< Scalar > > &col_vec)
Initialize given a single vector object.
Default subclass for MultiVectorBase implemented using columns of separate abstract vectors...
void norms(const MultiVectorBase< Scalar > &V, const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms)
Column-wise multi-vector natural norm.
virtual void normsInfImpl(const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const
RCP< MultiVectorBase< Scalar > > nonconstContigSubViewImpl(const Range1D &col_rng)
bool opSupportedImpl(EOpTransp M_trans) const
For complex Scalar types returns true for NOTRANS and CONJTRANS and for real types returns true for a...
RCP< const VectorSpaceBase< Scalar > > domain() const
virtual void dotsImpl(const MultiVectorBase< Scalar > &mv, const ArrayView< Scalar > &prods) const