https://mooseframework.inl.gov
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ControlDataValue Class Referenceabstract

Abstract definition of a ControlData value. More...

#include <ControlData.h>

Inheritance diagram for ControlDataValue:
[legend]

Public Member Functions

 ControlDataValue (MooseApp &moose_app, const std::string &name)
 Constructor. More...
 
virtual ~ControlDataValue ()=default
 Destructor. More...
 
virtual std::string type ()=0
 String identifying the type of parameter stored. More...
 
const std::string & name () const
 The full (unique) name of this particular piece of data. More...
 
const THMControlgetControl () const
 Get the pointer to the control object that declared this control data. More...
 
void setControl (THMControl *ctrl)
 Set the pointer to the control object that declared this control data. More...
 
void setDeclared ()
 Mark the data as declared. More...
 
bool getDeclared ()
 Get the declared state. More...
 
virtual void copyValuesBack ()=0
 Copy the current value into old (i.e. More...
 

Protected Member Functions

T & declareRestartableData (const std::string &data_name, Args &&... args)
 
ManagedValue< T > declareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
const T & getRestartableData (const std::string &data_name) const
 
T & declareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
T & declareRecoverableData (const std::string &data_name, Args &&... args)
 
T & declareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 
T & declareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 
std::string restartableName (const std::string &data_name) const
 

Protected Attributes

const std::string _name
 The full (unique) name of this particular piece of data. More...
 
bool _declared
 true if the data was declared by calling declareControlData. All data must be declared up front. More...
 
THMControl_control
 The control object that declared this control data. More...
 
MooseApp_restartable_app
 
const std::string _restartable_system_name
 
const THREAD_ID _restartable_tid
 
const bool _restartable_read_only
 

Detailed Description

Abstract definition of a ControlData value.

Definition at line 20 of file ControlData.h.

Constructor & Destructor Documentation

◆ ControlDataValue()

ControlDataValue::ControlDataValue ( MooseApp moose_app,
const std::string &  name 
)
inline

Constructor.

Parameters
moose_appMOOSEApp object this object belong to
nameThe full (unique) name for this piece of data.

Definition at line 28 of file ControlData.h.

29  : Restartable(moose_app, name, "thm::control_logic", 0),
30  _name(name),
31  _declared(false),
32  _control(nullptr)
33  {
34  }
bool _declared
true if the data was declared by calling declareControlData. All data must be declared up front...
Definition: ControlData.h:81
const std::string _name
The full (unique) name of this particular piece of data.
Definition: ControlData.h:79
Restartable(const MooseObject *moose_object, const std::string &system_name)
THMControl * _control
The control object that declared this control data.
Definition: ControlData.h:83
const std::string & name() const
The full (unique) name of this particular piece of data.
Definition: ControlData.h:50

◆ ~ControlDataValue()

virtual ControlDataValue::~ControlDataValue ( )
virtualdefault

Destructor.

Member Function Documentation

◆ copyValuesBack()

virtual void ControlDataValue::copyValuesBack ( )
pure virtual

Copy the current value into old (i.e.

shift it "back in time")

Implemented in ControlData< T >, ControlData< bool >, and ControlData< Real >.

◆ getControl()

const THMControl* ControlDataValue::getControl ( ) const
inline

Get the pointer to the control object that declared this control data.

Definition at line 55 of file ControlData.h.

Referenced by Simulation::controlDataIntegrityCheck().

55 { return _control; }
THMControl * _control
The control object that declared this control data.
Definition: ControlData.h:83

◆ getDeclared()

bool ControlDataValue::getDeclared ( )
inline

Get the declared state.

Definition at line 70 of file ControlData.h.

Referenced by Simulation::declareControlData().

70 { return _declared; }
bool _declared
true if the data was declared by calling declareControlData. All data must be declared up front...
Definition: ControlData.h:81

◆ name()

const std::string& ControlDataValue::name ( ) const
inline

The full (unique) name of this particular piece of data.

Definition at line 50 of file ControlData.h.

50 { return _name; }
const std::string _name
The full (unique) name of this particular piece of data.
Definition: ControlData.h:79

◆ setControl()

void ControlDataValue::setControl ( THMControl ctrl)
inline

Set the pointer to the control object that declared this control data.

Definition at line 60 of file ControlData.h.

Referenced by Simulation::declareControlData().

60 { _control = ctrl; }
THMControl * _control
The control object that declared this control data.
Definition: ControlData.h:83

◆ setDeclared()

void ControlDataValue::setDeclared ( )
inline

Mark the data as declared.

Definition at line 65 of file ControlData.h.

Referenced by Simulation::declareControlData().

65 { _declared = true; }
bool _declared
true if the data was declared by calling declareControlData. All data must be declared up front...
Definition: ControlData.h:81

◆ type()

virtual std::string ControlDataValue::type ( )
pure virtual

String identifying the type of parameter stored.

Must be reimplemented in derived classes.

Implemented in ControlData< T >, ControlData< bool >, and ControlData< Real >.

Member Data Documentation

◆ _control

THMControl* ControlDataValue::_control
protected

The control object that declared this control data.

Definition at line 83 of file ControlData.h.

Referenced by getControl(), and setControl().

◆ _declared

bool ControlDataValue::_declared
protected

true if the data was declared by calling declareControlData. All data must be declared up front.

Definition at line 81 of file ControlData.h.

Referenced by getDeclared(), and setDeclared().

◆ _name

const std::string ControlDataValue::_name
protected

The full (unique) name of this particular piece of data.

Definition at line 79 of file ControlData.h.

Referenced by name().


The documentation for this class was generated from the following file: