AbstractLinAlgPack_MultiVectorMutableThyra.hpp

Go to the documentation of this file.
00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
00005 //                  Copyright (2003) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
00028 
00029 #ifndef ALAP_MULTI_VECTOR_MUTABLE_Thyra_HPP
00030 #define ALAP_MULTI_VECTOR_MUTABLE_Thyra_HPP
00031 
00032 #include "AbstractLinAlgPack_MultiVectorMutable.hpp"
00033 #include "AbstractLinAlgPack_MatrixOpThyra.hpp"
00034 #include "Thyra_MultiVectorBase.hpp"
00035 
00036 namespace AbstractLinAlgPack {
00037 
00040 class MultiVectorMutableThyra
00041   :virtual public MultiVectorMutable
00042   ,virtual public MatrixOpThyra
00043 {
00044 public:
00045 
00048 
00056   MultiVectorMutableThyra();
00059   MultiVectorMutableThyra( const Teuchos::RCP<Thyra::MultiVectorBase<value_type> >& thyra_multi_vec );
00073   void initialize( const Teuchos::RCP<Thyra::MultiVectorBase<value_type> >& thyra_multi_vec );
00083   Teuchos::RCP<Thyra::MultiVectorBase<value_type> > set_uninitialized();
00086   Teuchos::RCP<const Thyra::MultiVectorBase<value_type> > thyra_multi_vec() const;
00087 
00089 
00092 
00094   void initialize( const Teuchos::RCP<const Thyra::LinearOpBase<value_type> >& thyra_linear_op );
00095 
00097 
00100 
00102   mat_mut_ptr_t clone();
00104   MatrixOp& operator=(const MatrixOp& mwo_rhs);
00106   void Vp_StMtV(
00107     VectorMutable* v_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1
00108     ,const Vector& v_rhs2, value_type beta
00109     ) const;
00111   bool Mp_StMtM(
00112     MatrixOp* mwo_lhs, value_type alpha
00113     ,BLAS_Cpp::Transp trans_rhs1
00114     ,const MatrixOp& mwo_rhs2, BLAS_Cpp::Transp trans_rhs2
00115     ,value_type beta
00116     ) const;
00117 
00119 
00122 
00124   access_by_t access_by() const;
00126   void apply_op(
00127     EApplyBy apply_by, const RTOpPack::RTOp& primary_op
00128     ,const size_t num_multi_vecs,      const MultiVector*   multi_vecs[]
00129     ,const size_t num_targ_multi_vecs, MultiVectorMutable*  targ_multi_vecs[]
00130     ,RTOpPack::ReductTarget* reduct_objs[]
00131     ,const index_type primary_first_ele,   const index_type primary_sub_dim, const index_type primary_global_offset
00132     ,const index_type secondary_first_ele, const index_type secondary_sub_dim
00133     ) const;
00135   void apply_op(
00136     EApplyBy apply_by, const RTOpPack::RTOp& primary_op, const RTOpPack::RTOp& secondary_op
00137     ,const size_t num_multi_vecs,      const MultiVector*   multi_vecs[]
00138     ,const size_t num_targ_multi_vecs, MultiVectorMutable*  targ_multi_vecs[]
00139     ,RTOpPack::ReductTarget *reduct_obj
00140     ,const index_type primary_first_ele, const index_type primary_sub_dim, const index_type primary_global_offset
00141     ,const index_type secondary_first_ele, const index_type secondary_sub_dim
00142     ) const;
00143 
00145 
00148 
00150   vec_mut_ptr_t col(index_type j);
00152   vec_mut_ptr_t row(index_type i);
00154   vec_mut_ptr_t diag(int k);
00156   multi_vec_mut_ptr_t mv_sub_view(const Range1D& row_rng, const Range1D& col_rng);
00157 
00159 
00160 private:
00161 
00163   Teuchos::RCP<Thyra::MultiVectorBase<value_type> > cast_thyra_multi_vec();
00164   
00165 }; // end class MultiVectorMutableThyra
00166 
00167 } // end namespace AbstractLinAlgPack
00168 
00169 #endif // ALAP_MULTI_VECTOR_MUTABLE_Thyra_HPP

Generated on Tue Oct 20 12:51:43 2009 for MOOCHO (Single Doxygen Collection) by doxygen 1.4.7