www.mooseframework.org
Public Member Functions | Protected Attributes | List of all members
Postprocessor Class Referenceabstract

Base class for all Postprocessors. More...

#include <Postprocessor.h>

Inheritance diagram for Postprocessor:
[legend]

Public Member Functions

 Postprocessor (const InputParameters &parameters)
 
virtual PostprocessorValue getValue ()=0
 This will get called to actually grab the final value the postprocessor has calculated. More...
 
std::string PPName ()
 Returns the name of the Postprocessor. More...
 
void buildOutputHideVariableList (std::set< std::string > variable_names)
 Builds hide lists for output objects NOT listed in the 'outputs' parameter. More...
 
const std::set< OutputName > & getOutputs ()
 Get the list of output objects that this class is restricted. More...
 

Protected Attributes

std::string _pp_name
 

Detailed Description

Base class for all Postprocessors.

Defines a name and sets up the virtual getValue() interface which must be overridden by derived classes.

Definition at line 35 of file Postprocessor.h.

Constructor & Destructor Documentation

Postprocessor::Postprocessor ( const InputParameters parameters)

Definition at line 30 of file Postprocessor.C.

31  : OutputInterface(parameters), _pp_name(parameters.get<std::string>("_object_name"))
32 {
33 }
OutputInterface(const InputParameters &parameters, bool build_list=true)
Handles &#39;outputs&#39; parameter for objects that desire control of variable outputs.
std::string _pp_name
Definition: Postprocessor.h:51

Member Function Documentation

void OutputInterface::buildOutputHideVariableList ( std::set< std::string >  variable_names)
inherited

Builds hide lists for output objects NOT listed in the 'outputs' parameter.

Parameters
variable_namesA set of variables for which the 'outputs' parameter controls

By default this is called by the constructor and passes the block name as the list of variables. This needs to be called explicitly if the build_list flag is set to False in the constructor. The latter cases is needed by the Material object to work correctly with the automatic material output capability.

Definition at line 67 of file OutputInterface.C.

Referenced by CheckOutputAction::checkVariableOutput(), and OutputInterface::OutputInterface().

68 {
69  // Set of available names
70  const std::set<OutputName> & avail = _oi_output_warehouse.getOutputNames();
71 
72  // Check for 'none'; hide variables on all outputs
73  if (_oi_outputs.find("none") != _oi_outputs.end())
74  for (const auto & name : avail)
75  _oi_output_warehouse.addInterfaceHideVariables(name, variable_names);
76 
77  // Check for empty and 'all' in 'outputs' parameter; do not perform any variable restrictions in
78  // these cases
79  else if (_oi_outputs.empty() || _oi_outputs.find("all") != _oi_outputs.end())
80  return;
81 
82  // Limit the variable output to Output objects listed
83  else
84  {
85  // Create a list of outputs where the variable should be hidden
86  std::set<OutputName> hide;
87  std::set_difference(avail.begin(),
88  avail.end(),
89  _oi_outputs.begin(),
90  _oi_outputs.end(),
91  std::inserter(hide, hide.begin()));
92 
93  // If 'outputs' is specified add the object name to the list of items to hide
94  for (const auto & name : hide)
95  _oi_output_warehouse.addInterfaceHideVariables(name, variable_names);
96  }
97 }
OutputWarehouse & _oi_output_warehouse
Reference to the OutputWarehouse for populating the Output object hide lists.
std::set< OutputName > _oi_outputs
The set of Output object names listed in the &#39;outputs&#39; parameter.
const std::set< OutputName > & getOutputNames()
Get a complete set of all output object names.
void addInterfaceHideVariables(const std::string &output_name, const std::set< std::string > &variable_names)
Insert variable names for hiding via the OutoutInterface.
const std::set< OutputName > & OutputInterface::getOutputs ( )
inherited

Get the list of output objects that this class is restricted.

Returns
A set of OutputNames

Definition at line 100 of file OutputInterface.C.

101 {
102  return _oi_outputs;
103 }
std::set< OutputName > _oi_outputs
The set of Output object names listed in the &#39;outputs&#39; parameter.
virtual PostprocessorValue Postprocessor::getValue ( )
pure virtual
std::string Postprocessor::PPName ( )
inline

Returns the name of the Postprocessor.

Definition at line 48 of file Postprocessor.h.

48 { return _pp_name; }
std::string _pp_name
Definition: Postprocessor.h:51

Member Data Documentation

std::string Postprocessor::_pp_name
protected

Definition at line 51 of file Postprocessor.h.

Referenced by Receiver::initialSetup(), and PPName().


The documentation for this class was generated from the following files: