Skip to content

Commit

Permalink
Merge pull request #29605 from GiudGiud/PR_debug_control
Browse files Browse the repository at this point in the history
Add a debug option for controls
  • Loading branch information
GiudGiud authored Jan 8, 2025
2 parents 716ac68 + 14c6cbb commit bebcead
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
11 changes: 11 additions & 0 deletions framework/src/actions/SetupDebugAction.C
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ SetupDebugAction::validParams()
"show_material_props",
false,
"Print out the material properties supplied for each block, face, neighbor, and/or sideset");
params.addParam<bool>("show_controllable",
false,
"Print out the controllable parameters from all input parameters");
params.addParam<bool>("show_mesh_meta_data", false, "Print out the available mesh meta data");
params.addParam<bool>(
"show_reporters", false, "Print out information about the declared and requested Reporters");
Expand Down Expand Up @@ -166,4 +169,12 @@ SetupDebugAction::act()
params.set<MultiMooseEnum>("scope") = block_restriction_scope;
_problem->addOutput(type, "_moose_block_restriction_debug_output", params);
}

// Controllable output
if (getParam<bool>("show_controllable"))
{
const std::string type = "ControlOutput";
auto params = _factory.getValidParams(type);
_problem->addOutput(type, "_moose_controllable_debug_output", params);
}
}
8 changes: 7 additions & 1 deletion test/tests/controls/output/tests
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
expect_out = "Controls:.*Active Controls:.*Active Controls:"
requirement = "The Control system shall include a means to output information regarding the controlled parameters."
[../]
[debug_syntax]
type = RunApp
input = controllable.i
cli_args = "Debug/show_controllable=true Outputs/active=''"
expect_out = "Active Objects:"
requirement = "The system shall include a means to output information regarding the controlled parameters, accessible through dedicated debugging syntax."
[../]
[./clear]
type = RunApp
input = controllable_clear.i
Expand All @@ -21,7 +28,6 @@
expect_out = "Controls:.*Active Controls:"
absent_out = "Controls:.*Active Controls:.*Active Controls:"
requirement = "The system shall include a command line flag for displaying controllable parameter information."

[../]
[./active]
type = RunApp
Expand Down

0 comments on commit bebcead

Please sign in to comment.