mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
ParameterSystem: add function to query if registration is open
This commit is contained in:
parent
0cda471821
commit
3161b4f547
@ -454,6 +454,11 @@ void reset()
|
||||
MetaData::clear();
|
||||
}
|
||||
|
||||
bool IsRegistrationOpen()
|
||||
{
|
||||
return MetaData::registrationOpen();
|
||||
}
|
||||
|
||||
void endRegistration()
|
||||
{
|
||||
if (!MetaData::registrationOpen()) {
|
||||
|
@ -393,6 +393,12 @@ void Hide()
|
||||
detail::Hide_(detail::getParamName<Param>());
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Query whether parameter registration is open or not.
|
||||
* \return True if registration is open, false otherwise
|
||||
*/
|
||||
bool IsRegistrationOpen();
|
||||
|
||||
/*!
|
||||
* \brief Indicate that all parameters are registered for a given type tag.
|
||||
*
|
||||
|
@ -84,7 +84,7 @@ namespace Opm {
|
||||
// Read the command line parameters. Throws an exception if something goes wrong.
|
||||
static int setupParameters_(int argc, char** argv, Parallel::Communication comm)
|
||||
{
|
||||
if (!Parameters::MetaData::registrationOpen()) {
|
||||
if (!Parameters::IsRegistrationOpen()) {
|
||||
// We have already successfully run setupParameters_().
|
||||
// For the dynamically chosen runs (as from the main flow
|
||||
// executable) we must run this function again with the
|
||||
|
Loading…
Reference in New Issue
Block a user