44 #include "AbstractLinAlgPack_MatrixZero.hpp"
45 #include "AbstractLinAlgPack_MatrixSymOp.hpp"
46 #include "AbstractLinAlgPack_VectorStdOps.hpp"
47 #include "Teuchos_Assert.hpp"
49 namespace AbstractLinAlgPack {
67 (space_cols.
get() == NULL && space_rows.
get() != NULL)
68 || (space_cols.
get() != NULL && space_rows.
get() == NULL)
69 , std::invalid_argument
70 ,
"MatrixZero::initialize(...) : Error, the space_cols.get() and "
71 "space_rows.get() must both be != NULL or == NULL" );
80 return space_cols_.
get() ? space_cols_->dim() : 0;
85 return space_rows_.
get() ? space_rows_->dim() : 0;
103 assert_initialized();
109 assert_initialized();
115 assert_initialized();
121 assert_initialized();
128 assert_initialized();
129 return out <<
"Zero matrix of dimension " <<
rows() <<
" x " <<
cols() << std::endl;
138 assert_initialized();
148 assert_initialized();
158 assert_initialized();
169 assert_initialized();
177 ,
const Vector& x, value_type b
180 assert_initialized();
188 assert_initialized();
196 ,
const Vector& x, value_type b)
const
198 assert_initialized();
208 assert_initialized();
214 ,
const Vector& v_rhs3)
const
216 assert_initialized();
224 assert_initialized();
234 assert_initialized();
245 assert_initialized();
255 assert_initialized();
264 assert_initialized();
271 void MatrixZero::assert_initialized()
const {
273 space_cols_.
get() == NULL, std::logic_error
274 ,
"Error, the MatrixZero object has not been initialized!" );
Abstract interface for immutable, finite dimensional, coordinate vectors {abstract}.
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
void Vt_S(VectorMutable *v_lhs, const value_type &alpha)
v_lhs *= alpha
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
void initialize(const VectorSpace::space_ptr_t &space_cols, const VectorSpace::space_ptr_t &space_rows)
Initialize (or initialize) given the columns and rows vector spaces.
friend void Mt_S(MatrixOp *mwo_lhs, value_type alpha)
value_type transVtMtV(const Vector &v_rhs1, BLAS_Cpp::Transp trans_rhs2, const Vector &v_rhs3) const
Interface adding operations specific for a symmetric matrix {abstract}.
std::ostream & output(std::ostream &out) const
Abstract interface for objects that represent a space for mutable coordinate vectors.
void Vp_StPtMtV(VectorMutable *vs_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
void Vp_StMtV(VectorMutable *vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2, value_type beta) const
void Mt_S(value_type alpha)
Base class for all matrices that support basic matrix operations.
bool Mp_StM(MatrixOp *mwo_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs) const
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
Abstract interface for mutable coordinate vectors {abstract}.
MatrixOp & operator=(const MatrixOp &M)
MatrixZero(const VectorSpace::space_ptr_t &space_cols=Teuchos::null, const VectorSpace::space_ptr_t &space_rows=Teuchos::null)
Calls this->initalize()
virtual void Mt_S(value_type alpha)
M_lhs *= alpha : Multiply a matrix by a scalar.
bool syrk(BLAS_Cpp::Transp M_trans, value_type alpha, value_type beta, MatrixSymOp *sym_lhs) const
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
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
const VectorSpace & space_rows() const
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
Concrete matrix type to represent general permutation (mapping) matrices.
const VectorSpace & space_cols() const
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