47 #include "AbstractLinAlgPack_MatrixNonsingSerial.hpp" 48 #include "AbstractLinAlgPack_MatrixOpSerial.hpp" 49 #include "AbstractLinAlgPack_VectorDenseEncap.hpp" 50 #include "AbstractLinAlgPack_MatrixOpGetGMSMutable.hpp" 51 #include "AbstractLinAlgPack_MatrixOpGetGMSTri.hpp" 52 #include "AbstractLinAlgPack_MatrixSymOpGetGMSSymMutable.hpp" 53 #include "AbstractLinAlgPack_SpVectorOp.hpp" 54 #include "AbstractLinAlgPack_SpVectorClass.hpp" 55 #include "DenseLinAlgPack_DMatrixClass.hpp" 56 #include "DenseLinAlgPack_DVectorClass.hpp" 57 #include "AbstractLinAlgPack_LinAlgOpPackHack.hpp" 58 #include "DenseLinAlgPack_AssertOp.hpp" 74 const size_type n =
rows();
75 DenseLinAlgPack::MtV_assert_sizes( n, n, trans_rhs1, vs_rhs2.
dim() );
77 this->
V_InvMtV( &(*v_lhs)(), trans_rhs1, vs_rhs2 );
84 const size_type n =
rows();
85 DenseLinAlgPack::MtV_assert_sizes( n, n, trans_rhs1, sv_rhs2.
dim() );
89 this->
V_InvMtV( &(*v_lhs)(), trans_rhs1, v_rhs2() );
96 const size_type n =
rows();
97 DenseLinAlgPack::Vp_MtV_assert_sizes( vs_lhs->
dim(), n, n, trans_rhs1, sv_rhs2.
dim() );
100 this->
V_InvMtV( vs_lhs, trans_rhs1, v_rhs2() );
107 const size_type n =
rows();
108 DenseLinAlgPack::Vp_MtV_assert_sizes( vs_rhs1.
dim(), n, n, trans_rhs2, vs_rhs3.
dim() );
110 this->
V_InvMtV( &tmp, trans_rhs2, vs_rhs3 );
118 const size_type n =
rows();
119 DenseLinAlgPack::Vp_MtV_assert_sizes( sv_rhs1.
dim(), n, n, trans_rhs2, sv_rhs3.
dim() );
121 this->
V_InvMtV( &tmp, trans_rhs2, sv_rhs3 );
133 DenseLinAlgPack::MtM_assert_sizes(
rows(),
cols(), A_trans, B.
rows(), B.
cols(), B_trans );
138 this->
M_StInvMtM( &(*C)(), a, A_trans, B, B_trans );
155 for( size_type j = 1; j <= C->
cols(); ++j )
157 , DenseLinAlgPack::col( B, B_trans, j ) );
163 DMatrix* gm_lhs, value_type alpha
168 TEUCHOS_TEST_FOR_EXCEPT(
true);
177 TEUCHOS_TEST_FOR_EXCEPT(
true);
186 DenseLinAlgPack::MtM_assert_sizes(
rows(),
cols(), A_trans, B.
rows(), B.
cols(), B_trans );
209 DMatrix* gm_lhs, value_type alpha
214 TEUCHOS_TEST_FOR_EXCEPT(
true);
223 TEUCHOS_TEST_FOR_EXCEPT(
true);
230 ,
const Vector& v_rhs2)
const 234 this->
V_InvMtV( &vs_lhs(), trans_rhs1, vs_rhs2() );
259 using Teuchos::dyn_cast;
262 if(
const MatrixOpGetGMS* mwo_gms_rhs2 = dynamic_cast<const MatrixOpGetGMS*>(&mwo_rhs2)) {
266 this->
M_StInvMtM(&gms_lhs(),alpha,trans_rhs1,dyn_cast<const MatrixOpSerial>(mwo_rhs2),trans_rhs2);
275 using Teuchos::dyn_cast;
278 if(
const MatrixOpGetGMS* mwo_gms_rhs1 = dynamic_cast<const MatrixOpGetGMS*>(&mwo_rhs1)) {
282 this->
M_StMtInvM(&gms_lhs(),alpha,dyn_cast<const MatrixOpSerial>(mwo_rhs1),trans_rhs1,trans_rhs2);
value_type transVtInvMtV(const Vector &v_rhs1, const MatrixNonsing &M_rhs2, BLAS_Cpp::Transp trans_rhs2, const Vector &v_rhs3)
result = v_rhs1' * inv(op(M_rhs2)) * v_rhs3
Abstract interface for immutable, finite dimensional, coordinate vectors {abstract}.
size_type dim() const
Return the number of elements in the full vector.
void Vp_StV(VectorMutable *v_lhs, const value_type &alpha, const Vector &v_rhs)
v_lhs = alpha * v_rhs + v_lhs
size_type rows(size_type rows, size_type cols, BLAS_Cpp::Transp _trans)
void M_StMtInvM(MatrixOp *m_lhs, value_type alpha, const MatrixOp &mwo_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixNonsing &M_rhs2, BLAS_Cpp::Transp trans_rhs2)
m_lhs = alpha * op(mwo_rhs1) * inv(op(M_rhs2)) (left)
void assign(VectorMutable *v_lhs, const V &V_rhs)
v_lhs = V_rhs.
void resize(size_type n, value_type val=value_type())
Base class for all matrices implemented in a shared memory address space.
virtual size_type cols() const
Return the number of columns in the matrix.
Extract a constant DenseLinAlgPack::DVectorSlice view of a Vector object.
void V_InvMtV(VectorMutable *v_lhs, const MatrixNonsing &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2)
v_lhs = inv(op(M_rhs1)) * v_rhs2
void Mp_StM(MatrixOp *mwo_lhs, value_type alpha, const MatrixOp &M_rhs, BLAS_Cpp::Transp trans_rhs)
void Vp_StMtV(VectorMutable *v_lhs, value_type alpha, const MatrixOp &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2, value_type beta=1.0)
v_lhs = alpha * op(M_rhs1) * v_rhs2 + beta * v_lhs (BLAS xGEMV)
void resize(size_type rows, size_type cols, value_type val=value_type())
Abstract interface that allows the extraction of a const DMatrixSlice view of an abstract matrix...
Helper class type that simplifies the usage of the MatrixOpGetGMS interface for clients.
Base class for all matrices that support basic matrix operations.
void Mt_S(MatrixOp *mwo_lhs, value_type alpha)
value_type dot(const Vector &v_rhs1, const Vector &v_rhs2)
result = v_rhs1' * v_rhs2
Abstract interface for mutable coordinate vectors {abstract}.
Extract a non-const DenseLinAlgPack::DVectorSlice view of a VectorMutable object. ...
void M_StInvMtM(MatrixOp *m_lhs, value_type alpha, const MatrixNonsing &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixOp &mwo_rhs2, BLAS_Cpp::Transp trans_rhs2)
m_lhs = alpha * inv(op(mwo_rhs1)) * op(mwo_rhs2) (right)
virtual size_type rows() const
Return the number of rows in the matrix.
DVectorSlice col(size_type j)
size_type cols(size_type rows, size_type cols, BLAS_Cpp::Transp _trans)
Helper class type that simplifies the usage of the MatrixOpGetGMSMutable interface for clients...