73 int main(
int argc,
char* argv[])
77 MPI_Init(&argc, &argv);
79 MPI_Comm_rank( MPI_COMM_WORLD, &procRank );
96 My_CLP.
setOption(
"iterations", &NumIters,
"Number of iterations");
98 double Tolerance = 1e-10;
99 My_CLP.
setOption(
"tolerance", &Tolerance,
"Tolerance");
101 std::string
Solver =
"GMRES";
102 My_CLP.
setOption(
"solver", &Solver,
"Linear solver");
105 My_CLP.
setOption(
"precondition",
"no-precondition",
106 &Precondition,
"Preconditioning flag");
108 const int num_speed_values = 3;
110 const char* speed_opt_names[] = {
"slow",
"medium",
"fast" };
114 num_speed_values, speed_opt_values, speed_opt_names,
115 "Speed of our solver"
140 parseReturn= My_CLP.
parse( argc, argv );
158 std::cout <<
"\nPrinting help message with new values of command-line arguments ...\n\n";
165 std::cout <<
"\nPrinting user options after parsing ...\n\n";
166 std::cout <<
"NumIters = " << NumIters << std::endl;
167 std::cout <<
"Tolerance = " << Tolerance << std::endl;
168 std::cout <<
"Solver = \"" << Solver <<
"\"\n";
169 std::cout <<
"Precondition = " << Precondition << std::endl;
170 std::cout <<
"Speed = " << Speed << std::endl;
void recogniseAllOptions(const bool &recogniseAllOptions)
void printHelpMessage(const char program_name[], std::ostream &out) const
void setOption(const char option_true[], const char option_false[], bool *option_val, const char documentation[]=NULL)
int main(int argc, char *argv[])
EParseCommandLineReturn parse(int argc, char *argv[], std::ostream *errout=&std::cerr) const
void throwExceptions(const bool &throwExceptions)
std::string Teuchos_Version()