www.mooseframework.org
TestSetupPostprocessorDataActionFunction.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 
13 
14 template <>
17 {
19  params.addRequiredParam<PostprocessorName>("postprocessor", "A postprocessor to test against");
20  return params;
21 }
22 
24  const InputParameters & parameters)
25  : Function(parameters)
26 {
27  if (hasPostprocessor("postprocessor"))
28  mooseError("TestSetupPostprocessorDataActionFunction pass");
29  else
30  mooseError("TestSetupPostprocessorDataActionFunction fail");
31 }
bool hasPostprocessor(const std::string &name) const
Determine if the Postprocessor exists.
Base class for function objects.
Definition: Function.h:40
registerMooseObject("MooseApp", TestSetupPostprocessorDataActionFunction)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void mooseError(Args &&... args) const
Definition: MooseObject.h:147
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...
A class for testing SetupPostprocessorDataAction.
InputParameters validParams< TestSetupPostprocessorDataActionFunction >()
InputParameters validParams< Function >()
Definition: Function.C:14
TestSetupPostprocessorDataActionFunction(const InputParameters &parameters)
Class constructor.