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:

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 30 of file Postprocessor.h.

Constructor & Destructor Documentation

◆ Postprocessor()

Postprocessor::Postprocessor ( const InputParameters parameters)

Definition at line 25 of file Postprocessor.C.

26  : OutputInterface(parameters), _pp_name(parameters.get<std::string>("_object_name"))
27 {
28 }
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:46

Member Function Documentation

◆ buildOutputHideVariableList()

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

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

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 62 of file OutputInterface.C.

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

63 {
64  // Set of available names
65  const std::set<OutputName> & avail = _oi_output_warehouse.getOutputNames();
67  // Check for 'none'; hide variables on all outputs
68  if (_oi_outputs.find("none") != _oi_outputs.end())
69  for (const auto & name : avail)
70  _oi_output_warehouse.addInterfaceHideVariables(name, variable_names);
72  // Check for empty and 'all' in 'outputs' parameter; do not perform any variable restrictions in
73  // these cases
74  else if (_oi_outputs.empty() || _oi_outputs.find("all") != _oi_outputs.end())
75  return;
77  // Limit the variable output to Output objects listed
78  else
79  {
80  // Create a list of outputs where the variable should be hidden
81  std::set<OutputName> hide;
82  std::set_difference(avail.begin(),
83  avail.end(),
84  _oi_outputs.begin(),
85  _oi_outputs.end(),
86  std::inserter(hide, hide.begin()));
88  // If 'outputs' is specified add the object name to the list of items to hide
89  for (const auto & name : hide)
90  _oi_output_warehouse.addInterfaceHideVariables(name, variable_names);
91  }
92 }
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.

◆ getOutputs()

const std::set< OutputName > & OutputInterface::getOutputs ( )

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

A set of OutputNames

Definition at line 95 of file OutputInterface.C.

96 {
97  return _oi_outputs;
98 }
std::set< OutputName > _oi_outputs
The set of Output object names listed in the &#39;outputs&#39; parameter.

◆ getValue()

virtual PostprocessorValue Postprocessor::getValue ( )
pure virtual

◆ PPName()

std::string Postprocessor::PPName ( )

Returns the name of the Postprocessor.

Definition at line 43 of file Postprocessor.h.

43 { return _pp_name; }
std::string _pp_name
Definition: Postprocessor.h:46

Member Data Documentation

◆ _pp_name

std::string Postprocessor::_pp_name

Definition at line 46 of file Postprocessor.h.

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

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