42 #include <Tpetra_Core.hpp>
50 int main(
int argc,
char* argv[])
60 out = Teuchos::VerboseObjectBase::getDefaultOStream();
63 Tpetra::ScopeGuard tpetraScope(&argc,&argv);
70 std::string inputFile =
"";
71 std::string extraParams =
"";
74 CommandLineProcessor clp(
false);
75 clp.addOutputSetupOptions(
true);
76 clp.setOption(
"input-file", &inputFile,
"Input file [Required].",
true );
77 clp.setOption(
"extra-params", &extraParams,
"Extra parameters overriding the parameters read in from --input-file");
79 "Testing program for Tpetra-Belos linear solvers access through Thyra."
82 CommandLineProcessor::EParseCommandLineReturn parse_return = clp.parse(argc,argv);
83 if( parse_return != CommandLineProcessor::PARSE_SUCCESSFUL )
return parse_return;
86 if(verbose) *out <<
"\nReading parameters from XML file \""<<inputFile<<
"\" ...\n";
87 Teuchos::updateParametersFromXmlFile(inputFile, Teuchos::inOutArg(paramList));
88 if(extraParams.length()) {
89 if(verbose) *out <<
"\nAppending extra parameters from the XML string \""<<extraParams<<
"\" ...\n";
90 Teuchos::updateParametersFromXmlString(extraParams, Teuchos::inOutArg(paramList));
95 ¶mList, dumpAll, verbose?&*out:0
103 if(success) *out <<
"\nCongratulations! All of the tests checked out!\n";
104 else *out <<
"\nOh no! At least one of the tests failed!\n";
107 return ( success ? EXIT_SUCCESS : EXIT_FAILURE );
int main(int argc, char *argv[])
#define TEUCHOS_STANDARD_CATCH_STATEMENTS(VERBOSE, ERR_STREAM, SUCCESS_FLAG)
bool test_tpetra_stratimikos_solver(Teuchos::ParameterList *paramList, const bool dumpAll, Teuchos::FancyOStream *out)
Testing function for a single tpetra stratimikos solver for a single matrix.