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 #ifndef THYRA_DEFAULT_CLUSTERED_SPMD_PRODUCT_VECTOR_DECL_HPP
00030 #define THYRA_DEFAULT_CLUSTERED_SPMD_PRODUCT_VECTOR_DECL_HPP
00031
00032 #include "Thyra_ProductVectorBase.hpp"
00033 #include "Thyra_VectorDefaultBase.hpp"
00034
00035 namespace Thyra {
00036
00038 template <class Scalar> class DefaultClusteredSpmdProductVectorSpace;
00039
00049 template<class Scalar>
00050 class DefaultClusteredSpmdProductVector
00051 : virtual public ProductVectorBase<Scalar>
00052 , virtual protected VectorDefaultBase<Scalar>
00053 {
00054 public:
00055
00057 using ProductVectorBase<Scalar>::applyOp;
00058
00061
00063 DefaultClusteredSpmdProductVector();
00064
00066 DefaultClusteredSpmdProductVector(
00067 const Teuchos::RCP<const DefaultClusteredSpmdProductVectorSpace<Scalar> > &productSpace
00068 ,const Teuchos::RCP<VectorBase<Scalar> > vecs[]
00069 );
00070
00075 void initialize(
00076 const Teuchos::RCP<const DefaultClusteredSpmdProductVectorSpace<Scalar> > &productSpace
00077 ,const Teuchos::RCP<VectorBase<Scalar> > vecs[]
00078 );
00079
00084 void uninitialize(
00085 Teuchos::RCP<const DefaultClusteredSpmdProductVectorSpace<Scalar> > *productSpace = NULL
00086 ,Teuchos::RCP<VectorBase<Scalar> > vecs[] = NULL
00087 );
00088
00090
00093
00095 Teuchos::RCP<VectorBase<Scalar> > getNonconstVectorBlock(const int k);
00097 Teuchos::RCP<const VectorBase<Scalar> > getVectorBlock(const int k) const;
00098
00100
00103
00105 Teuchos::RCP<const ProductVectorSpaceBase<Scalar> > productSpace() const;
00107 bool blockIsConst(const int k) const;
00109 Teuchos::RCP<MultiVectorBase<Scalar> > getNonconstMultiVectorBlock(const int k);
00111 Teuchos::RCP<const MultiVectorBase<Scalar> > getMultiVectorBlock(const int k) const;
00112
00114
00117
00119 Teuchos::RCP< const VectorSpaceBase<Scalar> > space() const;
00121 void applyOp(
00122 const RTOpPack::RTOpT<Scalar> &op
00123 ,const int num_vecs
00124 ,const VectorBase<Scalar>*const vecs[]
00125 ,const int num_targ_vecs
00126 ,VectorBase<Scalar>*const targ_vecs[]
00127 ,RTOpPack::ReductTarget *reduct_obj
00128 ,const Index first_ele
00129 ,const Index sub_dim
00130 ,const Index global_offset
00131 ) const;
00132
00134
00135 private:
00136
00137
00138
00139
00140 Teuchos::RCP<const DefaultClusteredSpmdProductVectorSpace<Scalar> > productSpace_;
00141 std::vector<Teuchos::RCP<VectorBase<Scalar> > > vecs_;
00142
00143 };
00144
00145 }
00146
00147 #endif // THYRA_DEFAULT_CLUSTERED_SPMD_PRODUCT_VECTOR_DECL_HPP