Thyra_DefaultColumnwiseMultiVectorDecl.hpp

00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 //    Thyra: Interfaces and Support for Abstract Numerical Algorithms
00005 //                 Copyright (2004) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
00028 
00029 #ifndef TSF_MULTI_VECTOR_COlS_DECL_HPP
00030 #define TSF_MULTI_VECTOR_COlS_DECL_HPP
00031 
00032 #include "Thyra_MultiVectorDefaultBaseDecl.hpp"
00033 #include "Thyra_VectorSpaceBase_decl.hpp"
00034 #include "Thyra_VectorBaseDecl.hpp"
00035 #include "Thyra_SingleRhsLinearOpBaseDecl.hpp"
00036 
00037 namespace Thyra {
00038 
00051 template<class Scalar>
00052 class DefaultColumnwiseMultiVector
00053   : virtual public MultiVectorDefaultBase<Scalar>
00054   , virtual protected SingleRhsLinearOpBase<Scalar>
00055 {
00056 public:
00057 
00058 #ifdef THYRA_INJECT_USING_DECLARATIONS
00059   using MultiVectorDefaultBase<Scalar>::apply;
00060   using SingleRhsLinearOpBase<Scalar>::apply;
00061 #endif
00062 
00065 
00073   DefaultColumnwiseMultiVector();
00074 
00076   DefaultColumnwiseMultiVector(
00077     const RCP<VectorBase<Scalar> > &col_vec
00078     );
00079 
00081   DefaultColumnwiseMultiVector(
00082     const RCP<const VectorSpaceBase<Scalar> > &range,
00083     const RCP<const VectorSpaceBase<Scalar> > &domain,
00084     const ArrayView<const RCP<VectorBase<Scalar> > > &col_vecs = Teuchos::null
00085     );
00086   
00103   void initialize(
00104     const RCP<VectorBase<Scalar> > &col_vec
00105     );
00106 
00139   void initialize(
00140     const RCP<const VectorSpaceBase<Scalar> > &range,
00141     const RCP<const VectorSpaceBase<Scalar> > &domain,
00142     const ArrayView<const RCP<VectorBase<Scalar> > > &col_vecs = Teuchos::null
00143     );
00144 
00146   void set_uninitialized();
00147 
00149 
00153   RCP<const VectorSpaceBase<Scalar> > range() const;
00155   RCP<const VectorSpaceBase<Scalar> > domain() const;
00157 
00161   RCP<VectorBase<Scalar> > nonconstColImpl(Index j);
00163   RCP<MultiVectorBase<Scalar> >
00164   nonconstContigSubViewImpl( const Range1D& col_rng );
00166 
00167 protected:
00168 
00171 
00176   bool opSupported(EOpTransp M_trans) const;
00177 
00194   void apply(
00195     const EOpTransp                M_trans
00196     ,const VectorBase<Scalar>    &x
00197     ,VectorBase<Scalar>          *y
00198     ,const Scalar                alpha
00199     ,const Scalar                beta
00200     ) const;
00201 
00203 
00204 private:
00205   
00206   RCP<const VectorSpaceBase<Scalar> > range_;
00207   RCP<const VectorSpaceBase<Scalar> > domain_;
00208   Array< RCP<VectorBase<Scalar> > > col_vecs_;
00209   
00210 }; // end class DefaultColumnwiseMultiVector
00211 
00212 } // end namespace Thyra
00213 
00214 #endif // TSF_MULTI_VECTOR_COlS_DECL_HPP

Generated on Wed May 12 21:26:53 2010 for Thyra Operator/Vector Support by  doxygen 1.4.7