42 #include "AbstractLinAlgPack_VectorMutableSubView.hpp"
43 #include "Teuchos_Assert.hpp"
44 #include "Teuchos_Workspace.hpp"
45 #include "Teuchos_dyn_cast.hpp"
47 namespace AbstractLinAlgPack {
56 namespace rcp = MemMngPack;
65 full_vec_ = Teuchos::null;
81 full_vec_->set_ele(
space_impl().rng().lbound() + i - 1, val );
88 namespace rcp = MemMngPack;
89 const size_type this_dim = this->
dim();
90 const Range1D rng = RangePack::full_range( rng_in, 1, this_dim );
102 this_offset + rng.
lbound()
103 ,this_offset + rng.
ubound() )
112 const index_type this_dim = this->
dim();
113 const Range1D rng = RangePack::full_range(rng_in,1,this_dim);
116 full_vec_->get_sub_vector( rng + this_offset, sub_vec );
117 sub_vec->setGlobalOffset( sub_vec->globalOffset() - this_offset );
126 sub_vec->setGlobalOffset( sub_vec->globalOffset() + this_offset );
127 full_vec_->commit_sub_vector( sub_vec );
134 RTOpPack::SparseSubVector sub_vec = sub_vec_in;
135 sub_vec.setGlobalOffset( sub_vec.globalOffset() + this_offset );
136 full_vec_->set_sub_vector( sub_vec );
void set_sub_vector(const RTOpPack::SparseSubVector &sub_vec)
const VectorSpaceSubSpace & space_impl() const
void set_uninitialized()
Set uninitialized()
VectorMutableSubView()
Constructs to uninitialized.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
void initialize(const vec_mut_ptr_t &vec, const Range1D &rng)
Initialize.
void commit_sub_vector(RTOpPack::MutableSubVector *sub_vec)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
virtual void has_changed() const
Must be called by any vector subclass that modifies this vector object!
void get_sub_vector(const Range1D &rng, RTOpPack::MutableSubVector *sub_vec)
void validate_range(const Range1D &rng) const
Validate rng.
void set_uninitialized()
Set uninitialized()
const Range1D & rng() const
vec_ptr_t sub_view(const Range1D &rng) const
void initialize(const vec_ptr_t &full_vec, const Range1D &rng)
Initialize a sub-view based on a full vector.
vec_ptr_t sub_view(const Range1D &rng) const
Overridden to pick VectorSubView::sub_view().
void set_ele(index_type i, value_type val)