44 #include "Moocho_ConfigDefs.hpp"
46 #ifdef HAVE_MOOCHO_MA28
48 #include "AbstractLinAlgPack_DirectSparseSolverMA28SetOptions.hpp"
49 #include "OptionsFromStreamPack_StringToBool.hpp"
54 const int local_num_options = 8;
57 ESTIMATED_FILLIN_RATIO
67 const char* local_SOptions[local_num_options] = {
68 "estimated_fillin_ratio"
80 namespace AbstractLinAlgPack {
83 DirectSparseSolverMA28* qp_solver )
84 : OptionsFromStreamPack::SetOptionsFromStreamNode(
85 "DirectSparseSolverMA28", local_num_options, local_SOptions )
86 , OptionsFromStreamPack::SetOptionsToTargetBase<
87 DirectSparseSolverMA28 >( qp_solver )
91 int option_num,
const std::string& option_value )
93 using OptionsFromStreamPack::StringToBool;
95 switch( (local_EOptions)option_num ) {
96 case ESTIMATED_FILLIN_RATIO: {
97 target().estimated_fillin_ratio( ::atof( option_value.c_str() ) );
101 target().u( ::atof( option_value.c_str() ) );
105 target().grow( StringToBool(
"grow", option_value.c_str() ) );
109 target().tol( ::atof( option_value.c_str() ) );
113 target().nsrch( ::atoi( option_value.c_str() ) );
117 target().lbig( StringToBool(
"lbig", option_value.c_str() ) );
120 case PRINT_MA28_OUTPUTS: {
121 target().print_ma28_outputs( StringToBool(
"grow", option_value.c_str() ) );
124 case OUTPUT_FILE_NAME: {
125 if( option_value ==
"NONE" )
126 target().output_file_name(
"" );
128 target().output_file_name( option_value );
138 #endif // HAVE_MOOCHO_MA28
DirectSparseSolverMA28SetOptions(DirectSparseSolverMA28 *qp_solver=0)
void setOption(int option_num, const std::string &option_value)
Overridden from SetOptionsFromStreamNode.
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)