10 #ifndef THYRA_DEFAULT_MULTI_VECTOR_PRODUCT_VECTOR_SPACE_DECL_HPP
11 #define THYRA_DEFAULT_MULTI_VECTOR_PRODUCT_VECTOR_SPACE_DECL_HPP
13 #include "Thyra_ProductVectorSpaceBase.hpp"
14 #include "Thyra_DefaultProductVectorSpace.hpp"
15 #include "Thyra_VectorSpaceDefaultBase.hpp"
32 template<
class Scalar>
33 class DefaultMultiVectorProductVectorSpace
34 :
virtual public ProductVectorSpaceBase<Scalar>
35 ,
virtual protected VectorSpaceDefaultBase<Scalar>
65 const RCP<
const VectorSpaceBase<Scalar> > &space,
70 RCP<const DefaultProductVectorSpace<Scalar> >
94 RCP<
const VectorSpaceBase<Scalar> > *space = 0,
106 RCP<const VectorSpaceBase<Scalar> >
getBlock(
const int k)
const;
116 bool isCompatible(
const VectorSpaceBase<Scalar>& vecSpc )
const;
120 Scalar
scalarProd(
const VectorBase<Scalar>& x,
const VectorBase<Scalar>& y )
const;
125 const MultiVectorBase<Scalar>& X,
const MultiVectorBase<Scalar>& Y,
142 RCP< MultiVectorBase<Scalar> >
createMembers(
int numMembers)
const;
144 RCP< const VectorSpaceBase<Scalar> >
clone()
const;
175 RCP<const VectorSpaceBase<Scalar> > space_;
177 RCP<const DefaultProductVectorSpace<Scalar> > defaultProdVecSpc_;
182 void assertInitialized()
const;
191 template<
class Scalar>
193 RCP<DefaultMultiVectorProductVectorSpace<Scalar> >
204 template<
class Scalar>
213 multiVectorProductVectorSpace<Scalar>();
214 multiVecProdVecSpace->initialize(space,numColumns);
215 return multiVecProdVecSpace;
223 template<
class Scalar>
228 return defaultProdVecSpc_;
232 template<
class Scalar>
245 #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...