PlayaSerialVectorSpace.hpp

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 
00019 class SerialVectorSpace : public VectorSpaceBase<double>
00020 {
00021 public:
00022 
00024   SerialVectorSpace(int dim);
00025     
00026 
00030   std::string description() const;
00032 
00034   RCP<VectorBase<double> > createMember(const VectorSpace<double>& self) const ;
00035   
00037   int dim() const {return dim_;}
00038 
00040   int numBlocks() const {return 1;}
00041   
00043   int numLocalElements() const {return dim();}
00044   
00046   int baseGlobalNaturalIndex() const {return 0;}
00047   
00049   bool isCompatible(const VectorSpaceBase<double>* other) const ;
00050 
00052   virtual const MPIComm& comm() const {return comm_;}
00053 
00054 private:
00055   int dim_;
00056   MPIComm comm_;
00057 };
00058   
00059 }
00060 
00061 #endif

doxygen