60 void imp_Vp_StMtV_implicit(
72 namespace alap = AbstractLinAlgPack;
88 alap::VectorSpace::vec_mut_ptr_t
102 alap::VectorSpace::vec_mut_ptr_t
195 namespace ConstrainedOptPack {
203 namespace rcp = MemMngPack;
206 C.
get() == NULL, std::invalid_argument
207 ,
"MatrixVarReductImplicit::initialize(...): Error, "
208 "C.get() must not be NULL" );
210 N.
get() == NULL, std::invalid_argument
211 ,
"MatrixVarReductImplicit::initialize(...): Error, "
212 "N.get() must not be NULL" );
213 if( D_direct.
get() ) {
214 const bool is_compatible_cols = D_direct->space_cols().is_compatible(C->space_cols());
216 !is_compatible_cols, VectorSpace::IncompatibleVectorSpaces
217 ,
"MatrixVarReductImplicit::initialize(...): Error, "
218 "D_direct->space_cols() is not compatible with C->space_cols()" );
219 const bool is_compatible_rows = D_direct->space_rows().is_compatible(N->space_rows());
221 !is_compatible_rows, VectorSpace::IncompatibleVectorSpaces
222 ,
"MatrixVarReductImplicit::initialize(...): Error, "
223 "D_direct->space_rows() is not compatible with N->space_rows()" );
229 if(!InvCtN_rows_set_list_.empty()) {
230 for( InvCtN_rows_set_list_t::iterator itr = InvCtN_rows_set_list_.begin();
231 itr != InvCtN_rows_set_list_.end(); ++itr )
235 InvCtN_rows_set_list_.clear();
241 namespace rcp = MemMngPack;
251 return C_.get() ? C_->rows() : 0;
256 return N_.get() ? N_->cols() : 0;
264 return C_->space_cols();
270 return N_->space_rows();
282 o <<
"This is a " << this->
rows() <<
" x " << this->
cols()
283 <<
" variable reduction matrix D = -inv(C)*N where C and N are:\n"
297 imp_Vp_StMtV_implicit( y, a, *C_, *N_, D_trans, x, b );
313 imp_Vp_StMtV_implicit( y, a, *C_, *N_, D_trans, x, b );
423 C_.get() == NULL, std::logic_error
424 ,
"MatrixVarReductImplicit::assert_initialized(): Error, "
425 "initialize(...) has not been called yet!" );
Teuchos::Ordinal size_type
Typedef for the size type of elements that are used by the library.
AbstractLinAlgPack::size_type size_type
AbstractLinAlgPack::MatrixOp * N
virtual const VectorSpace & space_rows() const =0
Vector space for vectors that are compatible with the rows of the matrix.
void Vt_S(VectorMutable *v_lhs, const value_type &alpha)
v_lhs *= alpha
virtual void initialize(const mat_nonsing_ptr_t &C, const mat_ptr_t &N, const mat_ptr_t &D_direct)
Initialize this matrix object.
void Vp_StPtMtV(VectorMutable *v_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const MatrixOp &M_rhs2, BLAS_Cpp::Transp M_rhs2_trans, const Vector &v_rhs3, value_type beta=1.0)
v_lhs = alpha * op(P_rhs1) * op(M_rhs2) * v_rhs3 + beta * v_rhs
RTOp_value_type value_type
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
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)
Return rows of a possible transposed matrix.
std::ostream & output(std::ostream &) const
void assert_initialized() const
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
const VectorSpace & space_cols() const
virtual size_type cols() const
Return the number of columns in the matrix.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
const LAPACK_C_Decl::f_int & M
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 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)
const LAPACK_C_Decl::f_int const LAPACK_C_Decl::f_int const LAPACK_C_Decl::f_int const LAPACK_C_Decl::f_dbl_prec const LAPACK_C_Decl::f_int const LAPACK_C_Decl::f_dbl_prec LAPACK_C_Decl::f_dbl_prec * C
const f_int f_dbl_prec a[]
Base class for all matrices that support basic matrix operations.
SparseVectorSlice< SparseElement< index_type, value_type > > SpVectorSlice
void Vp_StMtV(VectorMutable *v_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2, value_type beta) const
void V_MtV(VectorMutable *v_lhs, const MatrixOp &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const V &V_rhs2)
v_lhs = op(M_rhs1) * V_rhs2.
AbstractLinAlgPack::value_type value_type
virtual const VectorSpace & space_cols() const =0
Vector space for vectors that are compatible with the columns of the matrix.
Abstract interface for mutable coordinate vectors {abstract}.
const VectorSpace & space_rows() const
FortranTypes::f_dbl_prec value_type
Typedef for the value type of elements that is used for the library.
Abstract base class for all nonsingular polymorphic matrices that can be used to compute matrix-vecto...
void Vp_MtV_assert_compatibility(VectorMutable *v_lhs, const MatrixOp &m_rhs1, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2)
v_lhs += op(m_rhs1) * v_rhs2
AbstractLinAlgPack::MatrixOp * D_direct
const f_int const f_int & N
virtual vec_mut_ptr_t create_member() const =0
Create a vector member from the vector space.
virtual size_type rows() const
Return the number of rows in the matrix.
MatrixOp & operator=(const MatrixOp &M)
size_type cols(size_type rows, size_type cols, BLAS_Cpp::Transp _trans)
Return columns of a possible transposed matrix.
AbstractLinAlgPack::MatrixOpNonsing * C
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
TEUCHOSCORE_LIB_DLL_EXPORT Teuchos::RCP< WorkspaceStore > get_default_workspace_store()
virtual void set_uninitialized()
Set the matrix to uninitialized.