42 #ifndef THYRA_DEFAULT_MULTI_VECTOR_PRODUCT_VECTOR_SPACE_DECL_HPP
43 #define THYRA_DEFAULT_MULTI_VECTOR_PRODUCT_VECTOR_SPACE_DECL_HPP
45 #include "Thyra_ProductVectorSpaceBase.hpp"
46 #include "Thyra_DefaultProductVectorSpace.hpp"
47 #include "Thyra_VectorSpaceDefaultBase.hpp"
64 template<
class Scalar>
65 class DefaultMultiVectorProductVectorSpace
66 :
virtual public ProductVectorSpaceBase<Scalar>
67 ,
virtual protected VectorSpaceDefaultBase<Scalar>
97 const RCP<
const VectorSpaceBase<Scalar> > &space,
102 RCP<const DefaultProductVectorSpace<Scalar> >
126 RCP<
const VectorSpaceBase<Scalar> > *space = 0,
138 RCP<const VectorSpaceBase<Scalar> >
getBlock(
const int k)
const;
148 bool isCompatible(
const VectorSpaceBase<Scalar>& vecSpc )
const;
152 Scalar
scalarProd(
const VectorBase<Scalar>& x,
const VectorBase<Scalar>& y )
const;
157 const MultiVectorBase<Scalar>& X,
const MultiVectorBase<Scalar>& Y,
174 RCP< MultiVectorBase<Scalar> >
createMembers(
int numMembers)
const;
176 RCP< const VectorSpaceBase<Scalar> >
clone()
const;
207 RCP<const VectorSpaceBase<Scalar> > space_;
209 RCP<const DefaultProductVectorSpace<Scalar> > defaultProdVecSpc_;
214 void assertInitialized()
const;
223 template<
class Scalar>
225 RCP<DefaultMultiVectorProductVectorSpace<Scalar> >
236 template<
class Scalar>
245 multiVectorProductVectorSpace<Scalar>();
246 multiVecProdVecSpace->initialize(space,numColumns);
247 return multiVecProdVecSpace;
255 template<
class Scalar>
260 return defaultProdVecSpc_;
264 template<
class Scalar>
277 #endif // THYRA_DEFAULT_MULTI_VECTOR_PRODUCT_VECTOR_SPACE_DECL_HPP
void uninitialize(RCP< const VectorSpaceBase< Scalar > > *space=0, int *numColumns=0)
Uninitialize.
RCP< const VectorSpaceBase< Scalar > > clone() const
Clones the object as promised.
bool is_null(const boost::shared_ptr< T > &p)
RCP< DefaultMultiVectorProductVectorSpace< Scalar > > multiVectorProductVectorSpace(const RCP< const VectorSpaceBase< Scalar > > &space, const int numColumns)
Nonmember constructor function.
Scalar scalarProd(const VectorBase< Scalar > &x, const VectorBase< Scalar > &y) const
Returns the sum of the scalar products of the constituent vectors.
void initialize(const RCP< const VectorSpaceBase< Scalar > > &space, const int numColumns)
Initialize with a list of constituent vector spaces.
RCP< DefaultMultiVectorProductVectorSpace< Scalar > > multiVectorProductVectorSpace()
Nonmember constructor function.
Abstract interface for objects that represent a space for vectors.
EViewType
Determines if a view is a direct view of data or a detached copy of data.
bool isCompatible(const VectorSpaceBase< Scalar > &vecSpc) const
RCP< const VectorSpaceFactoryBase< Scalar > > smallVecSpcFcty() const
Returns getBlock(0)->smallVecSpcFcty().
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Teuchos::Ordinal Ordinal
Type for the dimension of a vector space. `*.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
Prints the details about the constituent vector space.
void scalarProdsImpl(const MultiVectorBase< Scalar > &X, const MultiVectorBase< Scalar > &Y, const ArrayView< Scalar > &scalarProds) const
Returns the sum of the scalar products of each of the columns of the constituent multi-vectors.
DefaultMultiVectorProductVectorSpace()
Construct to an uninitialized state.
RCP< const DefaultProductVectorSpace< Scalar > > getDefaultProductVectorSpace() const
bool hasInCoreView(const Range1D &rng, const EViewType viewType, const EStrideType strideType) const
Returns true if all of the constituent vector spaces return true.
Standard concrete implementation of a product vector space that creates product vectors fromed implic...
RCP< VectorBase< Scalar > > createMember() const
Returns a DefaultMultiVectorProductVector object.
RCP< const VectorSpaceBase< Scalar > > getBlock(const int k) const
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.
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
RCP< MultiVectorBase< Scalar > > createMembers(int numMembers) const
Returns a DefaultColumnwiseMultiVector object.
std::string description() const
Prints just the name DefaultMultiVectorProductVectorSpace along with the overall dimension and the nu...