www.mooseframework.org
TestSetupPostprocessorDataActionFunction.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 
16 
17 template <>
20 {
22  params.addRequiredParam<PostprocessorName>("postprocessor", "A postprocessor to test against");
23  return params;
24 }
25 
27  const InputParameters & parameters)
28  : Function(parameters)
29 {
30  if (hasPostprocessor("postprocessor"))
31  mooseError("TestSetupPostprocessorDataActionFunction pass");
32  else
33  mooseError("TestSetupPostprocessorDataActionFunction fail");
34 }
Base class for function objects.
Definition: Function.h:46
bool hasPostprocessor(const std::string &name) const
Determine if the Postprocessor exists.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
InputParameters validParams< TestSetupPostprocessorDataActionFunction >()
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
InputParameters validParams< Function >()
Definition: Function.C:19
TestSetupPostprocessorDataActionFunction(const InputParameters &parameters)
Class constructor.