44 #ifndef ROL_LINEAROPERATORPRODUCT_H 45 #define ROL_LINEAROPERATORPRODUCT_H 68 Teuchos::RCP<std::vector<Teuchos::RCP<OP> > >
ops_;
73 Teuchos::RCP<OP> &B) {
74 ops_ = Teuchos::rcp(
new std::vector<OP> > );
81 Teuchos::RCP<OP> &C) {
82 ops_ = Teuchos::rcp(
new std::vector<OP> > );
89 for( size_type i=0; i<ops_->size(); ++i ) {
90 (*ops_)[i]->update(x,flag,
true);
96 for( size_type i=0; i<ops_->size(); ++i ) {
97 (*ops_)[i]->apply(Hv,Hv,tol);
103 for( size_type i=ops_->size()-1; i>=0; --i ) {
104 (*ops_)[i]->applyInverse(Hv,Hv,tol);
112 #endif // ROL_LINEAROPERATORPRODUCT_H LinearOperatorSum(Teuchos::RCP< OP > &A, Teuchos::RCP< OP > &B, Teuchos::RCP< OP > &C)
virtual void update(const Vector< Real > &x, bool flag=true, int iter=-1)
Update linear operator.
Defines the linear algebra or vector space interface.
virtual void apply(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply linear operator.
LinearOperator< Real > OP
Teuchos::RCP< std::vector< Teuchos::RCP< OP > > > ops_
Provides the interface to the sequential application of linear operators.
std::vector< Teuchos::RCP< OP > >::size_type size_type
virtual void applyInverse(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply inverse of linear operator.
Provides the interface to apply a linear operator.
virtual void set(const Vector &x)
Set where .
LinearOperatorSum(Teuchos::RCP< OP > &A, Teuchos::RCP< OP > &B)