10 #ifndef ROL_BLOCKOPERATOR2_H
11 #define ROL_BLOCKOPERATOR2_H
35 ROL::Ptr<std::vector<ROL::Ptr<OP> > >
ops_;
40 ROL::Ptr<OP> &a21, ROL::Ptr<OP> &a22 ) {
46 ops_ = ROL::makePtr<vector<ROL::Ptr<OP> >>();
52 bkop_ = ROL::makePtr<BlockOperator<Real>>(
ops_);
57 void apply(
V &Hv,
const V &v, Real &tol )
const {
58 bkop_->apply(Hv,v,tol);
64 ROL_TEST_FOR_EXCEPTION(
true , std::logic_error,
65 ">>> ERROR (ROL_BlockOperator2, applyInverse): "
70 ROL::Ptr<LinearOperator<Real> >
getOperator(
int row,
int col )
const {
72 if( 0<=dex && dex<=3 ) {
76 ROL_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
77 ">>> ERROR (ROL_BlockOperator2, getOperator): "
78 "invalid block indices.");
88 #endif // ROL_BLOCKOPERATOR2_H
PartitionedVector< Real > PV
Defines the linear algebra of vector space on a generic partitioned vector.
Defines the linear algebra or vector space interface.
void applyInverse(V &Hv, const V &v, Real &tol) const
Apply inverse of linear operator.
LinearOperator< Real > OP
BlockOperator2(ROL::Ptr< OP > &a11, ROL::Ptr< OP > &a12, ROL::Ptr< OP > &a21, ROL::Ptr< OP > &a22)
ROL::Ptr< std::vector< ROL::Ptr< OP > > > ops_
void apply(V &Hv, const V &v, Real &tol) const
Apply linear operator.
Provides the interface to apply a linear operator.
Provides the interface to apply a 2x2 block operator to a partitioned vector.
ROL::Ptr< LinearOperator< Real > > getOperator(int row, int col) const