www.mooseframework.org
Terminator.h
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 #ifndef TERMINATOR_H
15 #define TERMINATOR_H
16 
17 #include "GeneralUserObject.h"
18 #include "libmesh/fparser.hh"
19 
20 // Forward Declarations
21 class Terminator;
22 
23 template <>
25 
46 {
47 public:
50  virtual ~Terminator();
51 
52  virtual void initialize() override {}
53  virtual void execute() override;
54  virtual void finalize() override {}
55 
56 protected:
58  std::vector<std::string> _pp_names;
59 
60  // Number of postprocessors the expression depends on
61  unsigned int _pp_num;
62 
64  std::vector<const PostprocessorValue *> _pp_values;
65 
66  std::string _expression;
67 
70 
72  Real * _params;
73 };
74 
75 #endif // TERMINATOR_H
InputParameters validParams< Terminator >()
Definition: Terminator.C:20
Terminator(const InputParameters &parameters)
Definition: Terminator.C:31
std::vector< std::string > _pp_names
Postprocessor names.
Definition: Terminator.h:58
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
Definition: Terminator.h:52
std::string _expression
Definition: Terminator.h:66
std::vector< const PostprocessorValue * > _pp_values
Postprocessor values.
Definition: Terminator.h:64
This Userobject requests termination of the current solve based on the values of Postprocessors (and ...
Definition: Terminator.h:45
virtual void finalize() override
Finalize.
Definition: Terminator.h:54
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
Real * _params
Fparser parameter buffer.
Definition: Terminator.h:72
virtual void execute() override
Execute method.
Definition: Terminator.C:56
virtual ~Terminator()
The Terminator DEFINITELY needs a destructor!
Definition: Terminator.C:53
FunctionParserBase< Real > _fp
Fparser object.
Definition: Terminator.h:69
unsigned int _pp_num
Definition: Terminator.h:61