Skip to content

Commit

Permalink
add option to suppress header ref #29662
Browse files Browse the repository at this point in the history
  • Loading branch information
tophmatthews committed Jan 9, 2025
1 parent 9234e1f commit ca8cd71
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion framework/src/base/MooseApp.C
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ MooseApp::validParams()
"Continue the calculation. Without <file base>, the most recent recovery file will be used");
params.setGlobalCommandLineParam("recover");

params.addCommandLineParam<bool>(
"suppress_header", "--suppress-header", "Flag to print the App header");
params.setGlobalCommandLineParam("suppress_header");

params.addCommandLineParam<bool>(
"test_checkpoint_half_transient",
"--test-checkpoint-half-transient",
Expand Down Expand Up @@ -730,7 +734,8 @@ MooseApp::setupOptions()
TIME_SECTION("setupOptions", 5, "Setting Up Options");

// Print the header, this is as early as possible
_console << header() << std::endl;
if (isParamValid("suppress_header") && !getParam<bool>("suppress_header"))
_console << header() << std::endl;

if (getParam<bool>("error_unused"))
setCheckUnusedFlag(true);
Expand Down
8 changes: 8 additions & 0 deletions test/tests/multiapps/multilevel/tests
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
expect_out = 'MOOSE Test App\n\nsub0: MOOSE Test App\nsub0: \nsub0_sub0: MOOSE Test App'
detail = "and append the subapp number to the header"
[]
[suppress_subapp_header]
type = 'RunApp'
input = 'dt_from_parent_parent.i'
prereq = group/header_check
cli_args = 'MultiApps/sub/cli_args=--suppress-header'
expect_out = 'MOOSE Test App\n\nFramework Information:'
detail = "and suppress the subapp header."
[]
[]

[console_to_file]
Expand Down

0 comments on commit ca8cd71

Please sign in to comment.