17 int main(
int argc,
char* argv[])
28 out = Teuchos::VerboseObjectBase::getDefaultOStream();
36 std::string inputFile =
"";
37 std::string extraParams =
"";
40 CommandLineProcessor clp(
false);
41 clp.addOutputSetupOptions(
true);
42 clp.setOption(
"input-file", &inputFile,
"Input file [Required].",
true );
43 clp.setOption(
"extra-params", &extraParams,
"Extra parameters overriding the parameters read in from --input-file");
45 "Testing program for Trilinos (and non-Trilinos) linear solvers access through Thyra."
48 CommandLineProcessor::EParseCommandLineReturn parse_return = clp.parse(argc,argv);
49 if( parse_return != CommandLineProcessor::PARSE_SUCCESSFUL )
return parse_return;
52 if(verbose) *out <<
"\nReading parameters from XML file \""<<inputFile<<
"\" ...\n";
53 Teuchos::updateParametersFromXmlFile(inputFile, Teuchos::inOutArg(paramList));
54 if(extraParams.length()) {
55 if(verbose) *out <<
"\nAppending extra parameters from the XML string \""<<extraParams<<
"\" ...\n";
56 Teuchos::updateParametersFromXmlString(extraParams, Teuchos::inOutArg(paramList));
61 ¶mList, dumpAll, verbose?&*out:0
68 if(success) *out <<
"\nCongratulations! All of the tests checked out!\n";
69 else *out <<
"\nOh no! At least one of the tests failed!\n";
72 return ( success ? EXIT_SUCCESS : EXIT_FAILURE );
int main(int argc, char *argv[])
#define TEUCHOS_STANDARD_CATCH_STATEMENTS(VERBOSE, ERR_STREAM, SUCCESS_FLAG)
bool test_epetra_stratimikos_solver(Teuchos::ParameterList *paramList, const bool dumpAll, Teuchos::FancyOStream *out)
Testing function for a single epetra stratimikos solver for a single matrix.