47#ifndef MUELU_ML2MUELUPARAMETERTRANSLATOR_HPP
48#define MUELU_ML2MUELUPARAMETERTRANSLATOR_HPP
53#include <Teuchos_ParameterList.hpp>
54#include <Teuchos_XMLParameterListCoreHelpers.hpp>
88 static std::string
translate(Teuchos::ParameterList & paramList,
const std::string& defaultVals=
"") {
96 static std::string
translate(
const std::string & xmlFileName,
const std::string& defaultVals=
"") {
97 Teuchos::RCP<Teuchos::ParameterList> paramList = Teuchos::getParametersFromXmlFile(xmlFileName);
112 static std::string
SetParameterList(
const Teuchos::ParameterList & paramList_in,
const std::string& defaultVals);
121 static std::string
GetSmootherFactory(
const Teuchos::ParameterList& paramList, Teuchos::ParameterList& adaptingParamList,
const std::string& pname,
const std::string& value);
130 static inline std::string &
ltrim(std::string &s) {
131 s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](
int c){return !std::isspace(c);}));
136 static inline std::string &
rtrim(std::string &s) {
137 s.erase(std::find_if(s.rbegin(), s.rend(), [](
int c){return !std::isspace(c);}).base(), s.end());
142 static inline std::string &
trim(std::string &s) {
Class that accepts ML-style parameters and builds a MueLu parameter list (easy input deck)
ML2MueLuParameterTranslator()
Constructor.
static std::string & trim(std::string &s)
static std::string translate(const std::string &xmlFileName, const std::string &defaultVals="")
: Translate ML parameters to MueLu parameter XML string
static std::string & ltrim(std::string &s)
static std::string SetParameterList(const Teuchos::ParameterList ¶mList_in, const std::string &defaultVals)
: Interpret parameter list
static std::string translate(Teuchos::ParameterList ¶mList, const std::string &defaultVals="")
: Translate ML parameters to MueLu parameter XML string
virtual ~ML2MueLuParameterTranslator()
Destructor.
static std::string GetSmootherFactory(const Teuchos::ParameterList ¶mList, Teuchos::ParameterList &adaptingParamList, const std::string &pname, const std::string &value)
: Helper function which translates ML smoother/solver paramters to MueLu XML string
static std::string & rtrim(std::string &s)
Namespace for MueLu classes and methods.