42 #ifndef THYRA_VECTOR_SPACE_DEFAULT_BASE_DEF_HPP
43 #define THYRA_VECTOR_SPACE_DEFAULT_BASE_DEF_HPP
45 #include "Thyra_VectorSpaceDefaultBase_decl.hpp"
46 #include "Thyra_VectorSpaceFactoryBase.hpp"
47 #include "Thyra_VectorSpaceBase.hpp"
48 #include "Thyra_VectorBase.hpp"
49 #include "Thyra_MultiVectorStdOps.hpp"
50 #include "Thyra_DefaultColumnwiseMultiVector.hpp"
59 template<
class Scalar>
60 class CopyVectorViewBack {
68 v_->acquireDetachedView(
Range1D(),&sv);
69 RTOpPack::assign_entries<Scalar>( Teuchos::outArg(raw_v_), sv );
70 v_->releaseDetachedView(&sv);
73 const VectorBase<Scalar> *v_;
78 template<
class Scalar>
79 class CopyMultiVectorViewBack {
82 :mv_(mv), raw_mv_(raw_mv)
84 ~CopyMultiVectorViewBack()
88 RTOpPack::assign_entries<Scalar>( Teuchos::outArg(raw_mv_), smv );
89 mv_->releaseDetachedView(&smv);
92 const MultiVectorBase<Scalar> *mv_;
100 template<
class Scalar>
107 this->smallVecSpcFcty()->createVecSpc(numMembers)));
112 template<
class Scalar>
124 v->acquireDetachedView(
Range1D(),&sv);
125 RTOpPack::assign_entries<Scalar>(
128 v->commitDetachedView(&sv);
130 Teuchos::set_extra_data(
131 Teuchos::rcp(
new CopyVectorViewBack<Scalar>(&*v,raw_v)),
132 "CopyVectorViewBack",
140 template<
class Scalar>
151 v->acquireDetachedView(
Range1D(),&sv);
152 RTOpPack::assign_entries<Scalar>(
155 v->commitDetachedView(&sv);
160 template<
class Scalar>
173 RTOpPack::assign_entries<Scalar>(
177 mv->commitDetachedView(&smv);
179 Teuchos::set_extra_data(
180 Teuchos::rcp(
new CopyMultiVectorViewBack<Scalar>(&*mv,raw_mv)),
181 "CopyMultiVectorViewBack",
189 template<
class Scalar>
203 RTOpPack::assign_entries<Scalar>(
206 mv->commitDetachedView(&smv);
214 #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)