44 #include "AbstractLinAlgPack_MatrixOpThyra.hpp"
45 #include "AbstractLinAlgPack_VectorMutableThyra.hpp"
46 #include "AbstractLinAlgPack_ThyraAccessors.hpp"
47 #include "Teuchos_Assert.hpp"
48 #include "Teuchos_dyn_cast.hpp"
50 namespace AbstractLinAlgPack {
70 namespace mmp = MemMngPack;
73 ,
"MatrixOpThyra::initialize(thyra_linear_op): Error!"
77 !adjointSupported, std::invalid_argument
78 ,
"MatrixOpThyra::initialize(thyra_linear_op): Error, the operator opSupported(thyra_linear_op,transp) must return true "
79 "for both values of transp==NOTRANS and transp=TRANS!"
83 space_cols_.
initialize(thyra_linear_op_->range());
84 space_rows_.
initialize(thyra_linear_op_->domain());
91 thyra_linear_op_ = Teuchos::null;
95 return tmp_thyra_linear_op;
114 MatrixOp::mat_mut_ptr_t
124 thyra_linear_op_ = mwo_rhs_thyra.thyra_linear_op_;
125 thyra_linear_op_trans_ = mwo_rhs_thyra.thyra_linear_op_trans_;
126 space_cols_ = mwo_rhs_thyra.space_cols_;
127 space_rows_ = mwo_rhs_thyra.space_rows_;
133 ,
const Vector& v_rhs2, value_type beta
139 get_thyra_vector(
BLAS_Cpp::no_trans==trans_rhs1 ? space_rows_ : space_cols_, v_rhs2, &thyra_vec_rhs2 );
141 get_thyra_vector(
BLAS_Cpp::no_trans==trans_rhs1 ? space_cols_ : space_rows_, v_lhs, &thyra_vec_lhs );
152 free_thyra_vector(
BLAS_Cpp::no_trans==trans_rhs1 ? space_rows_ : space_cols_, v_rhs2, &thyra_vec_rhs2 );
153 commit_thyra_vector(
BLAS_Cpp::no_trans==trans_rhs1 ? space_cols_ : space_rows_, v_lhs, &thyra_vec_lhs );
const VectorSpace & space_cols() const
MatrixOp & operator=(const MatrixOp &mwo_rhs)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
T_To & dyn_cast(T_From &from)
Teuchos::RCP< const Thyra::VectorSpaceBase< value_type > > set_uninitialized()
Set to uninitialized and return smart pointer to the internal Thyra::VectorSpaceBase<value_type> obj...
void Vp_StMtV(VectorMutable *v_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2, value_type beta) const
virtual void initialize(const Teuchos::RCP< const Thyra::LinearOpBase< value_type > > &thyra_linear_op, BLAS_Cpp::Transp thyra_linear_op_trans=BLAS_Cpp::no_trans)
Initalize given a smart pointer to a Thyra::LinearOpBase object.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
BLAS_Cpp::Transp thyra_linear_op_trans() const
EOpTransp trans_trans(EOpTransp trans1, EOpTransp trans2)
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
Works for MultiVectorMutableThyra arguments.
Teuchos::RCP< const Thyra::LinearOpBase< value_type > > set_uninitialized()
Set to uninitialized and return smart pointer to the internal Thyra::VectorBase object.
MatrixOp adapter subclass for Thyra::LinearOpBase.
void initialize(const Teuchos::RCP< const Thyra::VectorSpaceBase< value_type > > &thyra_vec_spc, const inner_prod_ptr_t &inner_prod=Teuchos::null)
Initalize given a smart pointer to a Thyra::VetorSpace object.
MatrixOpThyra()
Construct to uninitialized.
const Teuchos::RCP< const Thyra::LinearOpBase< value_type > > & thyra_linear_op() const
Return a (converted) smart pointer to the internal smart pointer to the Thyra::VectorBase object...
const VectorSpace & space_rows() const