MOOCHO/Thyra Adapter Software  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
AbstractLinAlgPack_MultiVectorMutableThyra.hpp
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
5 // Copyright (2003) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov)
38 //
39 // ***********************************************************************
40 // @HEADER
41 
42 #ifndef ALAP_MULTI_VECTOR_MUTABLE_Thyra_HPP
43 #define ALAP_MULTI_VECTOR_MUTABLE_Thyra_HPP
44 
45 #include "AbstractLinAlgPack_MultiVectorMutable.hpp"
46 #include "AbstractLinAlgPack_MatrixOpThyra.hpp"
47 #include "Thyra_MultiVectorBase.hpp"
48 
49 namespace AbstractLinAlgPack {
50 
54  :virtual public MultiVectorMutable
55  ,virtual public MatrixOpThyra
56 {
57 public:
58 
61 
100 
102 
105 
108 
110 
113 
115  mat_mut_ptr_t clone();
117  MatrixOp& operator=(const MatrixOp& mwo_rhs);
119  void Vp_StMtV(
120  VectorMutable* v_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1
121  ,const Vector& v_rhs2, value_type beta
122  ) const;
124  bool Mp_StMtM(
125  MatrixOp* mwo_lhs, value_type alpha
126  ,BLAS_Cpp::Transp trans_rhs1
127  ,const MatrixOp& mwo_rhs2, BLAS_Cpp::Transp trans_rhs2
128  ,value_type beta
129  ) const;
130 
132 
135 
137  access_by_t access_by() const;
139  void apply_op(
140  EApplyBy apply_by, const RTOpPack::RTOp& primary_op
141  ,const size_t num_multi_vecs, const MultiVector* multi_vecs[]
142  ,const size_t num_targ_multi_vecs, MultiVectorMutable* targ_multi_vecs[]
143  ,RTOpPack::ReductTarget* reduct_objs[]
144  ,const index_type primary_first_ele, const index_type primary_sub_dim, const index_type primary_global_offset
145  ,const index_type secondary_first_ele, const index_type secondary_sub_dim
146  ) const;
148  void apply_op(
149  EApplyBy apply_by, const RTOpPack::RTOp& primary_op, const RTOpPack::RTOp& secondary_op
150  ,const size_t num_multi_vecs, const MultiVector* multi_vecs[]
151  ,const size_t num_targ_multi_vecs, MultiVectorMutable* targ_multi_vecs[]
152  ,RTOpPack::ReductTarget *reduct_obj
153  ,const index_type primary_first_ele, const index_type primary_sub_dim, const index_type primary_global_offset
154  ,const index_type secondary_first_ele, const index_type secondary_sub_dim
155  ) const;
156 
158 
161 
163  vec_mut_ptr_t col(index_type j);
165  vec_mut_ptr_t row(index_type i);
167  vec_mut_ptr_t diag(int k);
169  multi_vec_mut_ptr_t mv_sub_view(const Range1D& row_rng, const Range1D& col_rng);
170 
172 
173 private:
174 
176  Teuchos::RCP<Thyra::MultiVectorBase<value_type> > cast_thyra_multi_vec();
177 
178 }; // end class MultiVectorMutableThyra
179 
180 } // end namespace AbstractLinAlgPack
181 
182 #endif // ALAP_MULTI_VECTOR_MUTABLE_Thyra_HPP
mat_mut_ptr_t clone()
Overridden to call MatrixOpThyra::clone()
multi_vec_mut_ptr_t mv_sub_view(const Range1D &row_rng, const Range1D &col_rng)
MatrixOp & operator=(const MatrixOp &mwo_rhs)
Overridden to call MultiVectorMutable::operator=()
void Vp_StMtV(VectorMutable *v_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2, value_type beta) const
Overridden to call MatrixOpThyra::Vp_StMtV()
void initialize(const Teuchos::RCP< Thyra::MultiVectorBase< value_type > > &thyra_multi_vec)
Initalize given a smart pointer to a Thyra::MultiVectorBase object.
MatrixOp adapter subclass for Thyra::LinearOpBase.
void apply_op(EApplyBy apply_by, const RTOpPack::RTOp &primary_op, const size_t num_multi_vecs, const MultiVector *multi_vecs[], const size_t num_targ_multi_vecs, MultiVectorMutable *targ_multi_vecs[], RTOpPack::ReductTarget *reduct_objs[], const index_type primary_first_ele, const index_type primary_sub_dim, const index_type primary_global_offset, const index_type secondary_first_ele, const index_type secondary_sub_dim) const
MultiVectorMutable adapter subclass for Thyra::MultiVectorBase.
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
Overridden to call MatrixOpThyra::Mp_StMtM()
Teuchos::RCP< Thyra::MultiVectorBase< value_type > > set_uninitialized()
Set to uninitialized and return smart pointer to the internal Thyra::LinearOpBase object...
Transp
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...
Teuchos::RCP< const Thyra::MultiVectorBase< value_type > > thyra_multi_vec() const
Return a smart pointer to the internal Thyra::LinearOpBase object.