www.mooseframework.org
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
AddAuxVariableAction Class Reference

Action for creating Auxiliary variables. More...

#include <AddAuxVariableAction.h>

Inheritance diagram for AddAuxVariableAction:
[legend]

Public Member Functions

 AddAuxVariableAction (InputParameters params)
 Class constructor. More...
 
virtual void act () override
 Method to add objects to the simulation or perform other setup tasks. More...
 
void timedAct ()
 The method called externally that causes the action to act() More...
 
virtual void addRelationshipManagers (Moose::RelationshipManagerType when_type)
 Method to add a relationship manager for the objects being added to the system. More...
 
const std::string & name () const
 The name of the action. More...
 
const std::string & type () const
 
InputParametersparameters ()
 
const InputParametersparameters () const
 
const std::string & specificTaskName () const
 
const std::set< std::string > & getAllTasks () const
 
template<typename T >
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 Verifies that the requested parameter exists and is not NULL and returns it to the caller. More...
 
bool isParamValid (const std::string &name) const
 
void appendTask (const std::string &task)
 
template<typename... Args>
void paramError (const std::string &param, Args... args)
 Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramWarning (const std::string &param, Args... args)
 Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramInfo (const std::string &param, Args... args)
 Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
void buildOutputHideVariableList (std::set< std::string > variable_names)
 Builds hide lists for output objects NOT listed in the 'outputs' parameter. More...
 
const std::set< OutputName > & getOutputs ()
 Get the list of output objects that this class is restricted. More...
 
std::string getBaseName () const
 Deprecated name methods, use name() More...
 
std::string getShortName () const
 DEPRECATED METHODS. More...
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object. More...
 

Static Public Member Functions

static MooseEnum getAuxVariableFamilies ()
 Returns available families for AuxVariables. More...
 
static MooseEnum getAuxVariableOrders ()
 Returns available orders for AuxVariables. More...
 
static MooseEnum getNonlinearVariableFamilies ()
 Get the possible variable families. More...
 
static MooseEnum getNonlinearVariableOrders ()
 Get the possible variable orders. More...
 

Public Attributes

const ConsoleStream _console
 An instance of helper class to write streams to the Console objects. More...
 

Protected Member Functions

void addVariable (const std::string &var_name)
 Adds a nonlinear variable to the system. More...
 
void createInitialConditionAction ()
 Create the action to generate the InitialCondition object. More...
 
std::set< SubdomainIDgetSubdomainIDs ()
 Get the block ids from the input parameters. More...
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level)
 Call to register a named section for timing. More...
 

Protected Attributes

FEType _fe_type
 FEType for the variable being created. More...
 
bool _scalar_var
 True if the variable being created is a scalar. More...
 
InputParameters _pars
 Input parameters for the action. More...
 
std::string _registered_identifier
 
std::string _name
 The name of the action. More...
 
std::string _action_type
 
MooseApp_app
 The MOOSE application this is associated with. More...
 
Factory_factory
 The Factory associated with the MooseApp. More...
 
ActionFactory_action_factory
 Builds Actions. More...
 
std::string _specific_task_name
 This member will only be populated if this Action instance is only designed to handle one task. More...
 
std::set< std::string > _all_tasks
 A list of all the tasks that this Action will satisfy. More...
 
ActionWarehouse_awh
 Reference to ActionWarehouse where we store object build by actions. More...
 
const std::string & _current_task
 The current action (even though we have seperate instances for each action) More...
 
std::shared_ptr< MooseMesh > & _mesh
 
std::shared_ptr< MooseMesh > & _displaced_mesh
 
std::shared_ptr< FEProblemBase > & _problem
 Convenience reference to a problem this action works on. More...
 
PerfID _act_timer
 Timers. More...
 
const InputParameters_pg_params
 Params. More...
 
PerfGraph_perf_graph
 The performance graph to add to. More...
 
std::string _prefix
 A prefix to use for all sections. More...
 

Static Protected Attributes

