45#ifndef ROL_REDUCED_CONSTRAINT_SIMOPT_DEF_H
46#define ROL_REDUCED_CONSTRAINT_SIMOPT_DEF_H
88 adjoint_->scale(
static_cast<Real
>(-1));
189 int nupda(0), nvalu(0), njaco(0), najac(0), nhess(0), nstat(0), nadjo(0), nssen(0), nasen(0);
190 if (bman == nullPtr) {
202 auto sumAll = [bman](
int val) {
203 Real global(0), local(val);
204 bman->sumAll(&local,&global,1);
205 return static_cast<int>(global);
218 stream << std::string(80,
'=') << std::endl;
219 stream <<
" ROL::Reduced_Objective_SimOpt::summarize" << std::endl;
220 stream <<
" Number of calls to update: " << nupda << std::endl;
221 stream <<
" Number of calls to value: " << nvalu << std::endl;
222 stream <<
" Number of calls to applyJacobian: " << njaco << std::endl;
223 stream <<
" Number of calls to applyAdjointJacobian: " << najac << std::endl;
224 stream <<
" Number of calls to hessvec: " << nhess << std::endl;
225 stream <<
" Number of state solves: " << nstat << std::endl;
226 stream <<
" Number of adjoint solves: " << nadjo << std::endl;
227 stream <<
" Number of state sensitivity solves: " << nssen << std::endl;
228 stream <<
" Number of adjoint sensitivity solves: " << nasen << std::endl;
229 stream << std::string(80,
'=') << std::endl;
Defines the constraint operator interface for simulation-based optimization.
virtual void applyAdjointHessian(Vector< Real > &ahuv, const Vector< Real > &u, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply the derivative of the adjoint of the constraint Jacobian at to vector in direction ,...
const std::vector< Real > getParameter(void) const
const ROL::Ptr< Vector< Real > > dualresidual_
Reduced_Constraint_SimOpt(const ROL::Ptr< Constraint_SimOpt< Real > > &conVal, const ROL::Ptr< Constraint_SimOpt< Real > > &conRed, const ROL::Ptr< VectorController< Real > > &stateStore, const ROL::Ptr< Vector< Real > > &state, const ROL::Ptr< Vector< Real > > &control, const ROL::Ptr< Vector< Real > > &adjoint, const ROL::Ptr< Vector< Real > > &residual, bool storage=true, bool useFDhessVec=false)
Constructor.
const ROL::Ptr< Vector< Real > > dualstate_
void solve_adjoint_sensitivity(const Vector< Real > &w, const Vector< Real > &v, const Vector< Real > &z, Real &tol)
Given , the adjoint variable , and a direction , solve the adjoint sensitvity equation for .
void solve_state_sensitivity(const Vector< Real > &v, const Vector< Real > &z, Real &tol)
Given which solves the state equation and a direction , solve the state senstivity equation for .
void solve_state_equation(const Vector< Real > &z, Real &tol)
const ROL::Ptr< Vector< Real > > state_sens_
void value(Vector< Real > &c, const Vector< Real > &z, Real &tol)
Given , evaluate the equality constraint where solves .
const ROL::Ptr< Vector< Real > > dualadjoint_
const ROL::Ptr< Vector< Real > > dualcontrol_
const ROL::Ptr< Vector< Real > > residual_
void summarize(std::ostream &stream, const Ptr< BatchManager< Real > > &bman=nullPtr) const
const ROL::Ptr< VectorController< Real > > stateStore_
void applyAdjointHessian(Vector< Real > &ahwv, const Vector< Real > &w, const Vector< Real > &v, const Vector< Real > &z, Real &tol)
Given , evaluate the Hessian of the objective function in the direction .
void update(const Vector< Real > &z, bool flag=true, int iter=-1)
Update the SimOpt objective function and equality constraint.
const ROL::Ptr< Vector< Real > > adjoint_
const ROL::Ptr< Vector< Real > > dualstate1_
const ROL::Ptr< Vector< Real > > state_
const ROL::Ptr< Constraint_SimOpt< Real > > conRed_
const ROL::Ptr< VectorController< Real > > adjointStore_
void applyAdjointJacobian(Vector< Real > &ajw, const Vector< Real > &w, const Vector< Real > &z, Real &tol)
const ROL::Ptr< Vector< Real > > adjoint_sens_
const ROL::Ptr< Constraint_SimOpt< Real > > conVal_
void solve_adjoint_equation(const Vector< Real > &w, const Vector< Real > &z, Real &tol)
Given which solves the state equation, solve the adjoint equation for .
void applyJacobian(Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &z, Real &tol)
Given , apply the Jacobian to a vector where solves .
Defines the linear algebra or vector space interface.
virtual void plus(const Vector &x)=0
Compute , where .