44 #ifndef ROL_PRIMALDUALSYSTEMSTEP_H 45 #define ROL_PRIMALDUALSYSTEMSTEP_H 49 #include "ROL_SchurComplememt.hpp" 84 static const size_type
OPT = 0;
85 static const size_type
EQUAL = 1;
86 static const size_type
LOWER = 2;
87 static const size_type
UPPER = 3;
98 Teuchos::RCP<OP11>
A_;
99 Teuchos::RCP<OP12>
B_;
100 Teuchos::RCP<OP21>
C_;
101 Teuchos::RCP<OP22>
D_;
117 using Teuchos::RCP;
using Teuchos::rcp;
118 PV &x_pv = Teuchos::dyn_cast<PV>(x);
122 RCP<V> temp[] = {xlambda,z};
124 return rcp(
new PV( std::vector<RCP<V> >(temp,temp+2) ) );
130 const PV &x_pv = Teuchos::dyn_cast<
const PV>(x);
134 RCP<const V> temp[] = {xlambda,z};
136 return rcp(
new PV( std::vector<RCP<const V> >(temp,temp+2) ) );
150 Teuchos::RCP<V> &scratch1 ) :
Step<Real>(),
151 krylov_(krylov), secant_(secant), scratch1_(scratch1), schur_(Teuchos::null),
152 op_(Teuchos::null), useSchurComplement_(false) {
154 PL &iplist = parlist.sublist(
"Step").sublist(
"Primal Dual Interior Point");
155 PL &syslist = iplist.sublist(
"System Solver");
157 useSchurComplement_ = syslist.get(
"Use Schur Complement",
false);
162 Teuchos::RCP<V> &scratch1_ ) :
Step<Real>() {
167 OBJ &obj, CON &con, BND &bnd, AS &algo_state ) {
173 using Teuchos::rcpFromRef;
175 RCP<OBJ> pObj = rcpFromRef(obj);
176 RCP<CON> pCon = rcpFromRef(con);
177 RCP<BND> pBnd = rcpFromRef(bnd);
181 RCP<V> xlambda = x_pv->get(OPTMULT);
182 RCP<V> z = x_pv->get(BNDMULT);
184 A_ = rcp(
new OP11( pObj, pCon, *xlambda, scratch1_ ) );
185 B_ = rcp(
new OP12( ) );
186 C_ = rcp(
new OP21( *z ) );
187 D_ = rcp(
new OP22( pBnd, *xlambda ) );
189 if( useSchurComplement_ ) {
190 schur_ = rcp(
new SCHUR(A_,B_,C_,D_,scratch1_) );
197 void compute( V &s,
const V &x,
const V &res, OBJ &obj, CON &con,
198 BND &bnd, AS &algo_state ) {
203 if( useSchurComplement_ ) {
212 RCP<V> sxl = s_pv->get(OPTMULT);
213 RCP<V> sz = s_pv->get(BNDMULT);
224 void update( V &x, V &res,
const V &s, OBJ &obj, CON &con,
225 BND &bnd, AS &algo_state ) {
237 #endif // ROL_PRIMALDUALSYSTEMSTEP_H Provides the interface to evaluate objective functions.
PrimalDualInteriorPointBlock22 OP22
PrimalDualInteriorPointBlock21 OP21
AlgorithmState< Real > AS
PrimalDualSystemStep(Teuchos::ParameterList &parlist, Teuchos::RCP< V > &scratch1_)
static const size_type OPTMULT
Provides the interface to compute optimization steps.
Defines the linear algebra of vector space on a generic partitioned vector.
Teuchos::RCP< const PV > repartition(const V &x)
PartitionedVector< Real > PV
void initialize(V &x, const V &g, V &res, const V &c, OBJ &obj, CON &con, BND &bnd, AS &algo_state)
Initialize step with equality constraint.
Teuchos::RCP< StepState< Real > > getState(void)
Teuchos::RCP< const Vector< Real > > get(size_type i) const
Teuchos::RCP< V > scratch1_
static const size_type UPPER
Teuchos::RCP< Vector< Real > > CreatePartitionedVector(const Teuchos::RCP< Vector< Real > > &a)
Provides the interface to compute approximate solutions to 2x2 block systems arising from primal-dual...
Teuchos::RCP< SCHUR > schur_
Defines the linear algebra or vector space interface.
static const size_type OPT
static const size_type LOWER
State for algorithm class. Will be used for restarts.
Teuchos::RCP< PV > repartition(V &x)
int flagKrylov_
Termination flag for Krylov method (used for inexact Newton)
Defines the equality constraint operator interface.
static const size_type BNDMULT
Provides interface for and implements limited-memory secant operators.
void update(V &x, V &res, const V &s, OBJ &obj, CON &con, BND &bnd, AS &algo_state)
Update step, if successful (equality constraints).
PrimalDualSystemStep(Teuchos::ParameterList &parlist, const Teuchos::RCP< Krylov< Real > > &krylov, const Teuchos::RCP< Secant< Real > > &secant, Teuchos::RCP< V > &scratch1)
int iterKrylov_
Number of Krylov iterations (used for inexact Newton)
Provides definitions for Krylov solvers.
static const size_type EQUAL
Provides the interface to apply upper and lower bound constraints.
Teuchos::RCP< V > scratch_
SchurComplement< Real > SCHUR
Provides the interface to apply a 2x2 block operator to a partitioned vector.
PrimalDualInteriorPointBlock12 OP12
virtual void initialize(Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &con, AlgorithmState< Real > &algo_state)
Initialize step with bound constraint.
Teuchos::RCP< Krylov< Real > > krylov_
BoundConstraint< Real > BND
EqualityConstraint< Real > CON
PrimalDualInteriorPointBlock11 OP11
Given a 2x2 block operator, perform the Schur reduction and return the decoupled system components...
void compute(V &s, const V &x, const V &res, OBJ &obj, CON &con, BND &bnd, AS &algo_state)
Compute step (equality constraints).
int verbosity_
Verbosity level.
Teuchos::RCP< Secant< Real > > secant_