static const Real _abs_zero_tol = 1e-12
 Absolute zero tolerance. More...
 

Detailed Description

Action for creating Auxiliary variables.

Definition at line 25 of file AddAuxVariableAction.h.

Constructor & Destructor Documentation

◆ AddAuxVariableAction()

AddAuxVariableAction::AddAuxVariableAction ( InputParameters  params)

Class constructor.

Definition at line 38 of file AddAuxVariableAction.C.

38 : AddVariableAction(params) {}
AddVariableAction(InputParameters params)
Class constructor.

Member Function Documentation

◆ act()

void AddAuxVariableAction::act ( )
overridevirtual

Method to add objects to the simulation or perform other setup tasks.

Reimplemented from AddVariableAction.

Definition at line 54 of file AddAuxVariableAction.C.

55 {
56  // Name of variable being added
57  std::string var_name = name();
58 
59  // Blocks from the input
60  std::set<SubdomainID> blocks = getSubdomainIDs();
61 
62  // Scalar variable
63  if (_scalar_var)
64  _problem->addAuxScalarVariable(var_name, _fe_type.order);
65 
66  // Non-scalar variable
67  else
68  {
69  // Check that the order is valid (CONSTANT, FIRST, or SECOND)
70  if (_fe_type.order > 9)
71  mooseError("Non-scalar AuxVariables must be CONSTANT, FIRST, SECOND, THIRD, FOURTH, FIFTH, "
72  "SIXTH, SEVENTH, EIGHTH or NINTH order (",
73  _fe_type.order,
74  " supplied)");
75 
76  if (blocks.empty())
77  _problem->addAuxVariable(var_name, _fe_type);
78  else
79  _problem->addAuxVariable(var_name, _fe_type, &blocks);
80  }
81 
82  // Create the initial condition
83  if (isParamValid("initial_condition"))
85 }
bool isParamValid(const std::string &name) const
Definition: Action.h:101
std::set< SubdomainID > getSubdomainIDs()
Get the block ids from the input parameters.
bool _scalar_var
True if the variable being created is a scalar.
const std::string & name() const
The name of the action.
Definition: Action.h:62
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
FEType _fe_type
FEType for the variable being created.
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
Definition: Action.h:203
void createInitialConditionAction()
Create the action to generate the InitialCondition object.

◆ addRelationshipManagers()

void Action::addRelationshipManagers ( Moose::RelationshipManagerType  when_type)
virtualinherited

Method to add a relationship manager for the objects being added to the system.

Relationship managers have to be added relatively early. In many cases before the Action::act() method is called.

Parameters
when_typeThe parameter indicating the normal time for adding either Geometric or Algebraic RelationshipManagers. It may not always be possible to add your RelationshipManager as early as you'd like. In these cases, your DistributedMesh may consume more memory during the problem setup.

Reimplemented in MooseADObjectAction, and MooseObjectAction.

Definition at line 89 of file Action.C.

89 {}

◆ addVariable()

void AddVariableAction::addVariable ( const std::string &  var_name)
protectedinherited

Adds a nonlinear variable to the system.

Parameters
var_nameThe name of the variable.

Definition at line 132 of file AddVariableAction.C.

Referenced by AddVariableAction::act().

133 {
134  std::set<SubdomainID> blocks = getSubdomainIDs();
135  Real scale_factor = isParamValid("scaling") ? getParam<Real>("scaling") : 1;
136 
137  // Scalar variable
138  if (_scalar_var)
139  _problem->addScalarVariable(var_name, _fe_type.order, scale_factor);
140 
141  // Block restricted variable
142  else if (blocks.empty())
143  _problem->addVariable(var_name, _fe_type, scale_factor);
144 
145  // Non-block restricted variable
146  else
147  _problem->addVariable(var_name, _fe_type, scale_factor, &blocks);
148 
149  if (getParam<bool>("eigen"))
150  {
151  MooseEigenSystem & esys(static_cast<MooseEigenSystem &>(_problem->getNonlinearSystemBase()));
152  esys.markEigenVariable(var_name);
153  }
154 }
bool isParamValid(const std::string &name) const
Definition: Action.h:101
std::set< SubdomainID > getSubdomainIDs()
Get the block ids from the input parameters.
bool _scalar_var
True if the variable being created is a scalar.
FEType _fe_type
FEType for the variable being created.
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
Definition: Action.h:203

