51int main(
int argc,
char* argv[])
69 myPL.set(
"Max Iters", 1550,
"Determines the maximum number of iterations in the solver");
70 myPL.set(
"Tolerance", 1e-10,
"The tolerance used for the convergence check");
74 RCP<Teuchos::StringToIntegralParameterEntryValidator<int> >
84 ,
"The type of solver to use"
92 myPL.set(
"Tolerance", as<float>(1e-10),
"The tolerance used for the convergence check");
100 myPL.set<Array<double> >(
"Initial Guess", tuple<double>( 10, 0.0 ),
101 "The initial guess as a RCP to an array object.");
107 ParameterList& Prec_List = myPL.sublist(
"Preconditioner",
false,
108 "Sublist that defines the preconditioner.");
111 Prec_List.set(
"Type",
"ILU",
"The tpye of preconditioner to use");
112 Prec_List.set(
"Drop Tolerance", 1e-3,
113 "The tolerance below which entries from the\n""factorization are left out of the factors.");
117 bool solver_defined =
false, prec_defined =
false, dtol_double =
false;
118 solver_defined = myPL.isParameter(
"Solver");
121 prec_defined = myPL.isSublist(
"Preconditioner");
124 bool tol_double =
false;
125 tol_double = myPL.INVALID_TEMPLATE_QUALIFIER isType<double>(
"Tolerance");
134 its = myPL.get(
"Max Iters", 1200);
138 tol = myPL.get<
float>(
"Tolerance");
142 solver = solverValidator->validateString(
147 Array<double> init_guess = myPL.get<Array<double> >(
"Initial Guess");
149 std::cout <<
"\n# Printing this parameter list using opeator<<(...) ...\n\n";
150 std::cout << myPL << std::endl;
152 std::cout <<
"\n# Printing the parameter list only showing documentation fields ...\n\n";
153 myPL.print(std::cout,
154 ParameterList::PrintOptions().showDoc(
true).indent(2).showTypes(
true));
161 std::cout <<
"\n# Showing unused parameters ...\n\n";
162 myPL.unused( std::cout );
167 return ( success ? EXIT_SUCCESS : EXIT_FAILURE );