Skip to content

Commit

Permalink
add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mschreter committed Feb 11, 2023
1 parent bb6f48d commit 87d225c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
12 changes: 8 additions & 4 deletions include/deal.II/base/parameter_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -1137,10 +1137,14 @@ class ParameterHandler : public Subscriptor
*
* The action is executed in three different circumstances:
* - With the default value of the parameter with name @p name, at
* the end of the current function. This is useful because it allows
* for the action to execute whatever it needs to do at least once
* for each parameter, even those that are not actually specified in
* the input file (and thus remain at their default values).
* the end of the current function if @p execute_action is set to
* true. This is useful because it allows for the action to execute
* whatever it needs to do at least once for each parameter, even
* those that are not actually specified in the input file (and
* thus remain at their default values). Note that if the action
* is executed, it converts the default value to a string and back
* afterwards. This can lead to round-off errors so that the default
* values might change in the case of floating-point numbers.
* - Within the ParameterHandler::set() functions that explicitly
* set a value for a parameter.
* - Within the parse_input() function and similar functions such
Expand Down
1 change: 0 additions & 1 deletion source/base/parameter_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,6 @@ ParameterHandler::add_action(

if (execute_action)
{
// as documented, run the action on the default value at the very end
const std::string default_value = entries->get<std::string>(
get_current_full_path(entry) + path_separator + "default_value");
action(default_value);
Expand Down

0 comments on commit 87d225c

Please sign in to comment.