◆ appendTask()

void Action::appendTask ( const std::string &  task)
inlineinherited

Definition at line 103 of file Action.h.

103 { _all_tasks.insert(task); }
std::set< std::string > _all_tasks
A list of all the tasks that this Action will satisfy.
Definition: Action.h:191

◆ buildOutputHideVariableList()

void OutputInterface::buildOutputHideVariableList ( std::set< std::string >  variable_names)
inherited

Builds hide lists for output objects NOT listed in the 'outputs' parameter.

Parameters
variable_namesA set of variables for which the 'outputs' parameter controls

By default this is called by the constructor and passes the block name as the list of variables. This needs to be called explicitly if the build_list flag is set to False in the constructor. The latter cases is needed by the Material object to work correctly with the automatic material output capability.

Definition at line 62 of file OutputInterface.C.

Referenced by CheckOutputAction::checkVariableOutput(), and OutputInterface::OutputInterface().

63 {
64  // Set of available names
65  const std::set<OutputName> & avail = _oi_output_warehouse.getOutputNames();
66 
67  // Check for 'none'; hide variables on all outputs
68  if (_oi_outputs.find("none") != _oi_outputs.end())
69  for (const auto & name : avail)
70  _oi_output_warehouse.addInterfaceHideVariables(name, variable_names);
71 
72  // Check for empty and 'all' in 'outputs' parameter; do not perform any variable restrictions in
73  // these cases
74  else if (_oi_outputs.empty() || _oi_outputs.find("all") != _oi_outputs.end())
75  return;
76 
77  // Limit the variable output to Output objects listed
78  else
79  {
80  // Create a list of outputs where the variable should be hidden
81  std::set<OutputName> hide;
82  std::set_difference(avail.begin(),
83  avail.end(),
84  _oi_outputs.begin(),
85  _oi_outputs.end(),
86  std::inserter(hide, hide.begin()));
87 
88  // If 'outputs' is specified add the object name to the list of items to hide
89  for (const auto & name : hide)
90  _oi_output_warehouse.addInterfaceHideVariables(name, variable_names);
91  }
92 }
OutputWarehouse & _oi_output_warehouse
Reference to the OutputWarehouse for populating the Output object hide lists.
std::set< OutputName > _oi_outputs
The set of Output object names listed in the &#39;outputs&#39; parameter.
const std::set< OutputName > & getOutputNames()
Get a complete set of all output object names.
void addInterfaceHideVariables(const std::string &output_name, const std::set< std::string > &variable_names)
Insert variable names for hiding via the OutoutInterface.

◆ createInitialConditionAction()

void AddVariableAction::createInitialConditionAction ( )
protectedinherited

Create the action to generate the InitialCondition object.

If the user supplies a value for 'initial_condition' in the input file this method will create the proper InitialCondition object.

Definition at line 100 of file AddVariableAction.C.

Referenced by act(), and AddVariableAction::act().

