diff --git a/framework/doc/content/source/actions/MaterialOutputAction.md b/framework/doc/content/source/actions/MaterialOutputAction.md new file mode 100644 index 000000000000..404d778629e7 --- /dev/null +++ b/framework/doc/content/source/actions/MaterialOutputAction.md @@ -0,0 +1,9 @@ +# MaterialOutputAction + +!syntax description /Outputs/MaterialOutputAction + +This [Action.md] is used to output the material properties computed by a [Material](syntax/Materials/index.md) +or a [FunctorMaterial](syntax/FunctorMaterials/index.md) to an auxiliary variable. +Vector, tensor, and array-valued properties can be output to variables prefixed with the component or index. + +!syntax parameters /Outputs/MaterialOutputAction diff --git a/framework/src/actions/MaterialOutputAction.C b/framework/src/actions/MaterialOutputAction.C index 7f29435fc3dd..0abd7282a170 100644 --- a/framework/src/actions/MaterialOutputAction.C +++ b/framework/src/actions/MaterialOutputAction.C @@ -31,10 +31,16 @@ InputParameters MaterialOutputAction::validParams() { InputParameters params = Action::validParams(); + params.addClassDescription("Outputs material properties to various Outputs objects, based on the " + "parameters set in each Material"); /// A flag to tell this action whether or not to print the unsupported properties /// Note: A derived class can set this to false, override materialOutput and output /// a particular property that is not supported by this class. params.addPrivateParam("print_unsupported_prop_names", true); + params.addParam("print_automatic_aux_variable_creation", + true, + "Flag to print list of aux variables created for automatic output by " + "MaterialOutputAction."); return params; } @@ -189,7 +195,8 @@ MaterialOutputAction::act() " to restrict the material properties to output"); _problem->addAuxVariable("MooseVariableConstMonomial", var_name, params); } - if (material_names.size() > 0) + + if (material_names.size() > 0 && getParam("print_automatic_aux_variable_creation")) _console << COLOR_CYAN << "The following total " << material_names.size() << " aux variables:" << oss.str() << "\nare added for automatic output by " << type() << "." << COLOR_DEFAULT << std::endl; diff --git a/framework/src/base/Moose.C b/framework/src/base/Moose.C index 91250cd67442..1de4e1c4b8e2 100644 --- a/framework/src/base/Moose.C +++ b/framework/src/base/Moose.C @@ -565,6 +565,7 @@ associateSyntaxInner(Syntax & syntax, ActionFactory & /*action_factory*/) registerSyntax("AddOutputAction", "Outputs/*"); registerSyntax("CommonOutputAction", "Outputs"); + registerSyntax("MaterialOutputAction", "Outputs"); registerSyntax("AutoCheckpointAction", "Outputs"); syntax.registerSyntaxType("Outputs/*", "OutputName"); diff --git a/test/tests/materials/output/tests b/test/tests/materials/output/tests index de9fb68bc7e5..68ec7760609a 100644 --- a/test/tests/materials/output/tests +++ b/test/tests/materials/output/tests @@ -123,4 +123,13 @@ requirement = "The system shall show the field variable names for outputting material data added by materials." prereq = warn_unsupported_types [] + [dont_show_added_aux_vars] + type = RunApp + input = output_warning.i + cli_args = Outputs/print_automatic_aux_variable_creation=false + allow_warnings = true + absent_out = "The following total 145 aux variables:" + requirement = "The system shall be able to not show the field variable names for outputting material data added by materials." + prereq = show_added_aux_vars + [] []