47#ifndef MUELU_PARAMETERLISTUTILS_HPP
48#define MUELU_PARAMETERLISTUTILS_HPP
53#include <Teuchos_ParameterList.hpp>
54#include <Teuchos_RCPDecl.hpp>
60 void MergeParameterList(
const Teuchos::ParameterList &source, Teuchos::ParameterList &dest,
bool overWrite);
62 void CreateSublists(
const Teuchos::ParameterList &List, Teuchos::ParameterList &newList);
65 const Teuchos::ParameterList &
GetMLSubList(
const Teuchos::ParameterList & paramList,
const std::string & type,
int levelID);
68 Teuchos::RCP<Teuchos::ParameterList>
ExtractSetOfParameters(
const Teuchos::ParameterList & paramList,
const std::string & str);
75 void replaceAll(std::string& str,
const std::string& from,
const std::string& to);
78 template<
typename Type>
86 template<
typename Type>
92 if (mlParams.isParameter(paramName)) varName = mlParams.get<Type>(paramName);
94 std::stringstream placeholder;
95 placeholder <<
"$" << paramName <<
"$";
97 return MueLu::replacePlaceholder<Type>(str, placeholder.str(), varName);
Namespace for MueLu classes and methods.
Teuchos::RCP< Teuchos::ParameterList > ExtractSetOfParameters(const Teuchos::ParameterList ¶mList, const std::string &str)
void CreateSublists(const ParameterList &List, ParameterList &newList)
void replaceAll(std::string &str, const std::string &from, const std::string &to)
bool actionInterpretParameter(Teuchos::ParameterList &mlParams, const std::string ¶mName, std::string &str)
bool replacePlaceholder(std::string &str, const std::string &placeholder, Type data)
templated version to replace placeholder by data in "str"
void MergeParameterList(const Teuchos::ParameterList &source, Teuchos::ParameterList &dest, bool overWrite)
: merge two parameter lists
const Teuchos::ParameterList & GetMLSubList(const Teuchos::ParameterList ¶mList, const std::string &type, int levelID)