101 {
102  // Variable name
103  std::string var_name = name();
104 
105  // Create the object name
106  std::string long_name("");
107  long_name += var_name;
108  long_name += "_moose";
109 
110  // Set the parameters for the action
111  InputParameters action_params = _action_factory.getValidParams("AddOutputAction");
112  action_params.set<ActionWarehouse *>("awh") = &_awh;
113 
114  if (_scalar_var)
115  action_params.set<std::string>("type") = "ScalarConstantIC";
116  else
117  action_params.set<std::string>("type") = "ConstantIC";
118 
119  // Create the action
120  std::shared_ptr<MooseObjectAction> action = std::static_pointer_cast<MooseObjectAction>(
121  _action_factory.create("AddInitialConditionAction", long_name, action_params));
122 
123  // Set the required parameters for the object to be created
124  action->getObjectParams().set<VariableName>("variable") = var_name;
125  action->getObjectParams().set<Real>("value") = getParam<Real>("initial_condition");
126 
127  // Store the action in the ActionWarehouse
128  _awh.addActionBlock(action);
129 }
bool _scalar_var
True if the variable being created is a scalar.
ActionWarehouse & _awh
Reference to ActionWarehouse where we store object build by actions.
Definition: Action.h:194
ActionFactory & _action_factory
Builds Actions.
Definition: Action.h:176
const std::string & name() const
The name of the action.
Definition: Action.h:62
InputParameters getValidParams(const std::string &name)
Definition: ActionFactory.C:70
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Storage for action instances.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void addActionBlock(std::shared_ptr< Action > blk)
This method add an Action instance to the warehouse.
InputParameters & getObjectParams()
Retreive the parameters of the object to be created by this action.
std::shared_ptr< Action > create(const std::string &action, const std::string &action_name, InputParameters parameters)
Definition: ActionFactory.C:41

◆ getAllTasks()

const std::set<std::string>& Action::getAllTasks ( ) const
inlineinherited

Definition at line 79 of file Action.h.

Referenced by AddKernelAction::act().

79 { return _all_tasks; }
std::set< std::string > _all_tasks
A list of all the tasks that this Action will satisfy.
Definition: Action.h:191

◆ getAuxVariableFamilies()

MooseEnum AddAuxVariableAction::getAuxVariableFamilies ( )
static

Returns available families for AuxVariables.

Returns
MooseEnum with the valid familes for AuxVariables

Definition at line 41 of file AddAuxVariableAction.C.

Referenced by validParams< AddAuxVariableAction >().

42 {
43  return MooseEnum("LAGRANGE MONOMIAL SCALAR", "LAGRANGE", true);
44 }
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:32

◆ getAuxVariableOrders()

MooseEnum AddAuxVariableAction::getAuxVariableOrders ( )
static

Returns available orders for AuxVariables.

Returns
MooseEnum with valid orders

Definition at line 47 of file AddAuxVariableAction.C.

Referenced by validParams< AddAuxVariableAction >().

48 {
49  return MooseEnum(
50  "CONSTANT FIRST SECOND THIRD FOURTH FIFTH SIXTH SEVENTH EIGHTH NINTH", "FIRST", true);
51 }
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:32

◆ getBaseName()

std::string Action::getBaseName ( ) const
inherited

Deprecated name methods, use name()

Definition at line 100 of file Action.C.

101 {
102  mooseDeprecated("getBaseName() is deprecated.");
103  return MooseUtils::baseName(_name);
104 }
std::string _name
The name of the action.
Definition: Action.h:164
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237
std::string baseName(const std::string &name)
Function for string the information before the final / in a parser block.
Definition: MooseUtils.C:366

◆ getCheckedPointerParam()

template<typename T >
T Action::getCheckedPointerParam ( const std::string &  name,
const std::string &  error_string = "" 
) const
inlineinherited

Verifies that the requested parameter exists and is not NULL and returns it to the caller.

The template parameter must be a pointer or an error will be thrown.

Definition at line 96 of file Action.h.

97  {
98  return parameters().getCheckedPointerParam<T>(name, error_string);
99  }
const std::string & name() const
The name of the action.
Definition: Action.h:62
T getCheckedPointerParam(const std::string &name, const std::string &error_string="") const
Verifies that the requested parameter exists and is not NULL and returns it to the caller...
InputParameters & parameters()
Definition: Action.h:74

◆ getNonlinearVariableFamilies()

MooseEnum AddVariableAction::getNonlinearVariableFamilies ( )
staticinherited

Get the possible variable families.

Returns
MooseEnum with the possible variable families (e.g., LAGRANGE)

