mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
remove macro EWOMS_PARAM_IS_SET macro
it simplifies nothing, only obscures. remove unused different propTagName and use paramName.
This commit is contained in:
parent
81c62e18f2
commit
4f6bc9280d
@ -132,17 +132,6 @@
|
|||||||
#define EWOMS_GET_PARAM_LISTS(TypeTag, UsedParamList, UnusedParamList) \
|
#define EWOMS_GET_PARAM_LISTS(TypeTag, UsedParamList, UnusedParamList) \
|
||||||
(::Opm::Parameters::getLists<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 Opm {
|
||||||
namespace Parameters {
|
namespace Parameters {
|
||||||
|
|
||||||
@ -978,9 +967,14 @@ public:
|
|||||||
ParamsMeta::clear();
|
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>
|
template <class ParamType>
|
||||||
static bool isSet([[maybe_unused]] const char* propTagName,
|
static bool isSet(const char* paramName,
|
||||||
[[maybe_unused]] const char* paramName,
|
|
||||||
bool errorIfNotRegistered = true)
|
bool errorIfNotRegistered = true)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -988,7 +982,7 @@ public:
|
|||||||
// make sure that the parameter is used consistently. since
|
// make sure that the parameter is used consistently. since
|
||||||
// this is potentially quite expensive, it is only done if
|
// this is potentially quite expensive, it is only done if
|
||||||
// debugging code is not explicitly turned off.
|
// debugging code is not explicitly turned off.
|
||||||
check_(Dune::className<ParamType>(), propTagName, paramName);
|
check_(Dune::className<ParamType>(), paramName, paramName);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (errorIfNotRegistered) {
|
if (errorIfNotRegistered) {
|
||||||
@ -1141,10 +1135,9 @@ void reset()
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class TypeTag, class ParamType>
|
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,
|
return Param<TypeTag>::template isSet<ParamType>(paramName,
|
||||||
paramName,
|
|
||||||
errorIfNotRegistered);
|
errorIfNotRegistered);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user