10 #ifndef THYRA_DEFAULT_MULTI_VECTOR_PRODUCT_VECTOR_SPACE_DEF_HPP
11 #define THYRA_DEFAULT_MULTI_VECTOR_PRODUCT_VECTOR_SPACE_DEF_HPP
14 #include "Thyra_DefaultMultiVectorProductVectorSpace_decl.hpp"
15 #include "Thyra_DefaultMultiVectorProductVector.hpp"
24 template<
class Scalar>
30 template<
class Scalar>
41 numColumns_ = numColumns;
42 defaultProdVecSpc_ = productVectorSpace(space,numColumns);
46 template<
class Scalar>
59 template<
class Scalar>
66 template<
class Scalar>
78 template<
class Scalar>
82 return numColumns_ * space_->dim();
87 template<
class Scalar>
94 if ( multiVecProdVecSpc != 0 ) {
96 ( numColumns_ == multiVecProdVecSpc->numColumns_ )
98 ( space_->isCompatible(*multiVecProdVecSpc->space_) )
105 template<
class Scalar>
109 return multiVectorProductVector<Scalar>(
115 template<
class Scalar>
121 return defaultProdVecSpc_->scalarProd(x_in,y_in);
126 template<
class Scalar>
133 defaultProdVecSpc_->scalarProds(X_in, Y_in, scalarProds_out);
138 template<
class Scalar>
143 return defaultProdVecSpc_->hasInCoreView(rng_in,viewType,strideType);
146 template<
class Scalar>
151 return space_->smallVecSpcFcty();
152 return Teuchos::null;
155 template<
class Scalar>
165 template<
class Scalar>
174 mvpvs->numColumns_ = numColumns_;
175 mvpvs->space_ = space_;
176 mvpvs->defaultProdVecSpc_ = defaultProdVecSpc_;
184 template<
class Scalar>
187 std::ostringstream oss;
190 <<
"dim="<<this->dim()
191 <<
", numBlocks="<<numColumns_
197 template<
class Scalar>
211 *out << this->description() << std::endl;
218 << this->description() << std::endl;
222 <<
"Constituent vector space 'space' is the same for all spaces V[0],V[1],,,V[numBlocks-1]:\n";
224 *out <<
"space = " << Teuchos::describe(*space_,verbLevel);
237 #endif // THYRA_DEFAULT_MULTI_VECTOR_PRODUCT_VECTOR_SPACE_DEF_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)
basic_OSTab< char > OSTab
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.
basic_FancyOStream< char > FancyOStream
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. `*.
Interface for a collection of column vectors called a multi-vector.
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.
bool hasInCoreView(const Range1D &rng, const EViewType viewType, const EStrideType strideType) const
Returns true if all of the constituent vector spaces return true.
virtual std::string description() const
Abstract interface for finite-dimensional dense vectors.
Standard concrete implementation of a product vector space that creates product vectors fromed implic...
RCP< MultiVectorBase< Scalar > > createMembers(int numMembers) const
RCP< VectorBase< Scalar > > createMember() const
Returns a DefaultMultiVectorProductVector object.
bool nonnull(const boost::shared_ptr< T > &p)
RCP< const VectorSpaceBase< Scalar > > getBlock(const int k) const
EStrideType
Determine if data is unit stride or non-unit stride.
#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...