https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ConditionalEnableControl.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 "Control.h"
13
18{
19public:
21
23
24 virtual void execute() override;
25
26protected:
33 virtual bool conditionMet(const unsigned int & i) = 0;
34
36 const std::vector<std::string> & _enable;
37
39 const std::vector<std::string> & _disable;
40
42 const bool & _reverse_on_false;
43};
Base class for controls that enable/disable object(s) based on some condition.
const std::vector< std::string > & _enable
List of objects to enable if condition is met.
virtual bool conditionMet(const unsigned int &i)=0
Condition that must be true for an entry of the "enable" list to be enabled and/or an entry of the "d...
virtual void execute() override
Execute the control.
const std::vector< std::string > & _disable
List of objects to disable if condition is met.
static InputParameters validParams()
const bool & _reverse_on_false
When true, the disable/enable lists are set to opposite values when the specified condition is false.
Base class for Control objects.
Definition Control.h:44
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131