10 #ifndef THYRA_VECTOR_SPACE_DEFAULT_BASE_DEF_HPP
11 #define THYRA_VECTOR_SPACE_DEFAULT_BASE_DEF_HPP
13 #include "Thyra_VectorSpaceDefaultBase_decl.hpp"
14 #include "Thyra_VectorSpaceFactoryBase.hpp"
15 #include "Thyra_VectorSpaceBase.hpp"
16 #include "Thyra_VectorBase.hpp"
17 #include "Thyra_MultiVectorStdOps.hpp"
18 #include "Thyra_DefaultColumnwiseMultiVector.hpp"
27 template<
class Scalar>
28 class CopyVectorViewBack {
36 v_->acquireDetachedView(
Range1D(),&sv);
37 RTOpPack::assign_entries<Scalar>( Teuchos::outArg(raw_v_), sv );
38 v_->releaseDetachedView(&sv);
41 const VectorBase<Scalar> *v_;
46 template<
class Scalar>
47 class CopyMultiVectorViewBack {
50 :mv_(mv), raw_mv_(raw_mv)
52 ~CopyMultiVectorViewBack()
56 RTOpPack::assign_entries<Scalar>( Teuchos::outArg(raw_mv_), smv );
57 mv_->releaseDetachedView(&smv);
60 const MultiVectorBase<Scalar> *mv_;
68 template<
class Scalar>
75 this->smallVecSpcFcty()->createVecSpc(numMembers)));
80 template<
class Scalar>
92 v->acquireDetachedView(
Range1D(),&sv);
93 RTOpPack::assign_entries<Scalar>(
96 v->commitDetachedView(&sv);
98 Teuchos::set_extra_data(
100 "CopyVectorViewBack",
108 template<
class Scalar>
119 v->acquireDetachedView(
Range1D(),&sv);
120 RTOpPack::assign_entries<Scalar>(
123 v->commitDetachedView(&sv);
128 template<
class Scalar>
141 RTOpPack::assign_entries<Scalar>(
145 mv->commitDetachedView(&smv);
147 Teuchos::set_extra_data(
148 Teuchos::rcp(
new CopyMultiVectorViewBack<Scalar>(&*mv,raw_mv)),
149 "CopyMultiVectorViewBack",
157 template<
class Scalar>
171 RTOpPack::assign_entries<Scalar>(
174 mv->commitDetachedView(&smv);
182 #endif // THYRA_VECTOR_SPACE_DEFAULT_BASE_DEF_HPP
RCP< VectorBase< Scalar > > createMemberView(const RTOpPack::SubVectorView< Scalar > &raw_v) const
Ordinal numSubCols() const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Default subclass for MultiVectorBase implemented using columns of separate abstract vectors...
RCP< MultiVectorBase< Scalar > > createMembers(int numMembers) const
RCP< MultiVectorBase< Scalar > > createMembersView(const RTOpPack::SubMultiVectorView< Scalar > &raw_mv) const
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)