mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-25 18:50:19 -06:00
Merge pull request #885 from akva2/remove_ewoms_param_is_set_macro
remove macro EWOMS_PARAM_IS_SET macro
This commit is contained in:
commit
a2ff5e98ee
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user