00001
00002
00003
00004
00005 #ifndef PLAYA_VECTORSPACEBASEDECL_HPP
00006 #define PLAYA_VECTORSPACEBASEDECL_HPP
00007
00008 #include "PlayaDefs.hpp"
00009 #include "Teuchos_RCP.hpp"
00010 #include "Teuchos_Describable.hpp"
00011
00012
00013
00014 namespace Playa
00015 {
00016 using Teuchos::RCP;
00017
00018 using Teuchos::Describable;
00019
00020 template <class Scalar> class VectorSpace;
00021 template <class Scalar> class VectorBase;
00022 template <class Scalar> class BlockIterator;
00023
00024 class MPIComm;
00025
00026
00027
00028
00029
00030 template <class Scalar>
00031 class VectorSpaceBase : public Describable
00032 {
00033 public:
00034
00035 virtual ~VectorSpaceBase() {;}
00036
00037
00038 virtual RCP<VectorBase<Scalar> > createMember(const VectorSpace<Scalar>& self) const = 0 ;
00039
00040
00041 virtual int dim() const = 0 ;
00042
00043
00044 virtual int numLocalElements() const = 0 ;
00045
00046
00047 virtual int baseGlobalNaturalIndex() const = 0 ;
00048
00049
00050 virtual bool isCompatible(const VectorSpaceBase<Scalar>* other) const = 0 ;
00051
00052
00053 virtual const MPIComm& comm() const = 0 ;
00054
00055
00056 virtual int numBlocks() const = 0 ;
00057
00058 protected:
00059
00060 int accumulateBaseGNI() const ;
00061 };
00062
00063
00064
00065 }
00066
00067 #endif