44 #ifndef ROL_BLOCKOPERATOR2UNITUPPER_H
45 #define ROL_BLOCKOPERATOR2UNITUPPER_H
79 void apply(
V &Hv,
const V &v, Real &tol )
const {
82 PV &Hv_pv =
dynamic_cast<PV&
>(Hv);
83 const PV &v_pv =
dynamic_cast<const PV&
>(v);
85 ROL::Ptr<V> Hv1 = Hv_pv.get(0);
86 ROL::Ptr<V> Hv2 = Hv_pv.get(1);
87 ROL::Ptr<const V> v1 = v_pv.get(0);
88 ROL::Ptr<const V> v2 = v_pv.get(1);
90 B_->apply(*Hv1,*v2,tol);
99 PV &Hv_pv =
dynamic_cast<PV&
>(Hv);
100 const PV &v_pv =
dynamic_cast<const PV&
>(v);
102 ROL::Ptr<V> Hv1 = Hv_pv.get(0);
103 ROL::Ptr<V> Hv2 = Hv_pv.get(1);
104 ROL::Ptr<const V> v1 = v_pv.get(0);
105 ROL::Ptr<const V> v2 = v_pv.get(1);
107 B_->apply(*Hv1,*v2,tol);
114 ROL::Ptr<LinearOperator<Real> >
getOperator(
int row,
int col )
const {
115 if( row == 0 && col == 1 ) {
119 ROL_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
120 ">>> ERROR (ROL_BlockOperator2UnitUpper, getOperator): "
121 "invalid block indices.");
131 #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)