66 class init_rtop_server_t {
68 init_rtop_server_t() {
84 init_rtop_server_t init_rtop_server;
88 namespace AbstractLinAlgPack {
102 if( dynamic_cast<const void*>(&vec) == dynamic_cast<const void*>(
this) )
104 const Vector* vecs[1] = { &vec };
112 return this->
operator=(static_cast<const Vector&>(vec));
120 assign_scalar_op,0,NULL,1,targ_vecs,NULL
128 namespace rcp = MemMngPack;
134 ,
"VectorMutable::sub_view(rng): Error, rng = ["<<rng.
lbound()<<
","<<rng.
ubound()<<
"] "
135 "is not in the range [1,this->dim()] = [1,"<<dim<<
"]" );
156 const Vector* vecs[1] = { &x };
182 Teuchos::arcp(sub_vec_inout->
values(), 0, sub_vec_inout->
stride()*sub_vec_inout->
subDim(),
false),
194 if (!
is_null(sub_vec.indices())) {
196 sub_vec.globalOffset(), sub_vec.subDim(), sub_vec.subNz(),
197 sub_vec.values().get(), sub_vec.valuesStride(),
198 sub_vec.indices().get(), sub_vec.indicesStride(),
199 sub_vec.localOffset(), sub_vec.isSorted(),
206 sub_vec.globalOffset(), sub_vec.subDim(),
207 sub_vec.values().get(), sub_vec.valuesStride(),
216 set_sub_vector_op,0,NULL,1,targ_vecs,NULL
217 ,sub_vec.globalOffset()+1,sub_vec.subDim(),sub_vec.globalOffset()
230 true, std::logic_error
231 ,
"VectorMutable::Vp_StMtV(...): Error, this function has not yet been "
232 "given a default implementation and has not been overridden for the "
233 "subclass \'" <<
typeName(*
this) <<
"\'!"
244 namespace rcp = MemMngPack;
int RTOp_TOp_assign_scalar_set_alpha(RTOp_value_type alpha, struct RTOp_RTOp *op)
virtual vec_mut_ptr_t sub_view(const Range1D &rng)
Create a mutable abstract view of a vector object.
virtual void set_sub_vector(const RTOpPack::SparseSubVector &sub_vec)
Set a specific sub-vector.
std::string typeName(const T &t)
virtual void get_sub_vector(const Range1D &rng, RTOpPack::SubVector *sub_vec) const
Get a non-mutable explicit view of a sub-vector.
Adapter subclass that uses a RTOp_RTOp object.
bool is_null(const boost::shared_ptr< T > &p)
Abstract interface for immutable, finite dimensional, coordinate vectors {abstract}.
void RTOp_sparse_sub_vector(RTOp_index_type global_offset, RTOp_index_type sub_dim, RTOp_index_type sub_nz, const RTOp_value_type values[], ptrdiff_t values_stride, const RTOp_index_type indices[], ptrdiff_t indices_stride, ptrdiff_t local_offset, int is_sorted, struct RTOp_SparseSubVector *sub_vec)
RTOp_index_type index_type
int RTOp_TOp_assign_scalar_construct(RTOp_value_type alpha, struct RTOp_RTOp *op)
RTOp_value_type value_type
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Index ubound() const
Return upper bound of the range.
const Scalar * values() const
void RTOp_sparse_sub_vector_null(struct RTOp_SparseSubVector *sub_vec)
virtual void commit_sub_vector(RTOpPack::MutableSubVector *sub_vec)
Free a mutable explicit view of a sub-vector.
void RTOp_sub_vector(RTOp_index_type global_offset, RTOp_index_type sub_dim, const RTOp_value_type values[], ptrdiff_t values_stride, struct RTOp_SubVector *sub_vec)
virtual void set_ele(index_type i, value_type val)
Set a specific element of a vector.
int RTOp_TOp_assign_vectors_construct(struct RTOp_RTOp *op)
void RTOp_sparse_sub_vector_from_dense(const struct RTOp_SubVector *sub_vec, struct RTOp_SparseSubVector *spc_sub_vec)
int RTOp_TOp_axpy_set_alpha(RTOp_value_type alpha, struct RTOp_RTOp *op)
int RTOp_TOp_set_sub_vector_construct(const struct RTOp_SparseSubVector *sub_vec, struct RTOp_RTOp *op)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
. One-based subregion index range class.
virtual void zero()
Zeros this vector.
Teuchos_Ordinal subDim() const
bool full_range() const
Returns true if the range represents the entire region (constructed from Range1D()) ...
virtual void axpy(value_type alpha, const Vector &x)
Adds a linear combination of another vector to this vector object.
Concrete subclass for a sub-view of a VectorMutable object.
virtual void free_sub_vector(RTOpPack::SubVector *sub_vec) const
Free an explicit view of a sub-vector.
Teuchos_Ordinal globalOffset() const
Index lbound() const
Return lower bound of the range.
virtual index_type dim() const
Return the dimension of this vector.
virtual VectorMutable & operator=(value_type alpha)
Assign the elements of this vector to a scalar.
void initialize(Teuchos_Ordinal globalOffset, Teuchos_Ordinal subDim, Scalar *values, ptrdiff_t stride)
virtual void get_sub_vector(const Range1D &rng, RTOpPack::MutableSubVector *sub_vec)
Get a mutable explicit view of a sub-vector.
Abstract interface for mutable coordinate vectors {abstract}.
void apply_op(EApplyBy apply_by, const RTOpPack::RTOp &primary_op, const size_t num_multi_vecs, const MultiVector *multi_vecs[], const size_t num_targ_multi_vecs, MultiVectorMutable *targ_multi_vecs[], RTOpPack::ReductTarget *reduct_objs[]=NULL, const index_type primary_first_ele=1, const index_type primary_sub_dim=0, const index_type primary_global_offset=0, const index_type secondary_first_ele=1, const index_type secondary_sub_dim=0)
Apply a reduction/transformation operator column by column and return an array of the reduction objec...
virtual void Vp_StMtV(value_type alpha, const GenPermMatrixSlice &P, BLAS_Cpp::Transp P_trans, const Vector &x, value_type beta)
Perform a gather or scatter operation with a vector.
SparseSubVectorT< RTOp_value_type > SparseSubVector
Class for a mutable sub-vector.
RangePack::Range1D Range1D
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
Class for a non-mutable sub-vector.
int RTOp_TOp_axpy_construct(RTOp_value_type alpha, struct RTOp_RTOp *op)
Concrete matrix type to represent general permutation (mapping) matrices.