Skip to content

Conversation

@VictorForouhar
Copy link
Collaborator

Started making some headway with changing how the configuration in HBT-HERONS is handled. The idea is to streamline as much as possible the declaration and initialisation of parameter values, including those read from the parameter file. My motivation is based on the feeling that there is a lot of repeated keywords, e.g.

  1. Define new variable in Parameter_t
  2. Set default (if required) value of new variable in Parameter_t::Parameter_t
  3. Add relevant TrySetPar in Parameter_t::SetParameterValue, with the precise definition of TrySetPar depending on the dtype of the new variable.
  4. Define a new member for the new variable in Parameter_t::BroadCast.

I envision this PR as a way to streamline all of the above, such that any new variable is added to a single file ONCE, and everything else is automatically handled.

For the time being, I have implemented a solution for steps 1 and 2. We can now define new parameters in parameters.h in the form:

PARAMETER(<DTYPE>, <PARAMETER_NAME>, <PARAMETER_OPTIONAL_VALUE>)                                             \

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

Successfully merging this pull request may close these issues.

2 participants