44 #ifndef ROL_BLOCKOPERATOR2DETERMINANT_H 45 #define ROL_BLOCKOPERATOR2DETERMINANT_H 75 Teuchos::RCP<V> &scratch ) :
76 A_(A), B_(B), C_(C), D_(D), scratch_(scratch) {}
80 A_->update(x,flag,
true);
81 B_->update(x,flag,
true);
82 C_->update(x,flag,
true);
83 D_->update(x,flag,
true);
88 B_->apply(*scratch_,v,tol);
89 D_->applyInverse(Hv,*scratch_,tol);
90 C_->apply(*scratch_,Hv,tol);
92 Hv.
axpy(-1.0,*scratch_);
97 TEUCHOS_TEST_FOR_EXCEPTION(
true , std::logic_error,
98 ">>> ERROR (ROL_BlockOperator2Determinant, applyInverse): " 106 #endif // ROL_BLOCKOPERATOR2DETERMINANT_H
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
LinearOperator< Real > OP
BlockOperator2Determinant(Teuchos::RCP< OP > &A, Teuchos::RCP< OP > &B, Teuchos::RCP< OP > &C, Teuchos::RCP< OP > &D, Teuchos::RCP< V > &scratch)
Provides the interface to the block determinant of a 2x2 block operator
Defines the linear algebra or vector space interface.
Teuchos::RCP< V > scratch_
Provides the interface to apply a linear operator.
virtual void update(const Vector< Real > &x, bool flag=true, int iter=-1)
Update linear operator.
virtual void applyInverse(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply inverse of linear operator.
virtual void apply(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply linear operator.