42 #ifndef THYRA_DEFAULT_MULTI_VECTOR_PRODUCT_VECTOR_SPACE_DEF_HPP
43 #define THYRA_DEFAULT_MULTI_VECTOR_PRODUCT_VECTOR_SPACE_DEF_HPP
46 #include "Thyra_DefaultMultiVectorProductVectorSpace_decl.hpp"
47 #include "Thyra_DefaultMultiVectorProductVector.hpp"
56 template<
class Scalar>
62 template<
class Scalar>
73 numColumns_ = numColumns;
74 defaultProdVecSpc_ = productVectorSpace(space,numColumns);
78 template<
class Scalar>
91 template<
class Scalar>
98 template<
class Scalar>
110 template<
class Scalar>
114 return numColumns_ * space_->dim();
119 template<
class Scalar>
126 if ( multiVecProdVecSpc != 0 ) {
128 ( numColumns_ == multiVecProdVecSpc->numColumns_ )
130 ( space_->isCompatible(*multiVecProdVecSpc->space_) )
137 template<
class Scalar>
141 return multiVectorProductVector<Scalar>(
147 template<
class Scalar>
153 return defaultProdVecSpc_->scalarProd(x_in,y_in);
158 template<
class Scalar>
165 defaultProdVecSpc_->scalarProds(X_in, Y_in, scalarProds_out);
170 template<
class Scalar>
175 return defaultProdVecSpc_->hasInCoreView(rng_in,viewType,strideType);
178 template<
class Scalar>
183 return space_->smallVecSpcFcty();
184 return Teuchos::null;
187 template<
class Scalar>
197 template<
class Scalar>
206 mvpvs->numColumns_ = numColumns_;
207 mvpvs->space_ = space_;
208 mvpvs->defaultProdVecSpc_ = defaultProdVecSpc_;
216 template<
class Scalar>
219 std::ostringstream oss;
222 <<
"dim="<<this->dim()
223 <<
", numBlocks="<<numColumns_
229 template<
class Scalar>
243 *out << this->description() << std::endl;
250 << this->description() << std::endl;
254 <<
"Constituent vector space 'space' is the same for all spaces V[0],V[1],,,V[numBlocks-1]:\n";
256 *out <<
"space = " << Teuchos::describe(*space_,verbLevel);
269 #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...