Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate parameters from properties #627

Open
3 tasks
berndflemisch opened this issue Oct 12, 2020 · 2 comments
Open
3 tasks

Separate parameters from properties #627

berndflemisch opened this issue Oct 12, 2020 · 2 comments
Assignees

Comments

@berndflemisch
Copy link
Member

Currently, a parameter gets a default value from a corresponding property with the same name. It is inconvenient to require that a parameter has a property default and also unnecessarily mixes the two concepts. Moreover, the hierarchical structure of parameters is not reflected adequately by the property system.

  • Replace the parameter system by the one from Dumux.
  • Redefine the parameter macros in terms of the new system and mark them as deprecated.
  • Replace the macro calls.
@atgeirr
Copy link
Member

atgeirr commented Oct 12, 2020

Sounds interesting. Briefly, what are the properties of the Dumux system? For the current system, one big advantage is the automatic generation of the --help message listing all parameters, a drawback is that the existence of any specific parameter and its default value must be set at compile-time. How does the Dumux system compare on those two features?

@berndflemisch
Copy link
Member Author

A bit in the opposite way. You can pass a default value to every call to getParam . To avoid possible inconsistencies, we set default values for specific parameters in a central file by means of a global default list. These parameters and their values could also be printed with --help, along with the ones passed on the command line and in the parameter file. Actually used parameters and the ones that have been specified on the command line or in the parameter file but are not used can be printed at the end of simulation.

Parameters do not need to get a default value. If a parameter value is requested by getParam without passing a default value, an exception is thrown if the value is not set on the command line, in the parameter file or in the global default list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants