From a90e53a7223d1444f716e18733cb025178b1f01d Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Wed, 11 Mar 2020 20:11:32 +0100 Subject: [PATCH] [cleanup] Remove deprecated parameter interfaces --- dumux/common/parameters.hh | 57 -------------------------------------- 1 file changed, 57 deletions(-) diff --git a/dumux/common/parameters.hh b/dumux/common/parameters.hh index 1e6733594e..8e6e2637d7 100644 --- a/dumux/common/parameters.hh +++ b/dumux/common/parameters.hh @@ -261,47 +261,6 @@ public: return commandLineArgs; } - [[deprecated("parseCommandLineArguments is deprecated and will be removed after 3.1")]] - static std::string parseCommandLineArguments(int argc, char **argv, - std::string parameterFileName = "") - { - for (int i = 1; i < argc; ++i) - { - if (argv[i][0] != '-' && i == 1) - { - // try to pass first argument as parameter file - parameterFileName = argv[1]; - continue; - } - - if (argv[i][0] != '-') - DUNE_THROW(ParameterException, "-> Command line argument " << i << " (='" << argv[i] << "') is invalid. <-"); - - if (i+1 == argc) - DUNE_THROW(ParameterException, "-> No argument given for parameter '" << argv[i] << "'! <-"); - - // check for the ParameterFile argument - if (argv[i]+1 == std::string("ParameterFile")) // +1 removes the '-' - { - parameterFileName = argv[i+1]; - ++i; - } - - // add all other options as key value pairs - else - { - // read a -MyOpt VALUE option - std::string paramName = argv[i]+1; // +1 removes the '-' - std::string paramValue = argv[i+1]; - ++i; // In the case of '-MyOpt VALUE' each pair counts as two arguments - - // Put the key=value pair into the parameter tree - paramTree_()[paramName] = paramValue; - } - } - return parameterFileName; - } - /*! * \brief Get the parameter tree * @@ -402,22 +361,6 @@ private: } }; -/*! - * \ingroup Common - * \brief a free function to set model- or problem-specific default parameters - */ -[[deprecated("Setting parameters is deprecated and will be removed after 3.1")]] -void setParam(Dune::ParameterTree& params, - const std::string& group, - const std::string& key, - const std::string& value) -{ - if(group.empty()) - params[key] = value; - else - params[group + "." + key] = value; -} - /*! * \ingroup Common * \brief A free function to get a parameter from the parameter tree singleton -- GitLab