MOOCHO (Single Doxygen Collection)
Version of the Day
|
Default subclass for MultiVectorMutable
implemented using columns of separate abstract vectors.
More...
#include <AbstractLinAlgPack_MultiVectorMutableCols.hpp>
Private Attributes | |
const VectorSpace * | space_cols |
const VectorSpace * | space_rows |
VectorMutable * | column_vectors |
Constructors/Initializers | |
MultiVectorMutableCols () | |
Construct to initialized. More... | |
MultiVectorMutableCols (const Teuchos::RCP< const VectorSpace > &space_cols, const Teuchos::RCP< const VectorSpace > &space_rows, Teuchos::RCP< VectorMutable > col_vecs[]=NULL) | |
Calls initalize() . More... | |
void | initialize (const Teuchos::RCP< const VectorSpace > &space_cols, const Teuchos::RCP< const VectorSpace > &space_rows, Teuchos::RCP< VectorMutable > col_vecs[]=NULL) |
Initialize given the spaces for the columns and rows and possibly the column vectors. More... | |
void | set_uninitialized () |
Set uninitalized. More... | |
Overridden from MatrixBase | |
size_type | rows () const |
size_type | cols () const |
Overridden from MatrixOp | |
const VectorSpace & | space_cols () const |
const VectorSpace & | space_rows () const |
void | zero_out () |
void | Mt_S (value_type alpha) |
MatrixOp & | operator= (const MatrixOp &mwo_rhs) |
mat_mut_ptr_t | clone () |
mat_ptr_t | clone () const |
void | Vp_StMtV (VectorMutable *v_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2, value_type beta) const |
void | Vp_StMtV (VectorMutable *v_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const SpVectorSlice &sv_rhs2, value_type beta) const |
bool | syrk (BLAS_Cpp::Transp M_trans, value_type alpha, value_type beta, MatrixSymOp *sym_lhs) const |
Overridden from MultiVector | |
access_by_t | access_by () const |
Returns return & COL_ACCESS == true only. More... | |
Overridden from MultiVectorMutable | |
vec_mut_ptr_t | col (index_type j) |
vec_mut_ptr_t | row (index_type i) |
Returns return.get() == NULL More... | |
vec_mut_ptr_t | diag (int k) |
Returns return.get() == NULL More... | |
multi_vec_mut_ptr_t | mv_sub_view (const Range1D &row_rng, const Range1D &col_rng) |
Additional Inherited Members | |
Public Types inherited from AbstractLinAlgPack::MultiVectorMutable | |
typedef Teuchos::RCP < VectorMutable > | vec_mut_ptr_t |
typedef Teuchos::RCP < MultiVectorMutable > | multi_vec_mut_ptr_t |
Public Types inherited from AbstractLinAlgPack::MultiVector | |
enum | { ROW_ACCESS = 0x1, COL_ACCESS = 0x2, DIAG_ACCESS = 0x4 } |
typedef int | access_by_t |
typedef Teuchos::RCP< const Vector > | vec_ptr_t |
typedef Teuchos::RCP< const MultiVector > | multi_vec_ptr_t |
Public Types inherited from AbstractLinAlgPack::MatrixOp | |
enum | EMatNormType { MAT_NORM_INF, MAT_NORM_2, MAT_NORM_1, MAT_NORM_FORB } |
Type of matrix norm. More... | |
Public Member Functions inherited from AbstractLinAlgPack::MultiVectorMutable | |
virtual multi_vec_mut_ptr_t | mv_clone () |
Clone the non-const multi-vector object. More... | |
multi_vec_mut_ptr_t | mv_sub_view (const index_type &rl, const index_type &ru, const index_type &cl, const index_type &cu) |
Inlined implementation calls this->mv_sub_view(Range1D(rl,ru),Range1D(cl,cu)) . More... | |
bool | Mp_StM (MatrixOp *mwo_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs) const |
bool | Mp_StM (value_type alpha, const MatrixOp &M_rhs, BLAS_Cpp::Transp trans_rhs) |
multi_vec_ptr_t | mv_clone () const |
vec_ptr_t | col (index_type j) const |
vec_ptr_t | row (index_type i) const |
vec_ptr_t | diag (int k) const |
multi_vec_ptr_t | mv_sub_view (const Range1D &row_rng, const Range1D &col_rng) const |
Public Member Functions inherited from AbstractLinAlgPack::MultiVector | |
multi_vec_ptr_t | mv_sub_view (const index_type &rl, const index_type &ru, const index_type &cl, const index_type &cu) const |
Inlined implementation calls this->mv_sub_view(Range1D(rl,ru),Range1D(cl,cu)) . More... | |
mat_ptr_t | sub_view (const Range1D &row_rng, const Range1D &col_rng) const |
Returns this->mv_sub_view(row_rng,col_rng) casted to a MatrixOp. More... | |
bool | Mp_StMtM (MatrixOp *mwo_lhs, value_type alpha, const MatrixOp &mwo_rhs1, BLAS_Cpp::Transp trans_rhs1, BLAS_Cpp::Transp trans_rhs2, value_type beta) const |
Provides a specialized implementation for mwo_rhs1 of type MatrixSymDiag . More... | |
bool | Mp_StMtM (MatrixOp *mwo_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const MatrixOp &mwo_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta) const |
Provides a specialized implementation for mwo_rhs2 of type MatrixSymDiag . More... | |
Public Member Functions inherited from AbstractLinAlgPack::MatrixOp | |
virtual std::ostream & | output (std::ostream &out) const |
Virtual output function. More... | |
const MatNorm | calc_norm (EMatNormType requested_norm_type=MAT_NORM_1, bool allow_replacement=false) const |
Compute a norm of this matrix. More... | |
mat_ptr_t | sub_view (const index_type &rl, const index_type &ru, const index_type &cl, const index_type &cu) const |
Inlined implementation calls this->sub_view(Range1D(rl,ru),Range1D(cl,cu)) . More... | |
virtual mat_ptr_t | perm_view (const Permutation *P_row, const index_type row_part[], int num_row_part, const Permutation *P_col, const index_type col_part[], int num_col_part) const |
Create a permuted view: M_perm = P_row' * M * P_col . More... | |
virtual mat_ptr_t | perm_view_update (const Permutation *P_row, const index_type row_part[], int num_row_part, const Permutation *P_col, const index_type col_part[], int num_col_part, const mat_ptr_t &perm_view) const |
Reinitialize a permuted view: M_perm = P_row' * M * P_col . More... | |
Public Member Functions inherited from AbstractLinAlgPack::MatrixBase | |
virtual | ~MatrixBase () |
Virtual destructor. More... | |
virtual size_type | nz () const |
Return the number of nonzero elements in the matrix. More... | |
Protected Member Functions inherited from AbstractLinAlgPack::MultiVector | |
virtual 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[], const index_type primary_first_ele, const index_type primary_sub_dim, const index_type primary_global_offset, const index_type secondary_first_ele, const index_type secondary_sub_dim) const |
Apply a reduction/transformation operator row by row, or column by column and return an array of the reduction objects. More... | |
virtual void | apply_op (EApplyBy apply_by, const RTOpPack::RTOp &primary_op, const RTOpPack::RTOp &secondary_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_obj, const index_type primary_first_ele, const index_type primary_sub_dim, const index_type primary_global_offset, const index_type secondary_first_ele, const index_type secondary_sub_dim) const |
Apply a reduction/transformation operator row by row, or column by column and reduce the intermediate reduction objects into one reduction object. More... | |
Protected Member Functions inherited from AbstractLinAlgPack::MatrixOp | |
virtual bool | Mp_StMtP (MatrixOp *mwo_lhs, value_type alpha, BLAS_Cpp::Transp M_trans, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans) const |
mwo_lhs += alpha * op(M_rhs) * op(P_rhs). More... | |
virtual bool | Mp_StMtP (value_type alpha, const MatrixOp &mwo_rhs, BLAS_Cpp::Transp M_trans, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans) |
M_lhs += alpha * op(mwo_rhs) * op(P_rhs). More... | |
virtual bool | Mp_StPtM (MatrixOp *mwo_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans, BLAS_Cpp::Transp M_trans) const |
mwo_lhs += alpha * op(P_rhs) * op(M_rhs). More... | |
virtual bool | Mp_StPtM (value_type alpha, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans, const MatrixOp &mwo_rhs, BLAS_Cpp::Transp M_trans) |
M_lhs += alpha * op(P_rhs) * op(mwo_rhs). More... | |
virtual bool | Mp_StPtMtP (MatrixOp *mwo_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, BLAS_Cpp::Transp M_trans, const GenPermMatrixSlice &P_rhs2, BLAS_Cpp::Transp P_rhs2_trans) const |
mwo_lhs += alpha * op(P_rhs1) * op(M_rhs) * op(P_rhs2). More... | |
virtual bool | Mp_StPtMtP (value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const MatrixOp &mwo_rhs, BLAS_Cpp::Transp M_trans, const GenPermMatrixSlice &P_rhs2, BLAS_Cpp::Transp P_rhs2_trans) |
M_lhs += alpha * op(P_rhs1) * op(mwo_rhs) * op(P_rhs2). More... | |
virtual void | Vp_StPtMtV (VectorMutable *v_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, BLAS_Cpp::Transp M_rhs2_trans, const Vector &v_rhs3, value_type beta) const |
v_lhs = alpha * op(P_rhs1) * op(M_rhs2) * v_rhs3 + beta * v_rhs More... | |
virtual void | Vp_StPtMtV (VectorMutable *v_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, BLAS_Cpp::Transp M_rhs2_trans, const SpVectorSlice &sv_rhs3, value_type beta) const |
v_lhs = alpha * op(P_rhs1) * op(M_rhs2) * sv_rhs3 + beta * v_rhs More... | |
virtual value_type | transVtMtV (const Vector &v_rhs1, BLAS_Cpp::Transp trans_rhs2, const Vector &v_rhs3) const |
result = v_rhs1' * op(M_rhs2) * v_rhs3 More... | |
virtual value_type | transVtMtV (const SpVectorSlice &sv_rhs1, BLAS_Cpp::Transp trans_rhs2, const SpVectorSlice &sv_rhs3) const |
result = sv_rhs1' * op(M_rhs2) * sv_rhs3 More... | |
virtual void | syr2k (BLAS_Cpp::Transp M_trans, value_type alpha, const GenPermMatrixSlice &P1, BLAS_Cpp::Transp P1_trans, const GenPermMatrixSlice &P2, BLAS_Cpp::Transp P2_trans, value_type beta, MatrixSymOp *symwo_lhs) const |
Perform a specialized rank-2k update of a dense symmetric matrix of the form: More... | |
virtual bool | Mp_StMtM (value_type alpha, const MatrixOp &mwo_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixOp &mwo_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta) |
M_lhs = alpha * op(mwo_rhs1) * op(mwo_rhs2) + beta * mwo_lhs (left) (xGEMM) More... | |
virtual bool | syrk (const MatrixOp &mwo_rhs, BLAS_Cpp::Transp M_trans, value_type alpha, value_type beta) |
Perform a rank-k update of a symmetric matrix of the form: More... | |
Default subclass for MultiVectorMutable
implemented using columns of separate abstract vectors.
Only column access is permitted. This is a very bad implementation of a multi-vector but this will work in situations where you need a multi-vector but some underlying linear algebra library does not directly support them.
The only difficult issue is what to use for the vector space for the rows of the multi-vector space_row
. This has to be carefully chosen so that all will work well.
ToDo: Finish documentation!
Definition at line 68 of file AbstractLinAlgPack_MultiVectorMutableCols.hpp.
AbstractLinAlgPack::MultiVectorMutableCols::MultiVectorMutableCols | ( | ) |
Construct to initialized.
Definition at line 53 of file AbstractLinAlgPack_MultiVectorMutableCols.cpp.
AbstractLinAlgPack::MultiVectorMutableCols::MultiVectorMutableCols | ( | const Teuchos::RCP< const VectorSpace > & | space_cols, |
const Teuchos::RCP< const VectorSpace > & | space_rows, | ||
Teuchos::RCP< VectorMutable > | col_vecs[] = NULL |
||
) |
Calls initalize()
.
Definition at line 56 of file AbstractLinAlgPack_MultiVectorMutableCols.cpp.
void AbstractLinAlgPack::MultiVectorMutableCols::initialize | ( | const Teuchos::RCP< const VectorSpace > & | space_cols, |
const Teuchos::RCP< const VectorSpace > & | space_rows, | ||
Teuchos::RCP< VectorMutable > | col_vecs[] = NULL |
||
) |
Initialize given the spaces for the columns and rows and possibly the column vectors.
space_cols | [in] The space that the columns must lie in. The underlying vector space must not be changed while this is in use. |
space_rows | [in] The space that the rows must lie in. The underlying vector space must not be changed while this is in use. What this argument really specifies is what vector type will be compatible with the vectors that the client may try to use to interact with the rows of this multivector. |
col_vecs | [in] Array (size space_rows->dim() ) of column vectors to use for the columns of this . It is allowed for col_vecs==NULL in which case space_cols->create_member() will be used to create the colmns of this . |
Preconditions:
space_cols.get() != NULL
(throw std::invalid_argument
) space_rows.get() != NULL
(throw std::invalid_argument
) space_cols->dim() > 0
(throw std::invalid_argument
) space_rows->dim() > 0
(throw std::invalid_argument
) col_vecs != NULL
] col_vecs[j-1].get() != NULL && col_vecs[j-1]->space().is_compatible(*space_cols) == true
, for j=1..space_rows->dim()
Postconditions:
&this->space_cols() == space_cols.get()
&this->space_rows() == space_rows.get()
[col_vecs != NULL
] this->col(j).get() == col_vecs[j-1].get()
, for j=1..space_rows->dim()
Definition at line 65 of file AbstractLinAlgPack_MultiVectorMutableCols.cpp.
void AbstractLinAlgPack::MultiVectorMutableCols::set_uninitialized | ( | ) |
Set uninitalized.
Definition at line 85 of file AbstractLinAlgPack_MultiVectorMutableCols.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MatrixBase.
Definition at line 94 of file AbstractLinAlgPack_MultiVectorMutableCols.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MatrixBase.
Definition at line 99 of file AbstractLinAlgPack_MultiVectorMutableCols.cpp.
|
virtual |
Implements AbstractLinAlgPack::MatrixBase.
|
virtual |
Implements AbstractLinAlgPack::MatrixBase.
|
virtual |
Reimplemented from AbstractLinAlgPack::MultiVectorMutable.
Definition at line 116 of file AbstractLinAlgPack_MultiVectorMutableCols.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MultiVectorMutable.
Definition at line 122 of file AbstractLinAlgPack_MultiVectorMutableCols.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MultiVectorMutable.
Definition at line 129 of file AbstractLinAlgPack_MultiVectorMutableCols.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MultiVectorMutable.
Definition at line 141 of file AbstractLinAlgPack_MultiVectorMutableCols.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MultiVector.
Definition at line 148 of file AbstractLinAlgPack_MultiVectorMutableCols.cpp.
|
virtual |
Implements AbstractLinAlgPack::MatrixOp.
Definition at line 154 of file AbstractLinAlgPack_MultiVectorMutableCols.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MatrixOp.
Definition at line 193 of file AbstractLinAlgPack_MultiVectorMutableCols.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MatrixOp.
Definition at line 235 of file AbstractLinAlgPack_MultiVectorMutableCols.cpp.
|
virtual |
Returns return & COL_ACCESS == true
only.
Implements AbstractLinAlgPack::MultiVector.
Definition at line 271 of file AbstractLinAlgPack_MultiVectorMutableCols.cpp.
|
virtual |
Implements AbstractLinAlgPack::MultiVectorMutable.
Definition at line 279 of file AbstractLinAlgPack_MultiVectorMutableCols.cpp.
|
virtual |
Returns return.get() == NULL
Implements AbstractLinAlgPack::MultiVectorMutable.
Definition at line 286 of file AbstractLinAlgPack_MultiVectorMutableCols.cpp.
|
virtual |
Returns return.get() == NULL
Implements AbstractLinAlgPack::MultiVectorMutable.
Definition at line 292 of file AbstractLinAlgPack_MultiVectorMutableCols.cpp.
|
virtual |
Reimplemented from AbstractLinAlgPack::MultiVectorMutable.
Definition at line 298 of file AbstractLinAlgPack_MultiVectorMutableCols.cpp.
|
private |
Definition at line 190 of file AbstractLinAlgPack_MultiVectorMutableCols.hpp.
|
private |
Definition at line 191 of file AbstractLinAlgPack_MultiVectorMutableCols.hpp.
|
private |
Definition at line 192 of file AbstractLinAlgPack_MultiVectorMutableCols.hpp.