47 #include "MoochoPack_LineSearchWatchDog_StepSetOptions.hpp"
48 #include "OptionsFromStreamPack_StringToBool.hpp"
53 const int local_num_options = 2;
55 const char options_group_name[] =
"LineSearchWatchDog";
62 const char* local_SOptions[local_num_options] = {
63 "opt_kkt_err_threshold",
64 "feas_kkt_err_threshold"
69 namespace MoochoPack {
72 LineSearchWatchDog_Step* target )
73 : OptionsFromStreamPack::SetOptionsFromStreamNode(
74 options_group_name, local_num_options, local_SOptions )
75 , OptionsFromStreamPack::SetOptionsToTargetBase<
76 LineSearchWatchDog_Step >( target )
80 int option_num,
const std::string& option_value )
82 switch( (local_EOptions)option_num ) {
83 case OPT_KKT_ERR_THESHOLD: {
84 target().opt_kkt_err_threshold( ::fabs( ::atof( option_value.c_str() ) ) );
87 case FEAS_KKT_ERR_THESHOLD: {
88 target().feas_kkt_err_threshold( ::fabs( ::atof( option_value.c_str() ) ) );
void setOption(int option_num, const std::string &option_value)
Overridden from SetOptionsFromStreamNode.
LineSearchWatchDog_StepSetOptions(LineSearchWatchDog_Step *target=0)
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)