47 #include "AbstractLinAlgPack_VectorAuxiliaryOps.hpp"
48 #include "AbstractLinAlgPack_MatrixSymDiagStd.hpp"
49 #include "AbstractLinAlgPack_VectorStdOps.hpp"
50 #include "AbstractLinAlgPack_VectorOut.hpp"
51 #include "NLPInterfacePack_NLPBarrier.hpp"
52 #include "MoochoPack_PostProcessBarrierLineSearch_Step.hpp"
53 #include "MoochoPack_IpState.hpp"
54 #include "MoochoPack_moocho_algo_conversion.hpp"
55 #include "IterationPack_print_algorithm_step.hpp"
56 #include "Teuchos_dyn_cast.hpp"
57 #include "Teuchos_Assert.hpp"
59 #define min(a,b) ( (a < b) ? a : b )
60 #define max(a,b) ( (a > b) ? a : b )
62 namespace MoochoPack {
68 barrier_nlp_(barrier_nlp)
73 "PostProcessBarrierLineSearch_Step given NULL NLPBarrier."
84 using IterationPack::print_algorithm_step;
90 EJournalOutputLevel olevel = algo.algo_cntr().journal_output_level();
94 if( static_cast<int>(olevel) >= static_cast<int>(PRINT_ALGORITHM_STEPS) )
96 using IterationPack::print_algorithm_step;
97 print_algorithm_step( _algo, step_poss, type, assoc_step_poss, out );
101 value_type& f_kp1 = s.f().set_k(+1);
104 VectorMutable& Gf_kp1 = s.Gf().set_k(+1);
107 if( static_cast<int>(olevel) >=
static_cast<int>(PRINT_ALGORITHM_STEPS) )
109 out <<
"\nf = " << f_kp1
110 <<
"\nbarrier_term = " << barrier_nlp_->
barrier_term() << std::endl;
114 if( static_cast<int>(olevel) >= static_cast<int>(PRINT_VECTORS) )
116 out <<
"Gf = \n" << Gf_kp1
124 void PostProcessBarrierLineSearch_Step::print_step(
125 const Algorithm& _algo, poss_type step_poss, IterationPack::EDoStepType type
126 ,poss_type assoc_step_poss, std::ostream& out,
const std::string& L
131 out << L <<
"# Process out the temporary barrier term used for line search\n"
132 << L <<
"f_k -= barrier_term_k\n";
bool do_step(Algorithm &algo, poss_type step_poss, IterationPack::EDoStepType type, poss_type assoc_step_poss)
value_type barrier_term() const
PostProcessBarrierLineSearch_Step(Teuchos::RCP< NLPInterfacePack::NLPBarrier > barrier_nlp)
Constructor.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
void Vp_StV(VectorMutable *v_lhs, const value_type &alpha, const Vector &v_rhs)
T_To & dyn_cast(T_From &from)
rSQP Algorithm control class.
const Teuchos::RCP< Vector > grad_objective_term() const
virtual std::ostream & journal_out() const
AlgorithmTracker & track()
value_type objective_term() const
const Teuchos::RCP< Vector > grad_barrier_term() const