www.mooseframework.org
AdvancedOutput.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 // Standard includes
16 #include <math.h>
17 
18 // MOOSE includes
19 #include "AdvancedOutput.h"
20 #include "DisplacedProblem.h"
21 #include "FEProblem.h"
22 #include "FileMesh.h"
23 #include "FileOutput.h"
24 #include "InfixIterator.h"
25 #include "MooseApp.h"
26 #include "MooseUtils.h"
27 #include "MooseVariable.h"
28 #include "Postprocessor.h"
29 #include "Restartable.h"
30 #include "VectorPostprocessor.h"
31 
32 // A function, only available in this file, for adding the AdvancedOutput parameters. This is
33 // used to eliminate code duplication between the difference specializations of the validParams
34 // function.
35 namespace
36 {
37 void
38 addAdvancedOutputParams(InputParameters & params)
39 {
40  // Hide/show variable output options
41  params.addParam<std::vector<VariableName>>(
42  "hide",
43  "A list of the variables and postprocessors that should NOT be output to the Exodus "
44  "file (may include Variables, ScalarVariables, and Postprocessor names).");
45 
46  params.addParam<std::vector<VariableName>>(
47  "show",
48  "A list of the variables and postprocessors that should be output to the Exodus file "
49  "(may include Variables, ScalarVariables, and Postprocessor names).");
50 
51  // 'Variables' Group
52  params.addParamNamesToGroup("hide show", "Variables");
53 
54  // **** DEPRECATED PARAMS ****
55  params.addDeprecatedParam<bool>("output_postprocessors",
56  true,
57  "Enable/disable the output of postprocessors",
58  "'execute_postprocessors_on' has replaced this parameter");
59  params.addDeprecatedParam<bool>("execute_vector_postprocessors",
60  true,
61  "Enable/disable the output of vector postprocessors",
62  "'execute_vector_postprocessors_on' has replaced this parameter");
63  params.addDeprecatedParam<bool>("execute_system_information",
64  true,
65  "Enable/disable the output of the simulation information",
66  "'execute_system_information_on' has replaced this parameter");
67  params.addDeprecatedParam<bool>("execute_elemental_variables",
68  true,
69  "Enable/disable the output of elemental variables",
70  "'execute_elemental_on' has replaced this parameter");
71  params.addDeprecatedParam<bool>("execute_nodal_variables",
72  true,
73  "Enable/disable the output of nodal variables",
74  "'execute_nodal_on' has replaced this parameter");
75  params.addDeprecatedParam<bool>("execute_scalar_variables",
76  true,
77  "Enable/disable the output of aux scalar variables",
78  "'execute_scalars_on' has replaced this parameter");
79  params.addDeprecatedParam<bool>("execute_input",
80  true,
81  "Enable/disable the output of input file information",
82  "'execute_input_on' has replaced this parameter");
83 }
84 }
85 
86 template <>
89 {
90  // Get the parameters from the parent object
92  addAdvancedOutputParams(params);
93  return params;
94 }
95 
96 // Defines the output types to enable for the AdvancedOutput object
99 {
100  return MultiMooseEnum("nodal=0 elemental=1 scalar=2 postprocessor=3 vector_postprocessor=4 "
101  "input=5 system_information=6");
102 }
103 
104 // Enables the output types (see getOutputTypes) for an AdvancedOutput object
106 AdvancedOutput::enableOutputTypes(const std::string & names)
107 {
108  // The parameters object that will be returned
110 
111  // Get the MultiEnum of output types
112  MultiMooseEnum output_types = getOutputTypes();
113 
114  // Update the enum of output types to append
115  if (names.empty())
116  output_types = output_types.getRawNames();
117  else
118  output_types = names;
119 
120  // Add the parameters and return them
121  addValidParams(params, output_types);
122  return params;
123 }
124 
125 // Constructor
127 {
128  _is_advanced = true;
130 }
131 
132 void
134 {
135  // Do not initialize more than once
136  // This check is needed for YAK which calls Executioners from within Executioners
137  if (_initialized)
138  return;
139 
140  // Initialize the available output
142 
143  // Separate the hide/show list into components
144  initShowHideLists(getParam<std::vector<VariableName>>("show"),
145  getParam<std::vector<VariableName>>("hide"));
146 
147  // If 'elemental_as_nodal = true' the elemental variable names must be appended to the
148  // nodal variable names. Thus, when libMesh::EquationSystem::build_solution_vector is called
149  // it will create the correct nodal variable from the elemental
150  if (isParamValid("elemental_as_nodal") && getParam<bool>("elemental_as_nodal"))
151  {
152  OutputData & nodal = _execute_data["nodal"];
153  OutputData & elemental = _execute_data["elemental"];
154  nodal.show.insert(elemental.show.begin(), elemental.show.end());
155  nodal.hide.insert(elemental.hide.begin(), elemental.hide.end());
156  nodal.available.insert(elemental.available.begin(), elemental.available.end());
157  }
158 
159  // Similarly as above, if 'scalar_as_nodal = true' append the elemental variable lists
160  if (isParamValid("scalar_as_nodal") && getParam<bool>("scalar_as_nodal"))
161  {
162  OutputData & nodal = _execute_data["nodal"];
163  OutputData & scalar = _execute_data["scalars"];
164  nodal.show.insert(scalar.show.begin(), scalar.show.end());
165  nodal.hide.insert(scalar.hide.begin(), scalar.hide.end());
166  nodal.available.insert(scalar.available.begin(), scalar.available.end());
167  }
168 
169  // Initialize the show/hide/output lists for each of the types of output
170  for (auto & it : _execute_data)
171  initOutputList(it.second);
172 
173  // Initialize the execution flags
174  for (auto & it : _advanced_execute_on)
175  initExecutionTypes(it.first, it.second);
176 
177  // Set the initialization flag
178  _initialized = true;
179 }
180 
182 
183 void
185 {
186  mooseError("Individual output of nodal variables is not support for the output object named '",
187  name(),
188  "'");
189 }
190 
191 void
193 {
194  mooseError(
195  "Individual output of elemental variables is not support for this output object named '",
196  name(),
197  "'");
198 }
199 
200 void
202 {
203  mooseError("Individual output of postprocessors is not support for this output object named '",
204  name(),
205  "'");
206 }
207 
208 void
210 {
211  mooseError(
212  "Individual output of VectorPostprocessors is not support for this output object named '",
213  name(),
214  "'");
215 }
216 
217 void
219 {
220  mooseError(
221  "Individual output of scalars is not support for this output object named '", name(), "'");
222 }
223 
224 void
226 {
227  mooseError(
228  "Output of system information is not support for this output object named '", name(), "'");
229 }
230 
231 void
233 {
234  mooseError("Output of the input file information is not support for this output object named '",
235  name(),
236  "'");
237 }
238 
239 bool
241 {
242  if (!checkFilename())
243  return false;
244 
245  if (hasOutput(type))
246  return true;
247  else
248  return Output::shouldOutput(type);
249 }
250 
251 void
253 {
254  // Call the various output types, if data exists
255  if (wantOutput("nodal", type))
256  {
258  _last_execute_time["nodal"] = _time;
259  }
260 
261  if (wantOutput("elemental", type))
262  {
264  _last_execute_time["elemental"] = _time;
265  }
266 
267  if (wantOutput("postprocessors", type))
268  {
270  _last_execute_time["postprocessors"] = _time;
271  }
272 
273  if (wantOutput("vector_postprocessors", type))
274  {
276  _last_execute_time["vector_postprocessors"] = _time;
277  }
278 
279  if (wantOutput("scalars", type))
280  {
282  _last_execute_time["scalars"] = _time;
283  }
284 
285  if (wantOutput("system_information", type))
286  {
288  _last_execute_time["system_information"] = _time;
289  }
290 
291  if (wantOutput("input", type))
292  {
293  outputInput();
294  _last_execute_time["input"] = _time;
295  }
296 }
297 
298 bool
299 AdvancedOutput::wantOutput(const std::string & name, const ExecFlagType & type)
300 {
301  // Ignore EXEC_FORCED for system information and input, there is no reason to force this
302  if (type == EXEC_FORCED && (name == "system_information" || name == "input"))
303  return false;
304 
305  // Do not output if the 'none' is contained by the execute_on
307  return false;
308 
309  // Data output flag, true if data exists to be output
310  bool execute_data_flag = true;
311 
312  // Set flag to false, if the OutputData exists and the output variable list is empty
313  std::map<std::string, OutputData>::const_iterator iter = _execute_data.find(name);
314  if (iter != _execute_data.end() && iter->second.output.empty())
315  execute_data_flag = false;
316 
317  // Set flag to false, if the OutputOnWarehouse DOES NOT contain an entry
318  if (!_advanced_execute_on.contains(name))
319  execute_data_flag = false;
320 
321  // Force the output, if there is something to output and the time has not been output
322  if (type == EXEC_FORCED && execute_data_flag && _last_execute_time[name] != _time)
323  return true;
324 
325  // Return true (output should occur) if three criteria are satisfied, else do not output:
326  // (1) The execute_data_flag = true (i.e, there is data to output)
327  // (2) The current output type is contained in the list of output execution types
328  // (3) The current execution time is "final" or "forced" and the data has not already been
329  // output
330  if (execute_data_flag && _advanced_execute_on[name].contains(type) &&
331  !(type == EXEC_FINAL && _last_execute_time[name] == _time))
332  return true;
333  else
334  return false;
335 }
336 
337 bool
339 {
340  // If any of the component outputs are true, then there is some output to perform
341  for (const auto & it : _advanced_execute_on)
342  if (wantOutput(it.first, type))
343  return true;
344 
345  // There is nothing to output
346  return false;
347 }
348 
349 bool
351 {
352  // Test that variables exist for output AND that output execution flags are valid
353  for (const auto & it : _execute_data)
354  if (!(it.second).output.empty() && _advanced_execute_on.contains(it.first) &&
355  _advanced_execute_on[it.first].isValid())
356  return true;
357 
358  // Test execution flags for non-variable output
359  if (_advanced_execute_on.contains("system_information") &&
360  _advanced_execute_on["system_information"].isValid())
361  return true;
362  if (_advanced_execute_on.contains("input") && _advanced_execute_on["input"].isValid())
363  return true;
364 
365  return false;
366 }
367 
368 void
370 {
371  // Initialize Postprocessor list
372  // This flag is set to true if any postprocessor has the 'outputs' parameter set, it is then used
373  // to produce an warning if postprocessor output is disabled
374  initPostprocessorOrVectorPostprocessorLists<Postprocessor>("postprocessors");
375 
376  // Initialize vector postprocessor list
377  // This flag is set to true if any vector postprocessor has the 'outputs' parameter set, it is
378  // then used
379  // to produce an warning if vector postprocessor output is disabled
380  initPostprocessorOrVectorPostprocessorLists<VectorPostprocessor>("vector_postprocessors");
381 
382  // Get a list of the available variables
383  std::vector<VariableName> variables = _problem_ptr->getVariableNames();
384 
385  // Loop through the variables and store the names in the correct available lists
386  for (const auto & var_name : variables)
387  {
388  if (_problem_ptr->hasVariable(var_name))
389  {
390  MooseVariable & var = _problem_ptr->getVariable(0, var_name);
391  const FEType type = var.feType();
392  if (type.order == CONSTANT)
393  _execute_data["elemental"].available.insert(var_name);
394  else
395  _execute_data["nodal"].available.insert(var_name);
396  }
397 
398  else if (_problem_ptr->hasScalarVariable(var_name))
399  _execute_data["scalars"].available.insert(var_name);
400  }
401 }
402 
403 void
405 {
406  // Build the input paramemter name
407  std::string param_name = "execute_";
408  param_name += name + "_on";
409 
410  // The parameters exists and has been set by the user
411  if (_pars.have_parameter<MultiMooseEnum>(param_name) && isParamValid(param_name))
412  input = getParam<MultiMooseEnum>(param_name);
413 
414  // If the parameter does not exists; set it to a state where no valid entries exists so nothing
415  // gets executed
416  else if (!_pars.have_parameter<MultiMooseEnum>(param_name))
418 }
419 
420 void
421 AdvancedOutput::initShowHideLists(const std::vector<VariableName> & show,
422  const std::vector<VariableName> & hide)
423 {
424 
425  // Storage for user-supplied input that is unknown as a variable or postprocessor
426  std::set<std::string> unknown;
427 
428  // If a show hide/list exists, let the data warehouse know about it. This allows for the proper
429  // handling of output lists (see initOutputList)
430  if (show.size() > 0)
432 
433  // Populate the show lists
434  for (const auto & var_name : show)
435  {
436  if (_problem_ptr->hasVariable(var_name))
437  {
438  MooseVariable & var = _problem_ptr->getVariable(0, var_name);
439  const FEType type = var.feType();
440  if (type.order == CONSTANT)
441  _execute_data["elemental"].show.insert(var_name);
442  else
443  _execute_data["nodal"].show.insert(var_name);
444  }
445  else if (_problem_ptr->hasScalarVariable(var_name))
446  _execute_data["scalars"].show.insert(var_name);
447  else if (_problem_ptr->hasPostprocessor(var_name))
448  _execute_data["postprocessors"].show.insert(var_name);
449  else if (_problem_ptr->hasVectorPostprocessor(var_name))
450  _execute_data["vector_postprocessors"].show.insert(var_name);
451  else
452  unknown.insert(var_name);
453  }
454 
455  // Populate the hide lists
456  for (const auto & var_name : hide)
457  {
458  if (_problem_ptr->hasVariable(var_name))
459  {
460  MooseVariable & var = _problem_ptr->getVariable(0, var_name);
461  const FEType type = var.feType();
462  if (type.order == CONSTANT)
463  _execute_data["elemental"].hide.insert(var_name);
464  else
465  _execute_data["nodal"].hide.insert(var_name);
466  }
467  else if (_problem_ptr->hasScalarVariable(var_name))
468  _execute_data["scalars"].hide.insert(var_name);
469  else if (_problem_ptr->hasPostprocessor(var_name))
470  _execute_data["postprocessors"].hide.insert(var_name);
471  else if (_problem_ptr->hasVectorPostprocessor(var_name))
472  _execute_data["vector_postprocessors"].hide.insert(var_name);
473  else
474  unknown.insert(var_name);
475  }
476 
477  // Error if an unknown variable or postprocessor is found
478  if (!unknown.empty())
479  {
480  std::ostringstream oss;
481  oss << "Output(s) do not exist (must be variable, scalar, postprocessor, or vector "
482  "postprocessor): ";
483  std::copy(unknown.begin(), unknown.end(), infix_ostream_iterator<std::string>(oss, " "));
484  mooseError(oss.str());
485  }
486 }
487 
488 void
490 {
491  // References to the vectors of variable names
492  std::set<std::string> & hide = data.hide;
493  std::set<std::string> & show = data.show;
494  std::set<std::string> & avail = data.available;
495  std::set<std::string> & output = data.output;
496 
497  // Append the list from OutputInterface objects
498  std::set<std::string> interface_hide;
500  hide.insert(interface_hide.begin(), interface_hide.end());
501 
502  // Both show and hide are empty and no show/hide settings were provided (show all available)
503  if (show.empty() && hide.empty() && !_execute_data.hasShowList())
504  output = avail;
505 
506  // Only hide is empty (show all the variables listed)
507  else if (!show.empty() && hide.empty())
508  output = show;
509 
510  // Only show is empty (show all except those hidden)
511  else if (show.empty() && !hide.empty())
512  std::set_difference(avail.begin(),
513  avail.end(),
514  hide.begin(),
515  hide.end(),
516  std::inserter(output, output.begin()));
517 
518  // Both hide and show are present (show all those listed)
519  else
520  {
521  // Check if variables are in both, which is invalid
522  std::vector<std::string> tmp;
523  std::set_intersection(
524  hide.begin(), hide.end(), show.begin(), show.end(), std::inserter(tmp, tmp.begin()));
525  if (!tmp.empty())
526  {
527  std::ostringstream oss;
528  oss << "Output(s) specified to be both shown and hidden: ";
529  std::copy(tmp.begin(), tmp.end(), infix_ostream_iterator<std::string>(oss, " "));
530  mooseError(oss.str());
531  }
532 
533  // Define the output variable list
534  output = show;
535  }
536 }
537 
538 void
540 {
541  // Nodal output
542  if (types.contains("nodal"))
543  {
544  params.addParam<MultiMooseEnum>(
545  "execute_nodal_on", getExecuteOptions(), "Control the output of nodal variables");
546  params.addParamNamesToGroup("execute_nodal_on", "Variables");
547  }
548 
549  // Elemental output
550  if (types.contains("elemental"))
551  {
552  params.addParam<MultiMooseEnum>(
553  "execute_elemental_on", getExecuteOptions(), "Control the output of elemental variables");
554  params.addParamNamesToGroup("execute_elemental_on", "Variables");
555 
556  // Add material output control, which are output via elemental variables
557  params.addParam<bool>("output_material_properties",
558  false,
559  "Flag indicating if material properties should be output");
560  params.addParam<std::vector<std::string>>(
561  "show_material_properties",
562  "List of materialproperties that should be written to the output");
563  params.addParamNamesToGroup("output_material_properties show_material_properties", "Materials");
564  }
565 
566  // Scalar variable output
567  if (types.contains("scalar"))
568  {
569  params.addParam<MultiMooseEnum>(
570  "execute_scalars_on", getExecuteOptions(), "Control the output of scalar variables");
571  params.addParamNamesToGroup("execute_scalars_on", "Variables");
572  }
573 
574  // Nodal and scalar output
575  if (types.contains("nodal") && types.contains("scalar"))
576  {
577  params.addParam<bool>("scalar_as_nodal", false, "Output scalar variables as nodal");
578  params.addParamNamesToGroup("scalar_as_nodal", "Variables");
579  }
580 
581  // Elemental and nodal
582  if (types.contains("elemental") && types.contains("nodal"))
583  {
584  params.addParam<bool>(
585  "elemental_as_nodal", false, "Output elemental nonlinear variables as nodal");
586  params.addParamNamesToGroup("elemental_as_nodal", "Variables");
587  }
588 
589  // Postprocessors
590  if (types.contains("postprocessor"))
591  {
592  params.addParam<MultiMooseEnum>("execute_postprocessors_on",
594  "Control of when postprocessors are output");
595  params.addParamNamesToGroup("execute_postprocessors_on", "Variables");
596  }
597 
598  // Vector Postprocessors
599  if (types.contains("vector_postprocessor"))
600  {
601  params.addParam<MultiMooseEnum>("execute_vector_postprocessors_on",
603  "Enable/disable the output of VectorPostprocessors");
604  params.addParamNamesToGroup("execute_vector_postprocessors_on", "Variables");
605  }
606 
607  // Input file
608  if (types.contains("input"))
609  {
610  params.addParam<MultiMooseEnum>(
611  "execute_input_on", getExecuteOptions(), "Enable/disable the output of the input file");
612  params.addParamNamesToGroup("execute_input_on", "Variables");
613  }
614 
615  // System Information
616  if (types.contains("system_information"))
617  {
618  params.addParam<MultiMooseEnum>("execute_system_information_on",
620  "Control when the output of the simulation information occurs");
621  params.addParamNamesToGroup("execute_system_information_on", "Variables");
622  }
623 }
624 
625 bool
627 {
628  if (!_initialized)
629  mooseError("The output object must be initialized before it may be determined if ",
630  name,
631  " output is enabled.");
632 
633  return !_execute_data[name].output.empty() && _advanced_execute_on.contains(name) &&
635 }
636 
637 bool
639 {
640  return hasOutputHelper("nodal");
641 }
642 
643 const std::set<std::string> &
645 {
646  return _execute_data["nodal"].output;
647 }
648 
649 bool
651 {
652  return hasOutputHelper("elemental");
653 }
654 
655 const std::set<std::string> &
657 {
658  return _execute_data["elemental"].output;
659 }
660 
661 bool
663 {
664  return hasOutputHelper("scalars");
665 }
666 
667 const std::set<std::string> &
669 {
670  return _execute_data["scalars"].output;
671 }
672 
673 bool
675 {
676  return hasOutputHelper("postprocessors");
677 }
678 
679 const std::set<std::string> &
681 {
682  return _execute_data["postprocessors"].output;
683 }
684 
685 bool
687 {
688  return hasOutputHelper("vector_postprocessors");
689 }
690 
691 const std::set<std::string> &
693 {
694  return _execute_data["vector_postprocessors"].output;
695 }
696 
697 const OutputOnWarehouse &
699 {
700  return _advanced_execute_on;
701 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
virtual void outputVectorPostprocessors()
Performs output of VectorPostprocessors The child class must define this method to output the VectorP...
virtual void outputSystemInformation()
const std::set< std::string > & getPostprocessorOutput()
The list of postprocessor names that are set for output.
std::set< std::string > output
A list of the outputs to write.
bool hasPostprocessorOutput()
Returns true if there exists postprocessors for output.
virtual bool hasOutput()
Returns true if any of the other has methods return true.
std::map< std::string, Real > _last_execute_time
Storage for the last output time for the various output types, this is used to avoid duplicate output...
bool hasVectorPostprocessorOutput()
Returns true if there exists VectorPostprocessors for output.
void addDeprecatedParam(const std::string &name, const T &value, const std::string &doc_string, const std::string &deprecation_message)
const FEType & feType() const
Get the type of finite element object.
Class for stuff related to variables.
Definition: MooseVariable.h:43
OutputOnWarehouse _advanced_execute_on
Storage for the individual component execute flags.
Definition: Output.h:237
MultiMooseEnum _execute_on
The common Execution types; this is used as the default execution type for everything except system i...
Definition: Output.h:186
AdvancedOutput(const InputParameters &parameters)
Class constructor.
virtual void outputElementalVariables()
Performs output of elemental nonlinear variables The child class must define this method to output th...
virtual bool shouldOutput(const ExecFlagType &type)
Handles logic for determining if a step should be output.
Definition: Output.C:164
void initExecutionTypes(const std::string &name, MultiMooseEnum &input)
Initialize the possible execution types.
bool hasOutputHelper(const std::string &name)
Helper method for checking if output types exists.
void initShowHideLists(const std::vector< VariableName > &show, const std::vector< VariableName > &hide)
Parses the user-supplied input for hiding and showing variables and postprocessors into a list for ea...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
bool hasPostprocessor(const std::string &name)
Check existence of the postprocessor.
OutputDataWarehouse _execute_data
Storage structures for the various output types.
virtual ~AdvancedOutput()
Class destructor.
bool hasVectorPostprocessor(const std::string &name)
Check existence of the VectorPostprocessor.
const std::set< std::string > & getVectorPostprocessorOutput()
The list of VectorPostprocessor names that are set for output.
A structure for storing the various lists that contain the names of the items to be exported...
void initOutputList(OutputData &data)
Initializes the list of items to be output using the available, show, and hide lists.
bool contains(const std::string &value) const
Contains methods for seeing if a value is in the MultiMooseEnum.
InputParameters emptyInputParameters()
virtual void outputScalarVariables()
Performs output of scalar variables The child class must define this method to output the scalar vari...
InputParameters validParams< AdvancedOutput >()
void initAvailableLists()
Initializes the available lists for each of the output types.
Forces execution to occur (output only)
Definition: MooseTypes.h:106
bool hasShowList()
False when the show lists for all variables is empty.
virtual std::vector< VariableName > getVariableNames()
Returns a list of all the variables in the problem (both from the NL and Aux systems.
bool _initialized
True if init() has been called.
Definition: Output.h:225
bool hasNodalVariableOutput()
Returns true if there exists nodal nonlinear variables for output.
virtual void outputNodalVariables()
Performs output of nodal nonlinear variables The child class must define this method to output the no...
bool contains(const std::string &name)
A method for testing of a key exists.
const std::set< std::string > & getScalarOutput()
The list of scalar variables names that are set for output.
std::set< std::string > available
A list of all possible outputs.
virtual void output(const ExecFlagType &type)
A single call to this function should output all the necessary data for a single timestep.
virtual void outputInput()
Performs the output of the input file By default this method does nothing and is not called...
static void addValidParams(InputParameters &params, const MultiMooseEnum &types)
Method for defining the available parameters based on the types of outputs.
virtual bool shouldOutput(const ExecFlagType &type)
Handles logic for determining if a step should be output.
FEProblemBase * _problem_ptr
Pointer the the FEProblemBase object for output object (use this)
Definition: Output.h:171
A helper warehouse class for storing the "execute_on" settings for the various output types...
bool hasScalarOutput()
Returns true if there exists scalar variables for output.
virtual bool hasVariable(const std::string &var_name) override
const OutputOnWarehouse & advancedExecuteOn() const
Get the current advanced &#39;execute_on&#39; selections for display.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseObject.h:67
static InputParameters enableOutputTypes(const std::string &names=std::string())
A method for enabling individual output type control.
bool hasElementalVariableOutput()
Returns true if there exists elemental nonlinear variables for output.
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition: MooseObject.h:122
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:111
std::set< std::string > hide
User-supplied list of outputs to hide.
std::map< std::string, T >::iterator end()
bool _is_advanced
Flag for advanced output testing.
Definition: Output.h:231
bool wantOutput(const std::string &name, const ExecFlagType &type)
Handles logic for determining if a step should be output.
std::string getRawNames() const
Method for returning the raw name strings for this instance.
MatType type
virtual void initialSetup()
Initialization method.
virtual void outputPostprocessors()
Performs output of postprocessors The child class must define this method to output the postprocessor...
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:108
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
virtual bool hasScalarVariable(const std::string &var_name) override
Returns a Boolean indicating whether any system contains a variable with the name provided...
Object is evaluated at the end of the simulations (output only)
Definition: MooseTypes.h:104
const std::set< std::string > & getElementalVariableOutput()
The list of elemental nonlinear variables names that are set for output.
static MultiMooseEnum getOutputTypes()
Get the supported types of output (e.g., postprocessors, etc.)
std::set< std::string > show
User-supplied list of outputs to display.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object...
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
InputParameters validParams< FileOutput >()
Definition: FileOutput.C:28
const std::set< std::string > & getNodalVariableOutput()
The list of nodal nonlinear variables names that are set for output.
ExecFlagType
Execution flags - when is the object executed/evaluated.
Definition: MooseTypes.h:90
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
void buildInterfaceHideVariables(const std::string &output_name, std::set< std::string > &hide)
Return the list of hidden variables for the given output name.
An outputter with filename support.
Definition: FileOutput.h:32
static MultiMooseEnum getExecuteOptions()
Returns the available options for the &#39;execute_on&#39; input parameters.
bool checkFilename()
Checks the filename for output Checks the output against the &#39;output_if_base_contians&#39; list...
Definition: FileOutput.C:145
std::map< std::string, T >::iterator find(const std::string &name)
Real & _time
The current time for output purposes.
Definition: Output.h:189
virtual MooseVariable & getVariable(THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested variable which may be in any system. ...
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:840
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
This method takes a space delimited list of parameter names and adds them to the specified group name...
void setHasShowList(bool value)
Set the show list bool.