44 #ifndef ROL_BLOCKOPERATOR2_H
45 #define ROL_BLOCKOPERATOR2_H
69 ROL::Ptr<std::vector<ROL::Ptr<OP> > >
ops_;
74 ROL::Ptr<OP> &a21, ROL::Ptr<OP> &a22 ) {
80 ops_ = ROL::makePtr<vector<ROL::Ptr<OP> >>();
86 bkop_ = ROL::makePtr<BlockOperator<Real>>(
ops_);
91 void apply(
V &Hv,
const V &v, Real &tol )
const {
92 bkop_->apply(Hv,v,tol);
98 ROL_TEST_FOR_EXCEPTION(
true , std::logic_error,
99 ">>> ERROR (ROL_BlockOperator2, applyInverse): "
104 ROL::Ptr<LinearOperator<Real> >
getOperator(
int row,
int col )
const {
106 if( 0<=dex && dex<=3 ) {
110 ROL_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
111 ">>> ERROR (ROL_BlockOperator2, getOperator): "
112 "invalid block indices.");
122 #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