Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef PLAYA_BLOCKVECTORBASEDECL_HPP
00043 #define PLAYA_BLOCKVECTORBASEDECL_HPP
00044
00045 #include "PlayaDefs.hpp"
00046 #include "PlayaVectorBaseDecl.hpp"
00047 #include "Teuchos_Describable.hpp"
00048
00049 namespace Playa
00050 {
00051
00052 template <class Scalar> class Vector;
00053 using Teuchos::Describable;
00054
00055
00056
00057
00058 template <class Scalar>
00059 class BlockVectorBase : public VectorBase<Scalar>,
00060 public Describable
00061 {
00062 public:
00063
00064 BlockVectorBase() : currentBlock_(0) {}
00065
00066
00067 virtual ~BlockVectorBase(){}
00068
00069
00070 virtual void setBlock(int b, const Vector<Scalar>& block) = 0 ;
00071
00072
00073 virtual const Vector<Scalar>& getBlock(int b) const = 0 ;
00074
00075
00076 virtual Vector<Scalar> getNonConstBlock(int b) = 0 ;
00077
00078
00079 virtual ConstDataChunk<Scalar> nextConstChunk() const ;
00080
00081
00082 virtual NonConstDataChunk<Scalar> nextChunk() ;
00083
00084
00085 virtual bool hasMoreChunks() const ;
00086
00087
00088 virtual void rewind() const ;
00089
00090
00091 virtual std::string description() const ;
00092
00093
00094 virtual void update(const Scalar& alpha, const VectorBase<Scalar>* other,
00095 const Scalar& gamma);
00096
00097
00098 virtual void update(
00099 const Scalar& alpha, const VectorBase<Scalar>* x,
00100 const Scalar& beta, const VectorBase<Scalar>* y,
00101 const Scalar& gamma) ;
00102
00103
00104 virtual void update(
00105 const Scalar& alpha, const VectorBase<Scalar>* x,
00106 const Scalar& beta, const VectorBase<Scalar>* y,
00107 const Scalar& gamma, const VectorBase<Scalar>* z,
00108 const Scalar& delta) ;
00109
00110
00111 virtual Scalar dot(const VectorBase<Scalar>* other) const ;
00112
00113
00114 virtual Scalar norm2() const ;
00115
00116 private:
00117 mutable int currentBlock_;
00118 };
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136 }
00137
00138 #endif