10 #ifndef THYRA_DEFAULT_CLUSTERED_SPMD_PRODUCT_VECTOR_SPACE_DECL_HPP
11 #define THYRA_DEFAULT_CLUSTERED_SPMD_PRODUCT_VECTOR_SPACE_DECL_HPP
13 #include "Thyra_VectorSpaceBase_decl.hpp"
14 #include "Thyra_ProductVectorSpaceBase.hpp"
15 #include "Thyra_VectorSpaceDefaultBase.hpp"
16 #include "Teuchos_Comm.hpp"
52 template<
class Scalar>
53 class DefaultClusteredSpmdProductVectorSpace
54 :
public ProductVectorSpaceBase<Scalar>
55 ,
protected VectorSpaceDefaultBase<Scalar>
71 ,
const RCP<
const VectorSpaceBase<Scalar> > vecSpaces[]
99 ,
const RCP<
const VectorSpaceBase<Scalar> > vecSpaces[]
134 bool isCompatible(
const VectorSpaceBase<Scalar>& vecSpc)
const;
138 Scalar
scalarProd(
const VectorBase<Scalar>& x,
const VectorBase<Scalar>& y )
const;
141 const MultiVectorBase<Scalar>& X,
const MultiVectorBase<Scalar>& Y,
150 RCP< const VectorSpaceBase<Scalar> >
clone()
const;
159 RCP<const VectorSpaceBase<Scalar> >
getBlock(
const int k)
const;
171 RCP<MultiVectorBase<Scalar> >
createMembers(
int numMembers)
const;
180 typedef std::vector<RCP<const VectorSpaceBase<Scalar> > > vecSpaces_t;
185 RCP<const Teuchos::Comm<Ordinal> > intraClusterComm_;
186 int clusterRootRank_;
187 RCP<const Teuchos::Comm<Ordinal> > interClusterComm_;
188 vecSpaces_t vecSpaces_;
205 template<
class Scalar>
206 RCP<const Teuchos::Comm<Ordinal> >
209 return intraClusterComm_;
213 template<
class Scalar>
216 return clusterRootRank_;
220 template<
class Scalar>
224 return interClusterComm_;
228 template<
class Scalar>
231 return clusterSubDim_;
235 template<
class Scalar>
238 return clusterOffset_;
245 #endif // THYRA_DEFAULT_CLUSTERED_SPMD_PRODUCT_VECTOR_SPACE_DECL_HPP
void scalarProdsImpl(const MultiVectorBase< Scalar > &X, const MultiVectorBase< Scalar > &Y, const ArrayView< Scalar > &scalarProds) const
std::string description() const
bool isCompatible(const VectorSpaceBase< Scalar > &vecSpc) const
Scalar scalarProd(const VectorBase< Scalar > &x, const VectorBase< Scalar > &y) const
RCP< const VectorSpaceBase< Scalar > > getBlock(const int k) const
RCP< const VectorSpaceFactoryBase< Scalar > > smallVecSpcFcty() const
EViewType
Determines if a view is a direct view of data or a detached copy of data.
RCP< const Teuchos::Comm< Ordinal > > intraClusterComm() const
Teuchos::Ordinal Ordinal
Type for the dimension of a vector space. `*.
RCP< MultiVectorBase< Scalar > > createMembers(int numMembers) const
RCP< VectorBase< Scalar > > createMember() const
DefaultClusteredSpmdProductVectorSpace()
int clusterSubDim() const
int clusterOffset() const
void initialize(const RCP< const Teuchos::Comm< Ordinal > > &intraClusterComm, const int clusterRootRank, const RCP< const Teuchos::Comm< Ordinal > > &interClusterComm, const int numBlocks, const RCP< const VectorSpaceBase< Scalar > > vecSpaces[])
Initalize.
EStrideType
Determine if data is unit stride or non-unit stride.
void scalarProds(const MultiVectorBase< Scalar > &X, const MultiVectorBase< Scalar > &Y, const ArrayView< Scalar > &scalarProds_out) const
Return the scalar product of each column in two multi-vectors in the vector space.
int clusterRootRank() const
RCP< const VectorSpaceBase< Scalar > > clone() const
bool hasInCoreView(const Range1D &rng, const EViewType viewType, const EStrideType strideType) const
RCP< const Teuchos::Comm< Ordinal > > interClusterComm() const