54 namespace LinAlgOpPack {
59 namespace MoochoPack {
87 IterQuantityAccess<VectorMutable>
92 VectorMutable &rGL_k = rGL_iq.set_k(0);
94 if( nu_iq.updated_k(0) && nu_iq.get_k(0).nz() > 0 ) {
97 const Vector &nu_k = nu_iq.get_k(0);
98 VectorSpace::vec_mut_ptr_t
99 tmp = nu_k.space().create_member();
102 out <<
"\nnu_k = \n" << nu_k;
103 V_VpV( tmp.get(), Gf_iq.get_k(0), nu_k );
104 if( (
int)olevel >= (int)PRINT_VECTORS )
105 out <<
"\nGf_k+nu_k = \n" << *tmp;
107 if( (
int)ns_olevel >= (int)PRINT_VECTORS )
108 out <<
"\nrGL_k = \n" << rGL_k;
111 rGL_k = s.rGf().get_k(0);
118 out <<
"\n||rGL_k||inf = " << rGL_k.norm_inf() <<
"\n";
121 if( static_cast<int>(ns_olevel) >= static_cast<int>(
PRINT_VECTORS) ) {
122 out <<
"\nrGL_k = \n" << rGL_k;
131 ,std::ostream&
out,
const std::string& L
135 << L <<
"*** Evaluate the reduced gradient of the Lagrangian\n"
136 << L <<
"if nu_k is updated and nu_k.nz() > 0 then\n"
137 << L <<
" rGL_k = Z_k' * (Gf_k + nu_k) + Uz_k' * lambda_k(equ_undecomp)\n"
139 << L <<
" rGL_k = rGf_k + Uz_k' * lambda_k(equ_undecomp)\n"
void Vp_StV(VectorMutable *v_lhs, const value_type &alpha, const Vector &v_rhs)
v_lhs = alpha * v_rhs + v_lhs
rSQP Algorithm control class.
void Vp_MtV(VectorMutable *v_lhs, const MatrixOp &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const V &V_rhs2)
v_lhs += op(M_rhs1) * V_rhs2.
virtual std::ostream & journal_out() const
Return a reference to a std::ostream to be used to output debug information and the like...
EJournalOutputLevel
enum for journal output.
void V_VpV(VectorMutable *v_lhs, const V1 &V1_rhs1, const V2 &V2_rhs2)
Reduced space SQP state encapsulation interface.
void print_step(const Algorithm &algo, poss_type step_poss, IterationPack::EDoStepType type, poss_type assoc_step_poss, std::ostream &out, const std::string &leading_str) const
void print_algorithm_step(const Algorithm &algo, Algorithm::poss_type step_poss, EDoStepType type, Algorithm::poss_type assoc_step_poss, std::ostream &out)
Prints to 'out' the algorithm step.
AlgorithmTracker & track()
void Vp_StMtV(VectorMutable *v_lhs, value_type alpha, const MatrixOp &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2, value_type beta=1.0)
v_lhs = alpha * op(M_rhs1) * v_rhs2 + beta * v_lhs (BLAS xGEMV)
void V_MtV(VectorMutable *v_lhs, const MatrixOp &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const V &V_rhs2)
v_lhs = op(M_rhs1) * V_rhs2.
Acts as the central hub for an iterative algorithm.
NLPAlgoState & rsqp_state()
<<std aggr>="">> members for algo_cntr
bool do_step(Algorithm &algo, poss_type step_poss, IterationPack::EDoStepType type, poss_type assoc_step_poss)
NLPAlgo & rsqp_algo(Algorithm &algo)
Convert from a Algorithm to a NLPAlgo.
void Vp_V(VectorMutable *v_lhs, const V &V_rhs)
v_lhs += V_rhs.