42 #ifndef THYRA_DEFAULT_CLUSTERED_SPMD_PRODUCT_VECTOR_SPACE_DECL_HPP
43 #define THYRA_DEFAULT_CLUSTERED_SPMD_PRODUCT_VECTOR_SPACE_DECL_HPP
45 #include "Thyra_VectorSpaceBase_decl.hpp"
46 #include "Thyra_ProductVectorSpaceBase.hpp"
47 #include "Thyra_VectorSpaceDefaultBase.hpp"
48 #include "Teuchos_Comm.hpp"
84 template<
class Scalar>
85 class DefaultClusteredSpmdProductVectorSpace
86 :
public ProductVectorSpaceBase<Scalar>
87 ,
protected VectorSpaceDefaultBase<Scalar>
103 ,
const RCP<
const VectorSpaceBase<Scalar> > vecSpaces[]
131 ,
const RCP<
const VectorSpaceBase<Scalar> > vecSpaces[]
166 bool isCompatible(
const VectorSpaceBase<Scalar>& vecSpc)
const;
170 Scalar
scalarProd(
const VectorBase<Scalar>& x,
const VectorBase<Scalar>& y )
const;
173 const MultiVectorBase<Scalar>& X,
const MultiVectorBase<Scalar>& Y,
182 RCP< const VectorSpaceBase<Scalar> >
clone()
const;
191 RCP<const VectorSpaceBase<Scalar> >
getBlock(
const int k)
const;
203 RCP<MultiVectorBase<Scalar> >
createMembers(
int numMembers)
const;
212 typedef std::vector<RCP<const VectorSpaceBase<Scalar> > > vecSpaces_t;
217 RCP<const Teuchos::Comm<Ordinal> > intraClusterComm_;
218 int clusterRootRank_;
219 RCP<const Teuchos::Comm<Ordinal> > interClusterComm_;
220 vecSpaces_t vecSpaces_;
237 template<
class Scalar>
238 RCP<const Teuchos::Comm<Ordinal> >
241 return intraClusterComm_;
245 template<
class Scalar>
248 return clusterRootRank_;
252 template<
class Scalar>
256 return interClusterComm_;
260 template<
class Scalar>
263 return clusterSubDim_;
267 template<
class Scalar>
270 return clusterOffset_;
277 #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