Definition at line 74 of file AddVariableAction.C.

Referenced by validParams< AddVariableAction >().

75 {
76  return MooseEnum("LAGRANGE MONOMIAL HERMITE SCALAR HIERARCHIC CLOUGH XYZ SZABAB BERNSTEIN "
77  "L2_LAGRANGE L2_HIERARCHIC NEDELEC_ONE LAGRANGE_VEC",
78  "LAGRANGE");
79 }
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:32

◆ getNonlinearVariableOrders()

MooseEnum AddVariableAction::getNonlinearVariableOrders ( )
staticinherited

Get the possible variable orders.

Returns
MooseEnum with the possible variable orders (e.g., SECOND)

Definition at line 82 of file AddVariableAction.C.

Referenced by validParams< AddVariableAction >(), and validParams< EqualValueEmbeddedConstraint >().

83 {
84  return MooseEnum("CONSTANT FIRST SECOND THIRD FOURTH", "FIRST", true);
85 }
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:32

◆ getOutputs()

const std::set< OutputName > & OutputInterface::getOutputs ( )
inherited

Get the list of output objects that this class is restricted.

Returns
A set of OutputNames

Definition at line 95 of file OutputInterface.C.

96 {
97  return _oi_outputs;
98 }
std::set< OutputName > _oi_outputs
The set of Output object names listed in the &#39;outputs&#39; parameter.

◆ getParam()

template<typename T >
const T & Action::getParam ( const std::string &  name) const
inherited

Retrieve a parameter for the object.

Parameters
nameThe name of the parameter
Returns
The value of the parameter

Definition at line 211 of file Action.h.

Referenced by CreateDisplacedProblemAction::act(), AddPeriodicBCAction::act(), AddPeriodicBCAction::autoTranslationBoundaries(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), and MooseApp::getCheckpointDirectories().

212 {
213  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0));
214 }
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type)
const std::string & name() const
The name of the action.
Definition: Action.h:62
InputParameters _pars
Input parameters for the action.
Definition: Action.h:158

◆ getShortName()

std::string Action::getShortName ( ) const
inherited

DEPRECATED METHODS.

Definition at line 93 of file Action.C.

94 {
95  mooseDeprecated("getShortName() is deprecated.");
97 }
std::string shortName(const std::string &name)
Function for stripping name after the file / in parser block.
Definition: MooseUtils.C:360
std::string _name
The name of the action.
Definition: Action.h:164
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237

◆ getSubdomainIDs()

std::set< SubdomainID > AddVariableAction::getSubdomainIDs ( )
protectedinherited

Get the block ids from the input parameters.

Returns
A set of block ids defined in the input

Definition at line 157 of file AddVariableAction.C.

Referenced by act(), and AddVariableAction::addVariable().

158 {
159  // Extract and return the block ids supplied in the input
160  std::set<SubdomainID> blocks;
161  std::vector<SubdomainName> block_param = getParam<std::vector<SubdomainName>>("block");
162  for (const auto & subdomain_name : block_param)
163  {
164  SubdomainID blk_id = _problem->mesh().getSubdomainID(subdomain_name);
165  blocks.insert(blk_id);
166  }
167  return blocks;
168 }
subdomain_id_type SubdomainID
Definition: MooseTypes.h:95
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
Definition: Action.h:203

◆ isParamValid()

bool Action::isParamValid ( const std::string &  name) const
inlineinherited

Definition at line 101 of file Action.h.

Referenced by CopyNodalVarsAction::act(), SetAdaptivityOptionsAction::act(), SetupMeshAction::act(), CreateDisplacedProblemAction::act(), act(), AddVariableAction::act(), AddVariableAction::addVariable(), AddPeriodicBCAction::autoTranslationBoundaries(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), and SetupMeshAction::setupMesh().

101 { return _pars.isParamValid(name); }
const std::string & name() const
The name of the action.
Definition: Action.h:62
InputParameters _pars
Input parameters for the action.
Definition: Action.h:158
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ name()

