PlayaBlockVectorBaseDecl.hpp

00001 /* @HEADER@ */
00002 //   
00003  /* @HEADER@ */
00004 
00005 #ifndef PLAYA_BLOCKVECTORBASEDECL_HPP
00006 #define PLAYA_BLOCKVECTORBASEDECL_HPP
00007 
00008 #include "PlayaDefs.hpp"
00009 #include "PlayaVectorBaseDecl.hpp"
00010 #include "Teuchos_Describable.hpp"
00011 
00012 namespace Playa
00013 {
00014 
00015 template <class Scalar> class Vector;
00016 using Teuchos::Describable;
00017 
00021 template <class Scalar>
00022 class BlockVectorBase : public VectorBase<Scalar>,
00023                         public Describable
00024 {
00025 public:
00027   BlockVectorBase() : currentBlock_(0) {}
00028 
00030   virtual ~BlockVectorBase(){}
00031 
00033   virtual void setBlock(int b, const Vector<Scalar>& block) = 0 ;
00034 
00036   virtual const Vector<Scalar>& getBlock(int b) const = 0 ;
00037 
00039   virtual Vector<Scalar> getNonConstBlock(int b) = 0 ;
00040 
00042   virtual ConstDataChunk<Scalar> nextConstChunk() const ;
00043 
00045   virtual NonConstDataChunk<Scalar> nextChunk() ;
00046 
00048   virtual bool hasMoreChunks() const ;
00049 
00051   virtual void rewind() const ;
00052 
00054   virtual std::string description() const ;
00055 
00057   virtual void update(const Scalar& alpha, const VectorBase<Scalar>* other,
00058     const Scalar& gamma);
00059 
00061   virtual void update(
00062     const Scalar& alpha, const VectorBase<Scalar>* x,
00063     const Scalar& beta, const VectorBase<Scalar>* y,
00064     const Scalar& gamma) ;
00065 
00067   virtual void update(
00068     const Scalar& alpha, const VectorBase<Scalar>* x,
00069     const Scalar& beta, const VectorBase<Scalar>* y,
00070     const Scalar& gamma, const VectorBase<Scalar>* z,
00071     const Scalar& delta) ;
00072 
00074   virtual Scalar dot(const VectorBase<Scalar>* other) const ;
00075 
00077   virtual Scalar norm2() const ;
00078   
00079 private:
00080   mutable int currentBlock_;
00081 };
00082 
00083 
00084 
00085 
00086 
00087 
00088 
00099 }
00100 
00101 #endif

doxygen