10 #ifndef ROL_BLOCKOPERATOR2UNITUPPER_H
11 #define ROL_BLOCKOPERATOR2UNITUPPER_H
45 void apply(
V &Hv,
const V &v, Real &tol )
const {
48 PV &Hv_pv =
dynamic_cast<PV&
>(Hv);
49 const PV &v_pv =
dynamic_cast<const PV&
>(v);
51 ROL::Ptr<V> Hv1 = Hv_pv.get(0);
52 ROL::Ptr<V> Hv2 = Hv_pv.get(1);
53 ROL::Ptr<const V> v1 = v_pv.get(0);
54 ROL::Ptr<const V> v2 = v_pv.get(1);
56 B_->apply(*Hv1,*v2,tol);
65 PV &Hv_pv =
dynamic_cast<PV&
>(Hv);
66 const PV &v_pv =
dynamic_cast<const PV&
>(v);
68 ROL::Ptr<V> Hv1 = Hv_pv.get(0);
69 ROL::Ptr<V> Hv2 = Hv_pv.get(1);
70 ROL::Ptr<const V> v1 = v_pv.get(0);
71 ROL::Ptr<const V> v2 = v_pv.get(1);
73 B_->apply(*Hv1,*v2,tol);
80 ROL::Ptr<LinearOperator<Real> >
getOperator(
int row,
int col )
const {
81 if( row == 0 && col == 1 ) {
85 ROL_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
86 ">>> ERROR (ROL_BlockOperator2UnitUpper, getOperator): "
87 "invalid block indices.");
97 #endif // ROL_BLOCKOPERATOR2UNITUPPER_H
PartitionedVector< Real > PV
Provides the interface to apply a 2x2 block unit upper operator to a partitioned vector.
ROL::Ptr< LinearOperator< Real > > getOperator(int row, int col) const
void applyInverse(V &Hv, const V &v Real &tol) const
Defines the linear algebra of vector space on a generic partitioned vector.
Defines the linear algebra or vector space interface.
Provides the interface to apply a linear operator.
ROL::DiagonalOperator apply
LinearOperator< Real > OP
PartitionedVector< Real > PV
BlockOperator2UnitUpper(ROL::Ptr< OP > &B)