From e4177239ce4786b1db67c0b7b131fdd6beb79ac4 Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Wed, 29 Jan 2020 17:05:49 +0100 Subject: [PATCH] [params] Rename getSubGroups to getParamSubGroups --- dumux/common/parameters.hh | 7 ++++--- dumux/linear/istlsolverfactorybackend.hh | 10 +++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/dumux/common/parameters.hh b/dumux/common/parameters.hh index 4ae00d23f8..1e6733594e 100644 --- a/dumux/common/parameters.hh +++ b/dumux/common/parameters.hh @@ -459,8 +459,9 @@ inline bool hasParamInGroup(const std::string& paramGroup, const std::string& pa * \brief Get a list of sub groups from the parameter tree sorted by relevance * \return A vector of fully qualified subGroup names sorted by descending relevance. */ -inline std::vector<std::string> getSubGroups(const std::string& paramGroup, const std::string& subGroupName) -{ return Parameters::getTree().getSubGroups(subGroupName, paramGroup); } -} // namespace Dumux +inline std::vector<std::string> getParamSubGroups(const std::string& subGroupName, const std::string& paramGroup) +{ return Parameters::getTree().getSubGroups(subGroupName, paramGroup); } + +} // end namespace Dumux #endif diff --git a/dumux/linear/istlsolverfactorybackend.hh b/dumux/linear/istlsolverfactorybackend.hh index 3c5d9706d3..c01afb3a6b 100644 --- a/dumux/linear/istlsolverfactorybackend.hh +++ b/dumux/linear/istlsolverfactorybackend.hh @@ -166,15 +166,15 @@ private: void convertParameterTree_(const std::string& paramGroup="") { const auto& loggingTree = Parameters::getTree(); - auto matchingGroups = loggingTree.getSubGroups("LinearSolver", paramGroup); + auto linearSolverGroups = getParamSubGroups("LinearSolver", paramGroup); for (const auto& [istlKey, dumuxKey] : istlToDumuxSolverParams) { - for (const auto fullGroup : matchingGroups) + for (const auto& group : linearSolverGroups) { - auto istlName = fullGroup + "." + istlKey; - auto dumuxName = fullGroup + "." + dumuxKey; - if(loggingTree.hasKeyOrDefaultKey(dumuxName)) + auto istlName = group + "." + istlKey; + auto dumuxName = group + "." + dumuxKey; + if (loggingTree.hasKeyOrDefaultKey(dumuxName)) { if(loggingTree.hasKeyOrDefaultKey(istlName)) { -- GitLab