Adding an input parameter
An input parameter appears in four places in the source and one in this manual.
parameters.hpp. Add the member to the struct of its section (Sim,Mesh,Control,BC,IC,Mat,Monitor, ...).input.cxx,declare_parameters. Registersection.namewith its type, default and help text. The help text is what users see with-hand what the parameter reference is generated from, so state the meaning, the unit and the valid values. Per-material lists are declared as text and read withget_numbers.input.cxx,validate_parameters. Reject invalid values and incompatible combinations withdie(EXIT_CONFIG_VALUE, "..."), naming the parameter in the message.examples/defaults.cfg. Add a commented line with the default, in its section.
Record new, changed and removed parameters in CHANGELOG.md.
Then document it:
- add it to the parameter table of the User guide or Theory page for its feature;
- regenerate the parameter reference from executables built at that revision (see maintaining this manual).
Parameter names come from examples/defaults.cfg or -h; never guess one in
documentation or examples.