10#ifndef MUELU_PARAMETERLISTUTILS_HPP
11#define MUELU_PARAMETERLISTUTILS_HPP
16#include <Teuchos_ParameterList.hpp>
17#include <Teuchos_RCPDecl.hpp>
23void MergeParameterList(
const Teuchos::ParameterList& source, Teuchos::ParameterList& dest,
bool overWrite);
25void CreateSublists(
const Teuchos::ParameterList& List, Teuchos::ParameterList& newList);
28const Teuchos::ParameterList&
GetMLSubList(
const Teuchos::ParameterList& paramList,
const std::string& type,
int levelID);
31Teuchos::RCP<Teuchos::ParameterList>
ExtractSetOfParameters(
const Teuchos::ParameterList& paramList,
const std::string& str);
38void replaceAll(std::string& str,
const std::string& from,
const std::string& to);
41template <
typename Type>
49template <
typename Type>
54 if (mlParams.isParameter(paramName)) varName = mlParams.get<Type>(paramName);
56 std::stringstream placeholder;
57 placeholder <<
"$" << paramName <<
"$";
59 return MueLu::replacePlaceholder<Type>(str, placeholder.str(), varName);
Namespace for MueLu classes and methods.
void CreateSublists(const Teuchos::ParameterList &List, Teuchos::ParameterList &newList)
Teuchos::RCP< Teuchos::ParameterList > ExtractSetOfParameters(const Teuchos::ParameterList ¶mList, const std::string &str)
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)