44 #include "IterationPack_AlgorithmSetOptions.hpp" 45 #include "Teuchos_Assert.hpp" 50 const int local_num_options = 1;
56 const char* local_SOptions[local_num_options] = {
61 std::string remove_quotes(
const std::string &option_name,
const std::string &str )
63 TEUCHOS_TEST_FOR_EXCEPTION(
64 str[0]!=
'\"' || str[str.length()-1]!=
'\"', std::logic_error
65 ,
"Error, the option \'" << option_name <<
"\' must have a single set of quotes around it!" 68 return std::string(
"");
69 return str.substr(1,str.length()-2);
78 ,
const char opt_grp_name[] )
80 opt_grp_name, local_num_options, local_SOptions )
86 int option_num,
const std::string& option_value )
89 switch( (local_EOptions)option_num ) {
90 case INTERRUPT_FILE_NAME :
91 target().interrupt_file_name(remove_quotes(
"interrupt_file_name",option_value));
94 TEUCHOS_TEST_FOR_EXCEPT(
true);
AlgorithmSetOptions(Algorithm *target=0, const char opt_grp_name[]="IterationPack_Algorithm")
Acts as the central hub for an iterative algorithm.
void setOption(int option_num, const std::string &option_value)
Overridden from SetOptionsFromStreamNode.