44 #ifndef ROL_BLOCKOPERATOR2UNITLOWER_H 45 #define ROL_BLOCKOPERATOR2UNITLOWER_H 79 void apply(
V &Hv,
const V &v, Real &tol )
const {
82 PV &Hv_pv = Teuchos::dyn_cast<
PV>(Hv);
83 const PV &v_pv = Teuchos::dyn_cast<
const PV>(v);
85 RCP<V> Hv1 = Hv_pv.get(0);
86 RCP<V> Hv2 = Hv_pv.get(1);
87 RCP<const V> v1 = v_pv.get(0);
88 RCP<const V> v2 = v_pv.get(1);
91 C_->apply(*Hv2,*v1,tol);
99 PV &Hv_pv = Teuchos::dyn_cast<
PV>(Hv);
100 const PV &v_pv = Teuchos::dyn_cast<
const PV>(v);
102 RCP<V> Hv1 = Hv_pv.get(0);
103 RCP<V> Hv2 = Hv_pv.get(1);
104 RCP<const V> v1 = v_pv.get(0);
105 RCP<const V> v2 = v_pv.get(1);
108 C_->apply(*Hv2,*v1,tol);
114 Teuchos::RCP<LinearOperator<Real> >
getOperator(
int row,
int col )
const {
115 if( row == 1 && col == 0 ) {
119 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
120 ">>> ERROR (ROL_BlockOperator2UnitLower, getOperator): " 121 "invalid block indices.");
131 #endif // ROL_BLOCKOPERATOR2UNITLOWER_H PartitionedVector< Real > PV
Defines the linear algebra of vector space on a generic partitioned vector.
virtual void apply(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const =0
Apply linear operator.
Defines the linear algebra or vector space interface.
BlockOperator2UnitLower(Teuchos::RCP< OP > &C)
PartitionedVector< Real > PV
virtual void applyInverse(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply inverse of linear operator.
Provides the interface to apply a linear operator.
Teuchos::RCP< LinearOperator< Real > > getOperator(int row, int col) const
Provides the interface to apply a 2x2 block unit lower operator to a partitioned vector.
LinearOperator< Real > OP