Thyra_DefaultClusteredSpmdProductVectorDecl.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 THYRA_DEFAULT_CLUSTERED_SPMD_PRODUCT_VECTOR_DECL_HPP
00030 #define THYRA_DEFAULT_CLUSTERED_SPMD_PRODUCT_VECTOR_DECL_HPP
00031 
00032 #include "Thyra_ProductVectorBase.hpp"
00033 
00034 namespace Thyra {
00035 
00037 template <class Scalar> class DefaultClusteredSpmdProductVectorSpace;
00038 
00048 template<class Scalar>
00049 class DefaultClusteredSpmdProductVector
00050   : virtual public ProductVectorBase<Scalar>
00051   , virtual protected VectorDefaultBase<Scalar>
00052 {
00053 public:
00054 
00056   using ProductVectorBase<Scalar>::applyOp;
00057 
00060 
00062   DefaultClusteredSpmdProductVector();
00063 
00065   DefaultClusteredSpmdProductVector(
00066     const Teuchos::RefCountPtr<const DefaultClusteredSpmdProductVectorSpace<Scalar> >  &productSpace
00067     ,const Teuchos::RefCountPtr<VectorBase<Scalar> >                                   vecs[]
00068     );
00069 
00074   void initialize(
00075     const Teuchos::RefCountPtr<const DefaultClusteredSpmdProductVectorSpace<Scalar> >  &productSpace
00076     ,const Teuchos::RefCountPtr<VectorBase<Scalar> >                                   vecs[]
00077     );
00078 
00083   void uninitialize(
00084     Teuchos::RefCountPtr<const DefaultClusteredSpmdProductVectorSpace<Scalar> >  *productSpace = NULL
00085     ,Teuchos::RefCountPtr<VectorBase<Scalar> >                                   vecs[]        = NULL
00086     );
00087 
00089 
00092 
00094   Teuchos::RefCountPtr<VectorBase<Scalar> > getNonconstVectorBlock(const int k); 
00096   Teuchos::RefCountPtr<const VectorBase<Scalar> > getVectorBlock(const int k) const;
00097 
00099 
00102 
00104   Teuchos::RefCountPtr<const ProductVectorSpaceBase<Scalar> > productSpace() const;
00106   bool blockIsConst(const int k) const; 
00108   Teuchos::RefCountPtr<MultiVectorBase<Scalar> > getNonconstMultiVectorBlock(const int k); 
00110   Teuchos::RefCountPtr<const MultiVectorBase<Scalar> > getMultiVectorBlock(const int k) const;
00111 
00113 
00116 
00118   Teuchos::RefCountPtr< const VectorSpaceBase<Scalar> > space() const;
00120   void applyOp(
00121     const RTOpPack::RTOpT<Scalar>    &op
00122     ,const int                       num_vecs
00123     ,const VectorBase<Scalar>*const  vecs[]
00124     ,const int                       num_targ_vecs
00125     ,VectorBase<Scalar>*const        targ_vecs[]
00126     ,RTOpPack::ReductTarget          *reduct_obj
00127     ,const Index                     first_ele
00128     ,const Index                     sub_dim
00129     ,const Index                     global_offset
00130     ) const;
00131 
00133 
00134 private:
00135 
00136   // //////////////////////////////
00137   // Private data members
00138 
00139   Teuchos::RefCountPtr<const DefaultClusteredSpmdProductVectorSpace<Scalar> >   productSpace_;
00140   std::vector<Teuchos::RefCountPtr<VectorBase<Scalar> > >                       vecs_;
00141 
00142 };
00143 
00144 } // namespace Thyra
00145 
00146 #endif // THYRA_DEFAULT_CLUSTERED_SPMD_PRODUCT_VECTOR_DECL_HPP

Generated on Thu Sep 18 12:32:31 2008 for Thyra Operator/Vector Support by doxygen 1.3.9.1