51 const int local_num_options = 4;
54 INITIALIZATION_METHOD,
60 const char* local_SOptions[local_num_options] = {
61 "initialization_method",
69 namespace MoochoPack {
73 ,
const char opt_grp_name[] )
74 : OptionsFromStreamPack::SetOptionsFromStreamNode(
75 opt_grp_name, local_num_options, local_SOptions )
76 , OptionsFromStreamPack::SetOptionsToTargetBase<
85 case INITIALIZATION_METHOD:
87 const std::string &option = option_value.c_str();
88 if( option ==
"SCALE_IDENTITY" )
89 target().initialization_method( target_t::SCALE_IDENTITY );
90 else if( option ==
"SCALE_DIAGONAL" )
91 target().initialization_method( target_t::SCALE_DIAGONAL );
92 else if( option ==
"SCALE_DIAGONAL_ABS" )
93 target().initialization_method( target_t::SCALE_DIAGONAL_ABS );
95 throw std::invalid_argument(
"Error, incorrect value for "
96 "\"initialization_method\"." );
100 target().max_cond(std::fabs(std::atof(option_value.c_str())));
106 target().step_scale(std::fabs(std::atof(option_value.c_str())));
InitFinDiffReducedHessian_StepSetOptions(InitFinDiffReducedHessian_Step *target=0, const char opt_grp_name[]="InitFinDiffReducedHessian")
Initializes the reduced hessian using a single finite difference along the null space of the constrai...
void abs(DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs)
vs_lhs = abs(vs_rhs)
void setOption(int option_num, const std::string &option_value)
Overridden from SetOptionsFromStreamNode.
InitFinDiffReducedHessian_Step & target()
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
const std::string & option_value(OptionsGroup::const_iterator &itr)