00001 /* *********************************************************************** 00002 // 00003 // TSFExtended: Trilinos Solver Framework Extended 00004 // Copyright (2004) Sandia Corporation 00005 // 00006 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00007 // license for use of this work by or on behalf of the U.S. Government. 00008 // 00009 // This library is free software; you can redistribute it and/or modify 00010 // it under the terms of the GNU Lesser General Public License as 00011 // published by the Free Software Foundation; either version 2.1 of the 00012 // License, or (at your option) any later version. 00013 // 00014 // This library is distributed in the hope that it will be useful, but 00015 // WITHOUT ANY WARRANTY; without even the implied warranty of 00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 // Lesser General Public License for more details. 00018 // 00019 // You should have received a copy of the GNU Lesser General Public 00020 // License along with this library; if not, write to the Free Software 00021 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00022 // USA 00023 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 00024 // 00025 // **********************************************************************/ 00026 00027 #ifndef TSF_SERIAL_VECTORSPACE_HPP 00028 #define TSF_SERIAL_VECTORSPACE_HPP 00029 00030 #include "SundanceDefs.hpp" 00031 #include "Teuchos_RefCountPtr.hpp" 00032 #include "Thyra_DefaultSpmdVectorSpace.hpp" 00033 00034 namespace TSFExtended 00035 { 00036 using namespace Teuchos; 00037 using namespace Thyra; 00038 00039 00040 /** 00041 * 00042 */ 00043 class SerialVectorSpace 00044 : public Thyra::DefaultSpmdVectorSpace<double> 00045 { 00046 public: 00047 00048 /** */ 00049 SerialVectorSpace(int dim); 00050 00051 00052 /** @name Overridden form Teuchos::Describable */ 00053 //@{ 00054 /** \brief . */ 00055 std::string description() const; 00056 //@} 00057 00058 /** @name Public overridden from VectorSpace */ 00059 //@{ 00060 00061 /** */ 00062 bool isCompatible(const VectorSpaceBase<double>& other) const ; 00063 00064 /** */ 00065 RCP<const VectorSpaceFactoryBase<double> > 00066 smallVecSpcFcty() const ; 00067 00068 00069 /** \brief clone the space */ 00070 RCP< const VectorSpaceBase<double> > clone() const ; 00071 00072 //@} 00073 00074 00075 protected: 00076 /** @name Protected overridden from VectorSpace */ 00077 //@{ 00078 /** \brief create a vector */ 00079 RCP<VectorBase<double> > createMember() const; 00080 /** \brief create a multivector */ 00081 RCP<MultiVectorBase<double> > createMembers(int numVecs) const; 00082 //@} 00083 private: 00084 /** */ 00085 RCP<const VectorSpaceFactoryBase<double> > smallVecSpcFactory_; 00086 }; 00087 00088 } 00089 00090 #endif