00001 /* @HEADER@ */ 00002 // 00003 /* @HEADER@ */ 00004 00005 #ifndef PLAYA_SERIAL_VECTORSPACE_HPP 00006 #define PLAYA_SERIAL_VECTORSPACE_HPP 00007 00008 #include "PlayaDefs.hpp" 00009 #include "PlayaVectorSpaceBaseDecl.hpp" 00010 #include "PlayaVectorSpaceDecl.hpp" 00011 00012 namespace Playa 00013 { 00014 using namespace Teuchos; 00015 00016 /** 00017 * 00018 */ 00019 class SerialVectorSpace : public VectorSpaceBase<double> 00020 { 00021 public: 00022 00023 /** */ 00024 SerialVectorSpace(int dim); 00025 00026 00027 /** @name Overridden from Teuchos::Describable */ 00028 //@{ 00029 /** \brief . */ 00030 std::string description() const; 00031 //@} 00032 00033 /** */ 00034 RCP<VectorBase<double> > createMember(const VectorSpace<double>& self) const ; 00035 00036 /** */ 00037 int dim() const {return dim_;} 00038 00039 /** */ 00040 int numBlocks() const {return 1;} 00041 00042 /** */ 00043 int numLocalElements() const {return dim();} 00044 00045 /** */ 00046 int baseGlobalNaturalIndex() const {return 0;} 00047 00048 /** */ 00049 bool isCompatible(const VectorSpaceBase<double>* other) const ; 00050 00051 /** */ 00052 virtual const MPIComm& comm() const {return comm_;} 00053 00054 private: 00055 int dim_; 00056 MPIComm comm_; 00057 }; 00058 00059 } 00060 00061 #endif