https://mooseframework.inl.gov
TerminateChainControl.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 
10 #pragma once
11 
12 #include "ChainControl.h"
13 
18 {
19 public:
21 
23 
24  virtual void execute() override;
25 
26 protected:
30  void terminate();
31 
33  const bool _terminate_on_true;
34 
36  const bool _throw_error;
37 
39  const std::string & _termination_message;
40 
42  const bool & _input;
43 };
const bool _terminate_on_true
Whether to terminate on true or false.
const bool _throw_error
Flag to throw an error if the terminate condition is met.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const std::string & _termination_message
Message to use if termination occurs.
TerminateChainControl(const InputParameters &parameters)
virtual void execute() override
Execute the control.
static InputParameters validParams()
const bool & _input
The control data that indicates if the simulation should be terminated.
Terminates the simulation when a boolean chain control data has a certain value.
const InputParameters & parameters() const
Get the parameters of the object.
void terminate()
Performs termination.
Control that additionally provides the capability to produce/consume data values, to allow control op...
Definition: ChainControl.h:21