System that manages ChainControls. More...
#include <ChainControlDataSystem.h>
Public Member Functions | |
ChainControlDataSystem (MooseApp &app) | |
bool | hasChainControlData (const std::string &data_name) const |
Queries if the chain control data of the given name exists. More... | |
template<typename T > | |
bool | hasChainControlDataOfType (const std::string &data_name) const |
Queries if the chain control data of the given name and type exists. More... | |
template<typename T > | |
ChainControlData< T > & | getChainControlData (const std::string &data_name) |
Gets the chain control data of the given name and type and creates if it does not exist. More... | |
template<typename T > | |
ChainControlData< T > & | declareChainControlData (const std::string &data_name, ChainControl &chain_control) |
Declares chain control data of of the given name and type and creates if it does not exist. More... | |
void | copyValuesBack () |
Copies current chain control data values into old values. More... | |
const std::map< std::string, std::unique_ptr< ChainControlDataBase > > & | getChainControlDataMap () const |
Gets the map of ChainControlData names to the relevant ChainControlDataBase. More... | |
Private Attributes | |
MooseApp & | _app |
The MooseApp that owns this system. More... | |
std::map< std::string, std::unique_ptr< ChainControlDataBase > > | _chain_control_data_map |
Map of chain control data name to its value. More... | |
System that manages ChainControls.
To be owned by the MooseApp.
Definition at line 23 of file ChainControlDataSystem.h.
ChainControlDataSystem::ChainControlDataSystem | ( | MooseApp & | app | ) |
Definition at line 12 of file ChainControlDataSystem.C.
void ChainControlDataSystem::copyValuesBack | ( | ) |
Copies current chain control data values into old values.
Definition at line 21 of file ChainControlDataSystem.C.
Referenced by ChainControlSetupAction::act(), and FEProblemBase::advanceState().
ChainControlData< T > & ChainControlDataSystem::declareChainControlData | ( | const std::string & | data_name, |
ChainControl & | chain_control | ||
) |
Declares chain control data of of the given name and type and creates if it does not exist.
If the data has already been declared, an error is thrown; otherwise the data is now set to be declared, and the declaring ChainControl is captured.
T | Type of the data |
[in] | data_name | Chain control data name |
[in] | chain_control | Chain control that is declaring the data |
Definition at line 126 of file ChainControlDataSystem.h.
Referenced by ChainControl::declareChainControlData().
ChainControlData< T > & ChainControlDataSystem::getChainControlData | ( | const std::string & | data_name | ) |
Gets the chain control data of the given name and type and creates if it does not exist.
If the data exists but of another type, then an error is thrown.
T | Type of the data |
[in] | data_name | Chain control data name |
Definition at line 105 of file ChainControlDataSystem.h.
Referenced by ChainControl::getChainControlDataOldByName(), and ChainControlParsedFunctionWrapper::initializeFunctionInputs().
const std::map< std::string, std::unique_ptr< ChainControlDataBase > > & ChainControlDataSystem::getChainControlDataMap | ( | ) | const |
Gets the map of ChainControlData names to the relevant ChainControlDataBase.
Definition at line 28 of file ChainControlDataSystem.C.
Referenced by ChainControlSetupAction::act().
bool ChainControlDataSystem::hasChainControlData | ( | const std::string & | data_name | ) | const |
Queries if the chain control data of the given name exists.
[in] | data_name | Chain control data name |
Definition at line 15 of file ChainControlDataSystem.C.
Referenced by getChainControlData(), and hasChainControlDataOfType().
bool ChainControlDataSystem::hasChainControlDataOfType | ( | const std::string & | data_name | ) | const |
Queries if the chain control data of the given name and type exists.
T | Type of the data |
[in] | data_name | Chain control data name |
Definition at line 94 of file ChainControlDataSystem.h.
Referenced by ChainControlParsedFunctionWrapper::initializeFunctionInputs().
|
private |
The MooseApp that owns this system.
Definition at line 86 of file ChainControlDataSystem.h.
Referenced by getChainControlData().
|
private |
Map of chain control data name to its value.
Definition at line 89 of file ChainControlDataSystem.h.
Referenced by copyValuesBack(), getChainControlData(), getChainControlDataMap(), hasChainControlData(), and hasChainControlDataOfType().