Thyra_SerialMultiVectorStdDecl.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_SERIAL_MULTI_VECTOR_STD_DECL_HPP
00030 #define THYRA_SERIAL_MULTI_VECTOR_STD_DECL_HPP
00031 
00032 #include "Thyra_SerialMultiVectorBaseDecl.hpp"
00033 
00034 namespace Thyra {
00035 
00050 template<class Scalar>
00051 class SerialMultiVectorStd : virtual public SerialMultiVectorBase<Scalar> {
00052 public:
00053 
00055   using SerialMultiVectorBase<Scalar>::subView;
00057   using SerialMultiVectorBase<Scalar>::col;
00058 
00061 
00063   SerialMultiVectorStd();
00064 
00066   SerialMultiVectorStd(
00067     const Teuchos::RefCountPtr<const ScalarProdVectorSpaceBase<Scalar> >   &range
00068     ,const Teuchos::RefCountPtr<const ScalarProdVectorSpaceBase<Scalar> >  &domain
00069     );
00070 
00072   SerialMultiVectorStd(
00073     const Teuchos::RefCountPtr<const ScalarProdVectorSpaceBase<Scalar> >   &range
00074     ,const Teuchos::RefCountPtr<const ScalarProdVectorSpaceBase<Scalar> >  &domain
00075     ,const Teuchos::RefCountPtr<Scalar>                                    &values
00076     ,const Index                                                           leadingDim
00077     );
00078 
00094   void initialize(
00095     const Teuchos::RefCountPtr<const ScalarProdVectorSpaceBase<Scalar> >   &range
00096     ,const Teuchos::RefCountPtr<const ScalarProdVectorSpaceBase<Scalar> >  &domain
00097     );
00098 
00126   void initialize(
00127     const Teuchos::RefCountPtr<const ScalarProdVectorSpaceBase<Scalar> >   &range
00128     ,const Teuchos::RefCountPtr<const ScalarProdVectorSpaceBase<Scalar> >  &domain
00129     ,const Teuchos::RefCountPtr<Scalar>                                    &values
00130     ,const Index                                                           leadingDim
00131     );
00132 
00140   void uninitialize(
00141     Teuchos::RefCountPtr<const ScalarProdVectorSpaceBase<Scalar> >         *range         = NULL
00142     ,Teuchos::RefCountPtr<const ScalarProdVectorSpaceBase<Scalar> >        *domain        = NULL
00143     ,Teuchos::RefCountPtr<Scalar>                                          *values        = NULL
00144     ,Index                                                                 *leadingDim    = NULL
00145     );
00146 
00148 
00152   std::string description() const;
00154 
00158   Teuchos::RefCountPtr< const ScalarProdVectorSpaceBase<Scalar> > rangeScalarProdVecSpc() const;
00160   Teuchos::RefCountPtr< const ScalarProdVectorSpaceBase<Scalar> > domainScalarProdVecSpc() const;
00162 
00166   Teuchos::RefCountPtr<VectorBase<Scalar> > col(Index j);
00168   Teuchos::RefCountPtr<MultiVectorBase<Scalar> > subView( const Range1D& col_rng );
00170 
00173 
00175   void getData( const Scalar **values, Index *leadingDim ) const;
00177   void freeData( const Scalar *values ) const;
00179   void getData( Scalar **values, Index *leadingDim );
00181   void commitData( Scalar *values );
00183   
00184 private:
00185   
00186   // ///////////////////////////////////////
00187   // Private data members
00188 
00189   Teuchos::RefCountPtr<const ScalarProdVectorSpaceBase<Scalar> >     range_;
00190   Teuchos::RefCountPtr<const ScalarProdVectorSpaceBase<Scalar> >     domain_;
00191   Teuchos::RefCountPtr<Scalar>                                       values_;
00192   Index                                                              leadingDim_;
00193   Index                                                              numRows_; // Cached
00194   Index                                                              numCols_; // Cached
00195   
00196 }; // end class SerialMultiVectorStd
00197 
00198 } // end namespace Thyra
00199 
00200 #endif // THYRA_SERIAL_MULTI_VECTOR_STD_DECL_HPP

Generated on Thu Sep 18 12:39:52 2008 for Thyra ANA Operator/VectorBase Interfaces and Related Software by doxygen 1.3.9.1