Merge pull request #886 from akva2/remove_macro_ewoms_get_param_lists

remove EWOMS_GET_PARAM_LISTS macro
This commit is contained in:
Bård Skaflestad 2024-04-03 23:42:19 +02:00 committed by GitHub
commit 8370e90f44
2 changed files with 7 additions and 12 deletions

View File

@ -109,17 +109,6 @@
getPropValue<TypeTag, Properties::ParamName>(), \
/*errorIfNotRegistered=*/false))
/*!
* \ingroup Parameter
*
* \brief Retrieves the lists of parameters specified at runtime and their values.
*
* The two arguments besides the TypeTag are assumed to be STL containers which store
* std::pair<std::string, std::string>.
*/
#define EWOMS_GET_PARAM_LISTS(TypeTag, UsedParamList, UnusedParamList) \
(::Opm::Parameters::getLists<TypeTag>(UsedParamList, UnusedParamList))
namespace Opm {
namespace Parameters {
@ -1088,6 +1077,12 @@ const ParamType get(const char *propTagName, const char *paramName, const ParamT
return Param<TypeTag>::template get<ParamType>(propTagName, paramName, defaultValue, errorIfNotRegistered);
}
/*!
* \brief Retrieves the lists of parameters specified at runtime and their values.
*
* The two arguments besides the TypeTag are assumed to be STL containers which store
* std::pair<std::string, std::string>.
*/
template <class TypeTag, class Container>
void getLists(Container& usedParams, Container& unusedParams)
{

View File

@ -181,7 +181,7 @@ static inline int setupParameters_(int argc,
ParamList usedParams;
ParamList unusedParams;
EWOMS_GET_PARAM_LISTS(TypeTag, usedParams, unusedParams);
Parameters::getLists<TypeTag>(usedParams, unusedParams);
if (!allowUnused && !unusedParams.empty()) {
if (myRank == 0) {
if (unusedParams.size() == 1)