62 virtual void printDoc(std::string
const& docString, std::ostream &out)
const {}
66 std::string
const& paramName,
67 std::string
const& sublistName
87 const std::string Direction_Doc =
"This sublist controls how direction is computed.";
90 PL_Newton.
sublist(
"Linear Solver");
104 setStringToIntegralParameter<int>(
107 "Selects the type of nonlinear solver to use",
108 tuple<std::string>(
"Line Search Based",
"Trust Region Based"),
116 linesearchMaxItersValidator =
rcp(
119 AcceptedTypes(
false).allowInt(
true).allowDouble(
true).allowString(
true)
124 ,
"The maximum number of inner linear search iterations allowed."
125 ,linesearchMaxItersValidator
131 linSolveTolValidator =
rcp(
134 AcceptedTypes(
false).allowDouble(
true).allowString(
true)
140 ,
"Select the linear solve tolerance"
141 ,linSolveTolValidator
147 elementsValidator =
rcp(
150 AcceptedTypes(
false).allowInt(
true).allowLongLong(
true).allowString(
true)
153 typedef long long LL;
155 "Elements", LL(72057594037927936ll)
156 ,
"Number of finite elements to generate"
160 return PL_Main_valid;
217 ECHO(
const bool param_isType_int1 = my_int_c_param.isType<
int>());
219 ECHO(
const bool param_isType_double1 = my_int_c_param.isType<
double>());
227 ECHO(
const int my_int = pl.
get<
int>(
"my int"));
237 ECHO(
const int my_int = pl.
get<
int>(
"my int"));
254 ECHO(
const int my_int =
getConst(pl).sublist(
"my sublist").get<int>(
"my int"));
269 ECHO(pl.
set(
"my int", 3,
"Some documentation"));
279 ECHO(pl.
set(
"my int", 3,
"Some documentation",
rcp(
new DummyValidator)));
282 TEST_NOTHROW(rcp_dynamic_cast<const DummyValidator>(my_int_param.validator(),
true));
316 ECHO(
const int my_int_1 = my_int_param.getValue<
int>(0));
346 ECHO(
char dummy_str_1[] =
"dummy str 1");
347 ECHO(pl.
set(
"dummy 1", dummy_str_1));
348 ECHO(
const std::string dummy_1 = pl.
get<std::string>(
"dummy 1"));
351 ECHO(
const char dummy_str_const_2[] =
"dummy str 2");
352 ECHO(pl.
set(
"dummy 2", dummy_str_const_2));
353 ECHO(
const std::string dummy_2 = pl.
get<std::string>(
"dummy 2"));
363 ECHO(
const std::string dummy_str =
"dummy str");
364 ECHO(pl.
set(
"my str", dummy_str));
365 ECHO(
const std::string my_str = pl.
get<std::string>(
"my str"));
379 ECHO(
char raw_str[] =
"dummy");
381 ECHO(
const char raw_c_str[] =
"dummy");
383 ECHO(
const std::string str =
"dummy");
439 ECHO(
int &my_int = pl.
get(
"my int", 3));
454 ECHO(
const bool param_was_removed_1 = pl.
remove(
"my int"));
459 ECHO(
const bool param_was_removed_2 = pl.
remove(
"my int",
false));
480 ECHO(pl.
sublist(
"my sublist",
false,
"My great sublist"));
511 ECHO(
const int my_int = pl.
sublist(
"my sublist").
get<
int>(
"my int"));
520 ECHO(
const int my_int =
getConst(pl).sublist(
"my sublist").get<int>(
"my int"));
545 const std::string Direction_Doc =
"This sublist controls how direction is computed.";
548 out <<
"PL_Main=\n" << PL_Main <<
"\n";
566 const std::string Direction_Doc =
"This sublist controls how direction is computed.";
571 out <<
"PL_Main=\n" << PL_Main <<
"\n";
591 ECHO(pl1.set(
"my int", 2));
601 ECHO(pl1.set(
"my int", 2));
617 ConstIter pl_itr = pl.
begin();
638 ConstIter pl_itr = pl.
begin();
662 A.set(
"Hello",
"World");
664 B.set(
"Hello",
"World");
705 A.set(
"Hello",
"World");
707 B.set(
"Hello",
"World");
716 A.sublist(
"Smith").set(
"People",4);
717 B.sublist(
"Jones").set(
"People",4);
745 ECHO(PL_Main.
set(
"Nonlinear Solver",
"Line Search Based"));
747 ECHO(
const int lineSearchValue = getIntegralValue<int>(PL_Main,
"Nonlinear Solver"));
749 ECHO(PL_Main.
set(
"Nonlinear Solver",
"Trust Region Based"));
750 ECHO(
const int trustRegionValue = getIntegralValue<int>(PL_Main,
"Nonlinear Solver"));