51 namespace MoochoPack {
57 convergence_strategy_(convergence_strategy)
68 "Don't have a valid convergence_strategy in CheckConvergenceStd_AddedStep\n"
74 std::ostream&
out = algo.track().journal_out();
82 const bool found_solution = convergence_strategy_->Converged(_algo);
86 if( static_cast<int>(olevel) > static_cast<int>(
PRINT_NOTHING) )
87 out <<
"\nJackpot! Found the solution!!!!!! (k = " << algo.state().k() <<
")\n";
92 if( static_cast<int>(olevel) > static_cast<int>(
PRINT_NOTHING) )
93 out <<
"\nHave not found the solution yet, have to keep going (k = " << algo.state().k() <<
") :-(\n";
101 , std::ostream&
out,
const std::string& L )
const
106 "Don't have a valid convergence_strategy in CheckConvergenceStd_AddedStep\n"
109 convergence_strategy_->print_step(algo, out, L);
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
rSQP Algorithm control class.
bool do_step(Algorithm &algo, poss_type step_poss, IterationPack::EDoStepType type, poss_type assoc_step_poss)
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
EJournalOutputLevel
enum for journal output.
CheckConvergenceStd_AddedStep(Teuchos::RCP< CheckConvergence_Strategy > convergence_strategy)
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.
Acts as the central hub for an iterative algorithm.
NLPAlgo & rsqp_algo(Algorithm &algo)
Convert from a Algorithm to a NLPAlgo.