#include <AbstractLinAlgPack_VectorMutableBlocked.hpp>
Inheritance diagram for AbstractLinAlgPack::VectorMutableBlocked:
Overridden form Vector | |
| index_type | dim () const |
| | |
| const VectorSpace & | space () const |
| | |
| void | apply_op (const RTOpPack::RTOp &op, const size_t num_vecs, const Vector *vecs[], const size_t num_targ_vecs, VectorMutable *targ_vecs[], RTOpPack::ReductTarget *reduct_obj, const index_type first_ele, const index_type sub_dim, const index_type global_offset) const |
| | |
| index_type | nz () const |
| | |
| std::ostream & | output (std::ostream &out, bool print_dim, bool newline, index_type global_offset) const |
| | |
| value_type | get_ele (index_type i) const |
| | |
| value_type | norm_1 () const |
| | |
| value_type | norm_inf () const |
| | |
| value_type | inner_product (const Vector &) const |
| | |
| void | get_sub_vector (const Range1D &rng, RTOpPack::SubVector *sub_vec) const |
| | |
| void | free_sub_vector (RTOpPack::SubVector *sub_vec) const |
| | |
Overridden from VectorMutable | |
| vec_mut_ptr_t | sub_view (const Range1D &rng) |
| | |
| void | axpy (value_type alpha, const Vector &x) |
| | |
| VectorMutable & | operator= (value_type) |
| | |
| VectorMutable & | operator= (const Vector &) |
| | |
| void | set_ele (index_type i, value_type val) |
| | |
| void | set_sub_vector (const RTOpPack::SparseSubVector &sub_vec) |
| | |
Overridden form Vector | |
| void | has_changed () const |
| | |
Public Types | |
| typedef Teuchos::RefCountPtr< const VectorSpaceBlocked > | vec_space_comp_ptr_t |
| | |
Public Member Functions | |
| VectorMutableBlocked (VectorMutable::vec_mut_ptr_t *vecs, const vec_space_comp_ptr_t &vec_space) | |
Calls this->initialize(). | |
| void | initialize (VectorMutable::vec_mut_ptr_t *vecs, const vec_space_comp_ptr_t &vec_space) |
| Initialize given a list of constituent vectors. | |
| const VectorSpaceBlocked & | block_space () const |
| Return the underlying block vector space. | |
| const Vector & | get_vector (int k) const |
| Get the kth (zero based) constituent vector. | |
| VectorMutable & | get_vector (int k) |
| Get the kth (zero based) constituent vector. | |
This is a near optimal implementation for a block vector in many circumstances.
A blocked vector is simply the concatonation of two or more vectors to form a larger vector. Suppose that we are given a list of pointers to vector objects v[0],v[1],,,v[p]. Then this vector object would be represented as:
[ *v[0] ]
[ *v[1] ]
this = [ . ]
[ *v[p] ]
this->sub_view(1,v[0]->dim()).get() == v[0]. However, if some sub-view is requested that overlaps two or more constitient vectors, then there is no choice but to return a VectorMutableBlocked object from sub_view().
There are some situations where this vector subclass will be inefficient. For example, suppose that the constituent vectors v[0],v[1],,,v[p] are parallel vectors with elements owned by unique processes such that an reduction/transformation operator could be applied in parallel to all the constituent vectors in the same time (wall clock) that it takes to apply an operator to one constituent vector. In this case, this vector subclass could not take advantage of this parallelism and therefore, a more specialized "parallel" block vector class should be created (using threads for instance). Alternatively, the implementation of this vector subclass could be modified to take advantage of threads if they are available.
Definition at line 68 of file AbstractLinAlgPack_VectorMutableBlocked.hpp.
|
|
Definition at line 73 of file AbstractLinAlgPack_VectorMutableBlocked.hpp. |
|
||||||||||||
|
Calls
Definition at line 53 of file AbstractLinAlgPack_VectorMutableBlocked.cpp. |
|
||||||||||||
|
Initialize given a list of constituent vectors. Preconditions:
Postconditions:
Definition at line 62 of file AbstractLinAlgPack_VectorMutableBlocked.cpp. |
|
|
Return the underlying block vector space.
Definition at line 221 of file AbstractLinAlgPack_VectorMutableBlocked.hpp. |
|
|
Get the kth (zero based) constituent vector.
Definition at line 229 of file AbstractLinAlgPack_VectorMutableBlocked.hpp. |
|
|
Get the kth (zero based) constituent vector.
Definition at line 237 of file AbstractLinAlgPack_VectorMutableBlocked.hpp. |
|
|
Reimplemented from AbstractLinAlgPack::Vector. Definition at line 80 of file AbstractLinAlgPack_VectorMutableBlocked.cpp. |
|
|
Implements AbstractLinAlgPack::Vector. Definition at line 85 of file AbstractLinAlgPack_VectorMutableBlocked.cpp. |
|
||||||||||||||||||||||||||||||||||||||||
|
Implements AbstractLinAlgPack::Vector. Definition at line 90 of file AbstractLinAlgPack_VectorMutableBlocked.cpp. |
|
|
Reimplemented from AbstractLinAlgPack::Vector. Definition at line 221 of file AbstractLinAlgPack_VectorMutableBlocked.cpp. |
|
||||||||||||||||||||
|
Reimplemented from AbstractLinAlgPack::Vector. Definition at line 232 of file AbstractLinAlgPack_VectorMutableBlocked.cpp. |
|
|
Reimplemented from AbstractLinAlgPack::Vector. Definition at line 252 of file AbstractLinAlgPack_VectorMutableBlocked.cpp. |
|
|
Reimplemented from AbstractLinAlgPack::Vector. Definition at line 263 of file AbstractLinAlgPack_VectorMutableBlocked.cpp. |
|
|
Reimplemented from AbstractLinAlgPack::Vector. Definition at line 278 of file AbstractLinAlgPack_VectorMutableBlocked.cpp. |
|
|
Reimplemented from AbstractLinAlgPack::Vector. Definition at line 293 of file AbstractLinAlgPack_VectorMutableBlocked.cpp. |
|
||||||||||||
|
Reimplemented from AbstractLinAlgPack::Vector. Definition at line 298 of file AbstractLinAlgPack_VectorMutableBlocked.cpp. |
|
|
Reimplemented from AbstractLinAlgPack::Vector. Definition at line 324 of file AbstractLinAlgPack_VectorMutableBlocked.cpp. |
|
|
Reimplemented from AbstractLinAlgPack::VectorMutable. Definition at line 355 of file AbstractLinAlgPack_VectorMutableBlocked.cpp. |
|
||||||||||||
|
Reimplemented from AbstractLinAlgPack::VectorMutable. Definition at line 424 of file AbstractLinAlgPack_VectorMutableBlocked.cpp. |
|
|
Reimplemented from AbstractLinAlgPack::VectorMutable. Definition at line 430 of file AbstractLinAlgPack_VectorMutableBlocked.cpp. |
|
|
Reimplemented from AbstractLinAlgPack::VectorMutable. Definition at line 439 of file AbstractLinAlgPack_VectorMutableBlocked.cpp. |
|
||||||||||||
|
Reimplemented from AbstractLinAlgPack::VectorMutable. Definition at line 446 of file AbstractLinAlgPack_VectorMutableBlocked.cpp. |
|
|
Reimplemented from AbstractLinAlgPack::VectorMutable. Definition at line 458 of file AbstractLinAlgPack_VectorMutableBlocked.cpp. |
|
|
Reimplemented from AbstractLinAlgPack::Vector. Definition at line 345 of file AbstractLinAlgPack_VectorMutableBlocked.cpp. |
1.3.9.1