Merge pull request #884 from akva2/remove_end_param_macro

remove EWOMS_END_PARAM_REGISTRATION macro
This commit is contained in:
Bård Skaflestad 2024-04-03 21:45:24 +02:00 committed by GitHub
commit 8044bd3136
2 changed files with 12 additions and 16 deletions

View File

@ -84,18 +84,6 @@
#define EWOMS_HIDE_PARAM(TypeTag, ParamName) \
::Opm::Parameters::hideParam<TypeTag>(#ParamName, getPropValue<TypeTag, Properties::ParamName>())
/*!
* \ingroup Parameter
*
* \brief Indicate that all parameters are registered for a given type tag.
*
* If \c EWOMS_REGISTER_PARAM is called after the invokation of
* \c END_PARAM_REGISTRATION, a <tt>std::logic_error</tt> exception
* will be thrown.
*/
#define EWOMS_END_PARAM_REGISTRATION(TypeTag) \
::Opm::Parameters::endParamRegistration<TypeTag>()
/*!
* \ingroup Parameter
*
@ -963,7 +951,7 @@ public:
{
return retrieve_<ParamType>(propTagName, paramName, getPropValue<TypeTag, PropTag>(), errorIfNotRegistered);
}
template <class ParamType>
static ParamType get(const char *propTagName,
const char *paramName,
@ -972,7 +960,7 @@ public:
{
return retrieve_<ParamType>(propTagName, paramName, defaultValue, errorIfNotRegistered);
}
static void clear()
{
ParamsMeta::clear();
@ -1199,6 +1187,13 @@ void hideParam(const char *paramName, const ParamType&)
paramInfo.isHidden = true;
}
/*!
* \brief Indicate that all parameters are registered for a given type tag.
*
* If registerParam is called after the invocation of
* \c endParamRegistration, a <tt>std::logic_error</tt> exception
* will be thrown.
*/
template <class TypeTag>
void endParamRegistration()
{

View File

@ -91,8 +91,9 @@ static inline void registerAllParameters_(bool finalizeRegistration = true)
Simulator::registerParameters();
ThreadManager::registerParameters();
if (finalizeRegistration)
EWOMS_END_PARAM_REGISTRATION(TypeTag);
if (finalizeRegistration) {
Parameters::endParamRegistration<TypeTag>();
}
}
/*!