Merge pull request #885 from akva2/remove_ewoms_param_is_set_macro

remove macro EWOMS_PARAM_IS_SET macro
This commit is contained in:
Bård Skaflestad 2024-04-03 21:46:25 +02:00 committed by GitHub
commit a2ff5e98ee

View File

@ -120,17 +120,6 @@
#define EWOMS_GET_PARAM_LISTS(TypeTag, UsedParamList, UnusedParamList) \
(::Opm::Parameters::getLists<TypeTag>(UsedParamList, UnusedParamList))
/*!
* \ingroup Parameter
*
* \brief Returns true if a parameter has been specified at runtime, false
* otherwise.
*
* If the parameter in question has not been registered, this throws an exception.
*/
#define EWOMS_PARAM_IS_SET(TypeTag, ParamType, ParamName) \
(::Opm::Parameters::isSet<TypeTag, ParamType>(#ParamName, #ParamName))
namespace Opm {
namespace Parameters {
@ -966,9 +955,14 @@ public:
ParamsMeta::clear();
}
/*!
* \brief Returns true if a parameter has been specified at runtime, false
* otherwise.
*
* If the parameter in question has not been registered, this throws an exception.
*/
template <class ParamType>
static bool isSet([[maybe_unused]] const char* propTagName,
[[maybe_unused]] const char* paramName,
static bool isSet(const char* paramName,
bool errorIfNotRegistered = true)
{
@ -976,7 +970,7 @@ public:
// make sure that the parameter is used consistently. since
// this is potentially quite expensive, it is only done if
// debugging code is not explicitly turned off.
check_(Dune::className<ParamType>(), propTagName, paramName);
check_(Dune::className<ParamType>(), paramName, paramName);
#endif
if (errorIfNotRegistered) {
@ -1129,10 +1123,9 @@ void reset()
}
template <class TypeTag, class ParamType>
bool isSet(const char *propTagName, const char *paramName, bool errorIfNotRegistered = true)
bool isSet(const char* paramName, bool errorIfNotRegistered = true)
{
return Param<TypeTag>::template isSet<ParamType>(propTagName,
paramName,
return Param<TypeTag>::template isSet<ParamType>(paramName,
errorIfNotRegistered);
}