const std::string& Action::name ( ) const
inlineinherited

◆ paramError()

template<typename... Args>
void Action::paramError ( const std::string &  param,
Args...  args 
)
inlineinherited

Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseError - only printing a message using the given args.

Definition at line 112 of file Action.h.

113  {
114  auto prefix = param + ": ";
115  if (!_pars.inputLocation(param).empty())
116  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
117  mooseError(prefix, args...);
118  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
InputParameters _pars
Input parameters for the action.
Definition: Action.h:158
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.

◆ parameters() [1/2]

InputParameters& Action::parameters ( )
inlineinherited

Definition at line 74 of file Action.h.

Referenced by Action::getCheckedPointerParam(), GlobalParamsAction::remove(), GlobalParamsAction::setDoubleIndexParam(), GlobalParamsAction::setScalarParam(), and GlobalParamsAction::setVectorParam().

74 { return _pars; }
InputParameters _pars
Input parameters for the action.
Definition: Action.h:158

◆ parameters() [2/2]

const InputParameters& Action::parameters ( ) const
inlineinherited

Definition at line 75 of file Action.h.

75 { return _pars; }
InputParameters _pars
Input parameters for the action.
Definition: Action.h:158

◆ paramInfo()

template<typename... Args>
void Action::paramInfo ( const std::string &  param,
Args...  args 
)
inlineinherited

Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseInfo - only printing a message using the given args.

Definition at line 143 of file Action.h.

144  {
145  auto prefix = param + ": ";
146  if (!_pars.inputLocation(param).empty())
147  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
148  mooseInfo(prefix, args...);
149  }
void mooseInfo(Args &&... args)
Emit an informational message with the given stringified, concatenated args.
Definition: MooseError.h:253
InputParameters _pars
Input parameters for the action.
Definition: Action.h:158
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.

◆ paramWarning()

template<typename... Args>
void Action::paramWarning ( const std::string &  param,
Args...  args 
)
inlineinherited

Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseWarning - only printing a message using the given args.

Definition at line 127 of file Action.h.

128  {
129  auto prefix = param + ": ";
130  if (!_pars.inputLocation(param).empty())
131  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
132  mooseWarning(prefix, args...);
133  }
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
Definition: MooseError.h:220
InputParameters _pars
Input parameters for the action.
Definition: Action.h:158
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.

◆ registerTimedSection()

PerfID PerfGraphInterface::registerTimedSection ( const std::string &  section_name,
const unsigned int  level 
)
protectedinherited

Call to register a named section for timing.

Parameters
section_nameThe name of the code section to be timed
levelThe importance of the timer - lower is more important (0 will always come out)
Returns
The ID of the section - use when starting timing

Definition at line 50 of file PerfGraphInterface.C.

51 {
52  if (_prefix != "")
53  return _perf_graph.registerSection(_prefix + "::" + section_name, level);
54  else
55  return _perf_graph.registerSection(section_name, level);
56 }
PerfGraph & _perf_graph
The performance graph to add to.
std::string _prefix
A prefix to use for all sections.
PerfID registerSection(const std::string &section_name, unsigned int level)
Registers a named section of code.
Definition: PerfGraph.C:41

◆ specificTaskName()

const std::string& Action::specificTaskName ( ) const
inlineinherited

Definition at line 77 of file Action.h.

77 { return _specific_task_name; }
std::string _specific_task_name
This member will only be populated if this Action instance is only designed to handle one task...
Definition: Action.h:184

◆ timedAct()

void Action::timedAct ( )
inherited

The method called externally that causes the action to act()

Definition at line 83 of file Action.C.

84 {
85  TIME_SECTION(_act_timer);
86  act();
87 }
PerfID _act_timer
Timers.
Definition: Action.h:206
virtual void act()=0
Method to add objects to the simulation or perform other setup tasks.

◆ type()

const std::string& Action::type ( ) const
inlineinherited

Member Data Documentation

◆ _abs_zero_tol

const Real AddVariableAction::_abs_zero_tol = 1e-12
staticprotectedinherited

Absolute zero tolerance.

Definition at line 79 of file AddVariableAction.h.

◆ _act_timer

PerfID Action::_act_timer
protectedinherited

Timers.

Definition at line 206 of file Action.h.

Referenced by Action::timedAct().

◆ _action_factory

ActionFactory& Action::_action_factory
protectedinherited

◆ _action_type

std::string Action::_action_type
protectedinherited

Definition at line 167 of file Action.h.

Referenced by Action::type().

◆ _all_tasks

std::set<std::string> Action::_all_tasks
protectedinherited

A list of all the tasks that this Action will satisfy.

Note: That this is not populated at construction time. However, all tasks will be added prior to act().

Definition at line 191 of file Action.h.

Referenced by Action::appendTask(), and Action::getAllTasks().

◆ _app

MooseApp& Action::_app
protectedinherited

◆ _awh

ActionWarehouse& Action::_awh
protectedinherited

◆ _console

const ConsoleStream ConsoleStreamInterface::_console
inherited

An instance of helper class to write streams to the Console objects.

Definition at line 32 of file ConsoleStreamInterface.h.

Referenced by IterationAdaptiveDT::acceptStep(), SetupRecoverFileBaseAction::act(), Adaptivity::adaptMesh(), FEProblemBase::adaptMesh(), SimplePredictor::apply(), FEProblemBase::backupMultiApps(), FEProblemBase::checkProblemIntegrity(), IterationAdaptiveDT::computeAdaptiveDT(), Transient::computeConstrainedDT(), NonlinearSystemBase::computeDamping(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInterpolationDT(), FEProblemBase::computeResidualTags(), IterationAdaptiveDT::constrainStep(), TimeStepper::constrainStep(), AB2PredictorCorrector::converged(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), MultiAppPostprocessorTransfer::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppInterpolationTransfer::execute(), MultiAppMeshFunctionTransfer::execute(), MultiAppUserObjectTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppVectorPostprocessorTransfer::execute(), MultiAppCopyTransfer::execute(), Steady::execute(), MultiAppDTKUserObjectTransfer::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), FEProblemBase::FEProblemBase(), ElementQualityChecker::finalize(), FEProblemBase::finishMultiAppStep(), MultiApp::globalAppToLocal(), InversePowerMethod::init(), NonlinearEigen::init(), Steady::init(), FEProblemBase::initialAdaptMesh(), FEProblemBase::initialSetup(), EigenExecutionerBase::inversePowerIteration(), Transient::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), EigenExecutionerBase::makeBXConsistent(), Console::meshChanged(), MooseObject::mooseDeprecated(), MooseObject::mooseInfo(), MooseObject::mooseWarning(), PerfGraphOutput::output(), DOFMapOutput::output(), VariableResidualNormsDebugOutput::output(), Console::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), Console::outputPostprocessors(), Console::outputScalarVariables(), Console::outputSystemInformation(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), ActionWarehouse::printActionDependencySets(), EigenExecutionerBase::printEigenvalue(), MaterialPropertyDebugOutput::printMaterialMap(), SolutionTimeAdaptiveDT::rejectStep(), DT2::rejectStep(), FEProblemBase::restoreMultiApps(), SimplePredictor::shouldApply(), NonlinearSystem::solve(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), AStableDirk4::solve(), LStableDirk4::solve(), ExplicitRK2::solve(), TransientMultiApp::solveStep(), Transient::solveStep(), DT2::step(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and FEProblemBase::~FEProblemBase().

◆ _current_task

const std::string& Action::_current_task
protectedinherited

◆ _displaced_mesh

std::shared_ptr<MooseMesh>& Action::_displaced_mesh
protectedinherited

◆ _factory

Factory& Action::_factory
protectedinherited

◆ _fe_type

FEType AddVariableAction::_fe_type
protectedinherited

FEType for the variable being created.

Definition at line 73 of file AddVariableAction.h.

Referenced by act(), and AddVariableAction::addVariable().

◆ _mesh

std::shared_ptr<MooseMesh>& Action::_mesh
protectedinherited

◆ _name

std::string Action::_name
protectedinherited

◆ _pars

InputParameters Action::_pars
protectedinherited

◆ _perf_graph

PerfGraph& PerfGraphInterface::_perf_graph
protectedinherited

The performance graph to add to.

Definition at line 66 of file PerfGraphInterface.h.

Referenced by PerfGraphData::getValue(), and PerfGraphInterface::registerTimedSection().

◆ _pg_params

const InputParameters* PerfGraphInterface::_pg_params
protectedinherited

Params.

Definition at line 63 of file PerfGraphInterface.h.

◆ _prefix

std::string PerfGraphInterface::_prefix
protectedinherited

A prefix to use for all sections.

Definition at line 69 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::registerTimedSection().

◆ _problem

std::shared_ptr<FEProblemBase>& Action::_problem
protectedinherited

Convenience reference to a problem this action works on.

Definition at line 203 of file Action.h.

Referenced by AddADKernelAction::act(), AddBCAction::act(), AddTransferAction::act(), AddKernelAction::act(), InitProblemAction::act(), AddIndicatorAction::act(), AddMarkerAction::act(), AddDamperAction::act(), AddMultiAppAction::act(), AddNodalKernelAction::act(), AddBoundsVectorsAction::act(), AddConstraintAction::act(), AddInitialConditionAction::act(), CopyNodalVarsAction::act(), SetAdaptivityOptionsAction::act(), AddVectorPostprocessorAction::act(), CreateExecutionerAction::act(), AddICAction::act(), AddElementalFieldAction::act(), AddPostprocessorAction::act(), AddDiracKernelAction::act(), AddUserObjectAction::act(), SetupDampersAction::act(), AddInterfaceKernelAction::act(), CheckIntegrityAction::act(), AddScalarKernelAction::act(), AddADMaterialAction::act(), AddDGKernelAction::act(), AddMaterialAction::act(), AddFieldSplitAction::act(), CreateProblemAction::act(), CreateProblemDefaultAction::act(), SetupDebugAction::act(), AdaptivityAction::act(), AddFunctionAction::act(), AddDistributionAction::act(), CreateDisplacedProblemAction::act(), SetupPreconditionerAction::act(), SetupTimeIntegratorAction::act(), SetupTimeStepperAction::act(), SetupPredictorAction::act(), SetupResidualDebugAction::act(), MaterialDerivativeTestAction::act(), SetupQuadratureAction::act(), AddSamplerAction::act(), AddExternalAuxVariableAction::act(), act(), AddOutputAction::act(), AddPeriodicBCAction::act(), MaterialOutputAction::act(), AddControlAction::act(), AddNodalNormalsAction::act(), SetupPostprocessorDataAction::act(), AddVariableAction::addVariable(), AddPeriodicBCAction::autoTranslationBoundaries(), CheckOutputAction::checkMaterialOutput(), AddVariableAction::getSubdomainIDs(), and AddPeriodicBCAction::setPeriodicVars().

◆ _registered_identifier

std::string Action::_registered_identifier
protectedinherited

Definition at line 161 of file Action.h.

◆ _scalar_var

bool AddVariableAction::_scalar_var
protectedinherited

True if the variable being created is a scalar.

Definition at line 76 of file AddVariableAction.h.

Referenced by act(), AddVariableAction::addVariable(), and AddVariableAction::createInitialConditionAction().

◆ _specific_task_name

std::string Action::_specific_task_name
protectedinherited

This member will only be populated if this Action instance is only designed to handle one task.

This happens when an Action is registered with several pieces of syntax in which case separate instances are built to handle the different incoming parameter values.

Definition at line 184 of file Action.h.

Referenced by Action::specificTaskName().


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