idaholab/moose

Mark input parameters as used only when they are obtained through `get<>` or `getParam<>`

Opened this issue · 0 comments

Motivation

Some objects (especially actions) tend to conditionally get parameters depending on other parameters. It would be useful for the user if parameter that are ultimately not used by the object are marked as unused. Currently only parameters that are not part of the validParams of an object are marked unused.

Design

Input parameters have an associated HIT node. We can either directly mark the node (adding a new bool member to the HIT Node class) or store the node path in a set in InputParameters::get<T> (note that we override libmesh's Parameters::get<T>, so this can be a MOSOE only change).

Currently the Builder object maintains a set of used input parameters. The InputParameterWarehouse could host this set. Notably the get method is marked const and constructors get const InputParameters &, but the input parameters could keep a non-const reference to the warehouse.

Impact

Better info for the user.