10 #include <Tpetra_Core.hpp>
18 int main(
int argc,
char* argv[])
28 out = Teuchos::VerboseObjectBase::getDefaultOStream();
31 Tpetra::ScopeGuard tpetraScope(&argc,&argv);
38 std::string inputFile =
"";
39 std::string extraParams =
"";
42 CommandLineProcessor clp(
false);
43 clp.addOutputSetupOptions(
true);
44 clp.setOption(
"input-file", &inputFile,
"Input file [Required].",
true );
45 clp.setOption(
"extra-params", &extraParams,
"Extra parameters overriding the parameters read in from --input-file");
47 "Testing program for Tpetra-Belos linear solvers access through Thyra."
50 CommandLineProcessor::EParseCommandLineReturn parse_return = clp.parse(argc,argv);
51 if( parse_return != CommandLineProcessor::PARSE_SUCCESSFUL )
return parse_return;
54 if(verbose) *out <<
"\nReading parameters from XML file \""<<inputFile<<
"\" ...\n";
55 Teuchos::updateParametersFromXmlFile(inputFile, Teuchos::inOutArg(paramList));
56 if(extraParams.length()) {
57 if(verbose) *out <<
"\nAppending extra parameters from the XML string \""<<extraParams<<
"\" ...\n";
58 Teuchos::updateParametersFromXmlString(extraParams, Teuchos::inOutArg(paramList));
63 ¶mList, dumpAll, verbose?&*out:0
71 if(success) *out <<
"\nCongratulations! All of the tests checked out!\n";
72 else *out <<
"\nOh no! At least one of the tests failed!\n";
75 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.