66 int main(
int argc,
char* argv[])
94 RCP<ParameterList> My_List =
rcp(
new ParameterList);
99 "Determines the maximum number of iterations in the solver");
103 "The tolerance used for the convergence check");
105 RCP<StringValidator> solverValidator =
106 rcp(
new StringValidator(tuple<std::string>(
"GMRES",
"CG",
"TFQMR")));
110 "The type of solver to use.",
113 Array<double> doubleArray( 10, 0.0 );
117 "The initial guess as a RCP to an array object.");
119 ParameterList& Prec_List = My_List->sublist(
122 "Sublist that defines the preconditioner.");
124 Prec_List.set(
"Type",
"ILU",
"The tpye of preconditioner to use");
128 "The tolerance below which entries from the "
129 "factorization are left out of the factors.");
139 RCP<Teuchos::FancyOStream> out =
140 Teuchos::VerboseObjectBase::getDefaultOStream();
141 Teuchos::writeParameterListToXmlOStream(*My_List, *out);
158 std::cout <<
"The Solver Choosen was: " <<
159 currentParams->
get<std::string>(
"Solver") << std::endl;
161 std::cout <<
"The Tolerence choosen was: " <<
162 currentParams->
get<
double>(
"Tolerance") << std::endl;
164 std::cout <<
"The Preconditioner type was set to: "
165 << currentParams->
sublist(
"Preconditioner").get<std::string>(
"Type") <<
T & get(ParameterList &l, const std::string &name)
A collection of functions and an Object that serve as the primary interface to the Optika package all...
void customFunction(Teuchos::RCP< const Teuchos::ParameterList > currentParams)
RCP< ParameterList > sublist(const RCP< ParameterList > ¶mList, const std::string &name, bool mustAlreadyExist=false, const std::string &docString="")
void getInput(RCP< ParameterList > validParameters, RCP< DependencySheet > dependencySheet, void(*customFunc)(RCP< const ParameterList >))
Retreives the input for a Teuchos Parameter List using a GUI. Note the Parameter List will be edited...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
int main(int argc, char *argv[])