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

Adds nonlinear variable. More...

#include <AddVariableAction.h>

Inheritance diagram for AddVariableAction:
[legend]

Public Member Functions

 AddVariableAction (InputParameters params)
 
virtual void act () override
 Method to add objects to the simulation or perform other setup tasks. More...
 
virtual void addRelationshipManagers (Moose::RelationshipManagerType when_type) override
 Method to add a relationship manager for the objects being added to the system. More...
 
void addRelationshipManagers (Moose::RelationshipManagerType when_type, const InputParameters &moose_object_pars)
 Method to add a relationship manager for the objects being added to the system. More...
 
virtual void addRelationshipManagers (Moose::RelationshipManagerType when_type)
 Method to add a relationship manager for the objects being added to the system. More...
 
InputParametersgetObjectParams ()
 Retreive the parameters of the object to be created by this action. More...
 
const InputParametersgetObjectParams () const
 Constant version of retreiving the parameters of the object to be created by this action. More...
 
const std::string & getMooseObjectType () const
 Return the object type to be created. More...
 
void timedAct ()
 The method called externally that causes the action to act() 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...
 
std::string getBaseName () const
 Deprecated name methods, use name() More...
 
std::string getShortName () const
 DEPRECATED METHODS. More...
 
template<typename T >
const T & getParamTempl (const std::string &name) const
 Retrieve a parameter for the object. More...
 

Static Public Member Functions

static InputParameters validParams ()
 Class constructor. More...
 
static MooseEnum getNonlinearVariableFamilies ()
 Get the possible variable families. More...
 
static MooseEnum getNonlinearVariableOrders ()
 Get the possible variable orders. More...
 
static FEType feType (const InputParameters &params)
 determine the FEType by examining family and order in the provided parameters More...
 
static std::string determineType (const FEType &fe_type, unsigned int components)
 determine the variable type given an FEType and number of components More...
 

Public Attributes

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

Static Public Attributes

static constexpr auto FILE_SUFFIX = "_mesh"
 The suffix appended when writing the restartable data file. More...
 
static constexpr auto SYSTEM = "MeshMetaData"
 The system name used when initializing the Restartable interface. More...
 
static constexpr auto NAME = "<empty>"
 The data name used when initializing the Restartable interface for non-MeshGenerator objects. More...
 

Protected Member Functions

virtual void init ()
 Initialize the action's member variables. More...
 
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...
 
void addRelationshipManagers (Moose::RelationshipManagerType when_type, const InputParameters &moose_object_pars)
 Method to add a relationship manager for the objects being added to the system. More...
 
template<typename T >
const T & getMeshProperty (const std::string &data_name, const std::string &prefix)
 Method for retrieving a property with the given type and name exists in the mesh meta-data store. 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...
 
unsigned int _components
 Number of components for an array variable. More...
 
std::function< void(FEProblemBase &, const std::string &, const std::string &, InputParameters &)> _problem_add_var_method
 
std::string _type
 The Object type that is being created. More...
 
InputParameters _moose_object_pars
 The parameters for the object to be created. 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...
 

Private Member Functions

void addRelationshipManager (Moose::RelationshipManagerType input_rm_type, const InputParameters &moose_object_pars, std::string rm_name, Moose::RelationshipManagerType rm_type, Moose::RelationshipManagerInputParameterCallback rm_input_parameter_func, Moose::RMSystemType sys_type)
 Method for adding a single relationship manager. More...
 
RestartableDataValueregisterMetaDataOnApp (const std::string &name, std::unique_ptr< RestartableDataValue > data)
 Helper function for actually registering the restartable data. More...
 

Private Attributes

MooseApp_meta_data_app
 Reference to the application. More...
 

Detailed Description

Adds nonlinear variable.

Definition at line 25 of file AddVariableAction.h.

Constructor & Destructor Documentation

◆ AddVariableAction()

AddVariableAction::AddVariableAction ( InputParameters  params)

Definition at line 58 of file AddVariableAction.C.

59  : MooseObjectAction(params),
60  _fe_type(feType(params)),
61  _scalar_var(_fe_type.family == SCALAR),
62  _components(1)
63 {
64 }

Member Function Documentation

◆ act()

void AddVariableAction::act ( )
overridevirtual

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

Implements Action.

Reimplemented in AddElementalFieldAction.

Definition at line 139 of file AddVariableAction.C.

140 {
141  // If we've been called that means that current_task == "add_variable"
142  init();
143 
144  // Get necessary data for creating a variable
145  std::string var_name = name();
146  addVariable(var_name);
147 
148  // Set the initial condition
149  if (_moose_object_pars.isParamValid("initial_condition"))
151 }

◆ addRelationshipManager()

void Action::addRelationshipManager ( Moose::RelationshipManagerType  input_rm_type,
const InputParameters moose_object_pars,
std::string  rm_name,
Moose::RelationshipManagerType  rm_type,
Moose::RelationshipManagerInputParameterCallback  rm_input_parameter_func,
Moose::RMSystemType  sys_type 
)
privateinherited

Method for adding a single relationship manager.

Parameters
input_rm_typeWhat relationship manager type we are currently adding
moose_object_parsThe parameters of the MooseObject that requested the RM
rm_nameThe class type of the RM, e.g. ElementSideNeighborLayers
rm_typeThe RelationshipManagerType, e.g. geometric, algebraic, coupling
rm_input_parameter_funcThe RM callback function, typically a lambda defined in the requesting MooseObject's validParams function
sys_typeA RMSystemType that can be used to limit the systems and consequent dof_maps that the RM can be attached to

Definition at line 97 of file Action.C.

104 {
105  // These need unique names
106  static unsigned int unique_object_id = 0;
107 
108  auto new_name = moose_object_pars.get<std::string>("_moose_base") + '_' + name() + '_' + rm_name +
109  "_" + Moose::stringify(rm_type) + " " + std::to_string(unique_object_id);
110 
111  auto rm_params = _factory.getValidParams(rm_name);
112  rm_params.set<Moose::RelationshipManagerType>("rm_type") = rm_type;
113  rm_params.set<Moose::RMSystemType>("system_type") = sys_type;
114 
115  auto for_whom = name();
116  if (sys_type == Moose::RMSystemType::NONLINEAR)
117  for_whom += "_nl";
118  else if (sys_type == Moose::RMSystemType::AUXILIARY)
119  for_whom += "_aux";
120  rm_params.set<std::string>("for_whom") = for_whom;
121 
122  // Figure out if we shouldn't be adding this one yet
123  if (((rm_type & input_rm_type) != input_rm_type)
124 
125  || // Or are we adding Geometric but this one needs to be delayed
126 
127  (((input_rm_type & Moose::RelationshipManagerType::GEOMETRIC) ==
131  !rm_params.template get<bool>("attach_geometric_early"))
132 
133  || // Or is this an Algebraic/Coupling and Geometric one that we already added earlier?
134 
135  (((input_rm_type != Moose::RelationshipManagerType::GEOMETRIC) &&
139  rm_params.template get<bool>("attach_geometric_early"))))
140  return;
141 
142  // If there is a callback for setting the RM parameters let's use it
143  if (rm_input_parameter_func)
144  rm_input_parameter_func(moose_object_pars, rm_params);
145 
146  // If we're doing geometric but we can't build it early - then let's not build it yet
147  // (It will get built when we do algebraic)
148  if ((input_rm_type & Moose::RelationshipManagerType::GEOMETRIC) ==
150  !rm_params.get<bool>("attach_geometric_early"))
151  {
152  // We also need to tell the mesh not to delete remote elements yet
153  // Note this will get reset in AddRelationshipManager::act() when attaching Algebraic
154  _mesh->getMesh().allow_remote_element_removal(false);
155 
156  if (_problem->getDisplacedProblem())
157  _problem->getDisplacedProblem()->mesh().getMesh().allow_remote_element_removal(false);
158 
159  // Keep looking for more RMs
160  return;
161  }
162  // Ok the above block may have told the mesh not to allow remote element removal during the
163  // initial MeshBase::prepare_for_use, which is called after attaching geometric ghosting
164  // functors. If we did tell the mesh not to allow remote element removal **and** we're using a
165  // DistributedMesh, then we need to tell the mesh to allow remote element removal and ensure
166  // that the mesh will delete its remote elements after the EquationSystems init
167  else if (input_rm_type != Moose::RelationshipManagerType::GEOMETRIC &&
170  !rm_params.get<bool>("attach_geometric_early") && _mesh->isDistributedMesh())
171  {
172  _mesh->needsRemoteElemDeletion(true);
173  if (_displaced_mesh)
174  _displaced_mesh->needsRemoteElemDeletion(true);
175  }
176 
177  rm_params.set<MooseMesh *>("mesh") = _mesh.get();
178 
179  if (rm_params.areAllRequiredParamsValid())
180  {
181  auto rm_obj = _factory.create<RelationshipManager>(rm_name, new_name, rm_params);
182 
183  // Delete the resources created on behalf of the RM if it ends up not being added to the App.
184  if (!_app.addRelationshipManager(rm_obj))
186  else // we added it
187  unique_object_id++;
188  }
189  else
190  mooseError("Missing required parameters for RelationshipManager " + rm_name + " for object " +
191  name());
192 }

Referenced by Action::addRelationshipManagers().

◆ addRelationshipManagers() [1/4]

void Action::addRelationshipManagers
inherited

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.

Definition at line 194 of file Action.C.

194 {}

◆ addRelationshipManagers() [2/4]

void MooseObjectAction::addRelationshipManagers ( Moose::RelationshipManagerType  when_type)
overridevirtualinherited

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 from Action.

Definition at line 46 of file MooseObjectAction.C.

47 {
49 }

◆ addRelationshipManagers() [3/4]

void Action::addRelationshipManagers
inherited

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.
moose_object_parsThe MooseObject to inspect for RelationshipManagers to add

Definition at line 197 of file Action.C.

199 {
200  typedef RelationshipManager RM;
201 
202  const auto & buildable_types = moose_object_pars.getBuildableRelationshipManagerTypes();
203 
204  for (const auto & buildable_type : buildable_types)
205  {
206  auto & rm_name = std::get<0>(buildable_type);
207  auto & rm_type = std::get<1>(buildable_type);
208  auto rm_input_parameter_func = std::get<2>(buildable_type);
209 
210  // If we have an algebraic ghosting functor, then we are going to duplicate the
211  // RelationshipManager object. This makes bookkeeping for relationship manager coverage more
212  // straightforward, i.e. when we are deciding whether to add an algebraic relationship manager,
213  // we can easily check whether a given System/DofMap is already covered or not. If we have an
214  // object that is strictly a coupling functor, we will not duplicate it and we will apply it
215  // just to the NonlinearSystem(Base). Duplicating RMs for the DofMaps is also very important for
216  // ensuring that a non-null CouplingMatrix (reflecting coupling in the nonlinear system) doesn't
217  // get applied to the auxiliary system
218 
219  bool is_algebraic = RM::isAlgebraic(rm_type);
220  bool is_coupleable = RM::isCoupling(rm_type);
221 
222  auto sys_type = (is_algebraic || is_coupleable) ? Moose::RMSystemType::NONLINEAR
224 
226  input_rm_type, moose_object_pars, rm_name, rm_type, rm_input_parameter_func, sys_type);
227 
228  if (is_algebraic)
229  {
230  auto duplicate_rm_type = Moose::RelationshipManagerType::ALGEBRAIC;
232  addRelationshipManager(input_rm_type,
233  moose_object_pars,
234  rm_name,
235  duplicate_rm_type,
236  rm_input_parameter_func,
237  sys_type);
238  }
239  }
240 }

◆ addRelationshipManagers() [4/4]

void Action::addRelationshipManagers ( Moose::RelationshipManagerType  when_type,
const InputParameters moose_object_pars 
)
protectedinherited

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.
moose_object_parsThe MooseObject to inspect for RelationshipManagers to add

Definition at line 197 of file Action.C.

199 {
200  typedef RelationshipManager RM;
201 
202  const auto & buildable_types = moose_object_pars.getBuildableRelationshipManagerTypes();
203 
204  for (const auto & buildable_type : buildable_types)
205  {
206  auto & rm_name = std::get<0>(buildable_type);
207  auto & rm_type = std::get<1>(buildable_type);
208  auto rm_input_parameter_func = std::get<2>(buildable_type);
209 
210  // If we have an algebraic ghosting functor, then we are going to duplicate the
211  // RelationshipManager object. This makes bookkeeping for relationship manager coverage more
212  // straightforward, i.e. when we are deciding whether to add an algebraic relationship manager,
213  // we can easily check whether a given System/DofMap is already covered or not. If we have an
214  // object that is strictly a coupling functor, we will not duplicate it and we will apply it
215  // just to the NonlinearSystem(Base). Duplicating RMs for the DofMaps is also very important for
216  // ensuring that a non-null CouplingMatrix (reflecting coupling in the nonlinear system) doesn't
217  // get applied to the auxiliary system
218 
219  bool is_algebraic = RM::isAlgebraic(rm_type);
220  bool is_coupleable = RM::isCoupling(rm_type);
221 
222  auto sys_type = (is_algebraic || is_coupleable) ? Moose::RMSystemType::NONLINEAR
224 
226  input_rm_type, moose_object_pars, rm_name, rm_type, rm_input_parameter_func, sys_type);
227 
228  if (is_algebraic)
229  {
230  auto duplicate_rm_type = Moose::RelationshipManagerType::ALGEBRAIC;
232  addRelationshipManager(input_rm_type,
233  moose_object_pars,
234  rm_name,
235  duplicate_rm_type,
236  rm_input_parameter_func,
237  sys_type);
238  }
239  }
240 }

Referenced by CouplingFunctorCheckAction::act().

◆ addVariable()

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

Adds a nonlinear variable to the system.

Parameters
var_nameThe name of the variable.

Definition at line 221 of file AddVariableAction.C.

222 {
223  // Compare sizes of scaling_factor and components for Array Variables
224  const auto & scale_factor = _moose_object_pars.isParamValid("scaling")
225  ? _moose_object_pars.get<std::vector<Real>>("scaling")
226  : std::vector<Real>(_components, 1);
227  if (scale_factor.size() != _components)
228  mooseError("Size of 'scaling' is not consistent");
229 
231 
232  if (_moose_object_pars.get<bool>("eigen"))
233  {
234  MooseEigenSystem & esys(static_cast<MooseEigenSystem &>(_problem->getNonlinearSystemBase()));
235  esys.markEigenVariable(var_name);
236  }
237 }

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

◆ appendTask()

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

Definition at line 146 of file Action.h.

146 { _all_tasks.insert(task); }

◆ createInitialConditionAction()

void AddVariableAction::createInitialConditionAction ( )
protected

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 154 of file AddVariableAction.C.

155 {
156  // Variable name
157  std::string var_name = name();
158 
159  // Create the object name
160  std::string long_name("");
161  long_name += var_name;
162  long_name += "_moose";
163 
164  // Set the parameters for the action
165  InputParameters action_params = _action_factory.getValidParams("AddOutputAction");
166  action_params.set<ActionWarehouse *>("awh") = &_awh;
167 
168  if (_scalar_var)
169  action_params.set<std::string>("type") = "ScalarConstantIC";
170  else if (_components == 1)
171  action_params.set<std::string>("type") = "ConstantIC";
172  else
173  action_params.set<std::string>("type") = "ArrayConstantIC";
174 
175  // Create the action
176  std::shared_ptr<MooseObjectAction> action = std::static_pointer_cast<MooseObjectAction>(
177  _action_factory.create("AddInitialConditionAction", long_name, action_params));
178 
179  // Set the required parameters for the object to be created
180  action->getObjectParams().set<VariableName>("variable") = var_name;
181  auto value = _moose_object_pars.get<std::vector<Real>>("initial_condition");
182  if (value.size() != _components)
183  mooseError("Size of 'initial_condition' is not consistent");
184  if (_components > 1)
185  {
187  for (unsigned int i = 0; i < _components; ++i)
188  v(i) = value[i];
189  action->getObjectParams().set<RealEigenVector>("value") = v;
190  }
191  else
192  action->getObjectParams().set<Real>("value") = value[0];
193 
194  // Store the action in the ActionWarehouse
195  _awh.addActionBlock(action);
196 }

Referenced by act().

◆ determineType()

std::string AddVariableAction::determineType ( const FEType &  fe_type,
unsigned int  components 
)
static

determine the variable type given an FEType and number of components

Definition at line 199 of file AddVariableAction.C.

200 {
201  if (components > 1)
202  {
203  if (fe_type.family == LAGRANGE_VEC || fe_type.family == NEDELEC_ONE ||
204  fe_type.family == MONOMIAL_VEC)
205  mooseError("Vector finite element families do not currently have ArrayVariable support");
206  else
207  return "ArrayMooseVariable";
208  }
209  else if (fe_type == FEType(0, MONOMIAL))
210  return "MooseVariableConstMonomial";
211  else if (fe_type.family == SCALAR)
212  return "MooseVariableScalar";
213  else if (fe_type.family == LAGRANGE_VEC || fe_type.family == NEDELEC_ONE ||
214  fe_type.family == MONOMIAL_VEC)
215  return "VectorMooseVariable";
216  else
217  return "MooseVariable";
218 }

Referenced by init().

◆ feType()

FEType AddVariableAction::feType ( const InputParameters params)
static

determine the FEType by examining family and order in the provided parameters

Definition at line 81 of file AddVariableAction.C.

82 {
83  return {Utility::string_to_enum<Order>(params.get<MooseEnum>("order")),
84  Utility::string_to_enum<FEFamily>(params.get<MooseEnum>("family"))};
85 }

◆ getAllTasks()

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

Definition at line 122 of file Action.h.

122 { return _all_tasks; }

Referenced by AddKernelAction::act().

◆ getBaseName()

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

Deprecated name methods, use name()

Definition at line 251 of file Action.C.

252 {
253  mooseDeprecated("getBaseName() is deprecated.");
254  return MooseUtils::baseName(_name);
255 }

◆ 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 139 of file Action.h.

140  {
141  return parameters().getCheckedPointerParam<T>(name, error_string);
142  }

◆ getMeshProperty()

template<typename T >
const T & MeshMetaDataInterface::getMeshProperty ( const std::string &  data_name,
const std::string &  prefix 
)
protectedinherited

Method for retrieving a property with the given type and name exists in the mesh meta-data store.

This method will throw an error if the property does not exist.

Definition at line 72 of file MeshMetaDataInterface.h.

74 {
75  std::string full_name = std::string(SYSTEM) + "/" + prefix + "/" + data_name;
76  auto data_ptr = libmesh_make_unique<RestartableData<T>>(full_name, nullptr);
77 
78  // Here we will create the RestartableData even though we may not use this instance.
79  // If it's already in use, the App will return a reference to the existing instance and we'll
80  // return that one instead. We might refactor this to have the app create the RestartableData
81  // at a later date.
82  auto & restartable_data_ref =
83  static_cast<RestartableData<T> &>(registerMetaDataOnApp(full_name, std::move(data_ptr)));
84 
85  return restartable_data_ref.get();
86 }

◆ getMooseObjectType()

const std::string& MooseObjectAction::getMooseObjectType ( ) const
inlineinherited

Return the object type to be created.

Definition at line 44 of file MooseObjectAction.h.

44 { return _type; }

Referenced by CommonOutputAction::hasConsole().

◆ getNonlinearVariableFamilies()

MooseEnum AddVariableAction::getNonlinearVariableFamilies ( )
static

Get the possible variable families.

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

Definition at line 67 of file AddVariableAction.C.

68 {
69  return MooseEnum("LAGRANGE MONOMIAL HERMITE SCALAR HIERARCHIC CLOUGH XYZ SZABAB BERNSTEIN "
70  "L2_LAGRANGE L2_HIERARCHIC NEDELEC_ONE LAGRANGE_VEC MONOMIAL_VEC",
71  "LAGRANGE");
72 }

Referenced by validParams().

◆ getNonlinearVariableOrders()

MooseEnum AddVariableAction::getNonlinearVariableOrders ( )
static

Get the possible variable orders.

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

Definition at line 75 of file AddVariableAction.C.

76 {
77  return MooseEnum("CONSTANT FIRST SECOND THIRD FOURTH", "FIRST", true);
78 }

Referenced by EqualValueEmbeddedConstraint::validParams(), and validParams().

◆ getObjectParams() [1/2]

InputParameters& MooseObjectAction::getObjectParams ( )
inlineinherited

Retreive the parameters of the object to be created by this action.

Definition at line 34 of file MooseObjectAction.h.

34 { return _moose_object_pars; }

Referenced by CreateProblemDefaultAction::act(), MaterialOutputAction::act(), MooseApp::getCheckpointDirectories(), CommonOutputAction::hasConsole(), and ActionWarehouse::printInputFile().

◆ getObjectParams() [2/2]

const InputParameters& MooseObjectAction::getObjectParams ( ) const
inlineinherited

Constant version of retreiving the parameters of the object to be created by this action.

Definition at line 39 of file MooseObjectAction.h.

39 { return _moose_object_pars; }

◆ getParamTempl()

template<typename T >
const T & Action::getParamTempl ( 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 254 of file Action.h.

255 {
256  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0));
257 }

Referenced by MooseApp::getCheckpointDirectories().

◆ getShortName()

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

DEPRECATED METHODS.

Definition at line 244 of file Action.C.

245 {
246  mooseDeprecated("getShortName() is deprecated.");
248 }

◆ getSubdomainIDs()

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

Get the block ids from the input parameters.

Returns
A set of block ids defined in the input

Definition at line 240 of file AddVariableAction.C.

241 {
242  // Extract and return the block ids supplied in the input
243  std::set<SubdomainID> blocks;
244  std::vector<SubdomainName> block_param =
245  _moose_object_pars.get<std::vector<SubdomainName>>("block");
246  for (const auto & subdomain_name : block_param)
247  {
248  SubdomainID blk_id = _problem->mesh().getSubdomainID(subdomain_name);
249  blocks.insert(blk_id);
250  }
251  return blocks;
252 }

◆ init()

void AddVariableAction::init ( )
protectedvirtual

Initialize the action's member variables.

Reimplemented in AddAuxVariableAction, and AddElementalFieldAction.

Definition at line 88 of file AddVariableAction.C.

89 {
90  _components = _moose_object_pars.get<unsigned int>("components");
91  if (_components == 0)
92  mooseError("There must be at least one variable component, but somehow 0 has been specified");
93 
94  // We have to do some sanity checks because of our work to maintain backwards compatibility.
95  // `family`, `order`, and `scaling` are all parameters duplicated between this action and the
96  // `MooseVariable*` object itself. Consequently during input file parsing, the params objects for
97  // both the action and MooseVariable object can be populated with the exact same parameters.
98  // However, some applications actually create their variables solely through creation and setting
99  // of `AddVariableAction` parameters which means that the `MooseVariableBase*` params will never
100  // be populated. So we should apply the parameters directly from the action. There should be no
101  // case in which both params objects get set by the user and they have different values
102 
103  if (_pars.isParamSetByUser("family") && _moose_object_pars.isParamSetByUser("family") &&
104  !_pars.get<MooseEnum>("family").compareCurrent(_moose_object_pars.get<MooseEnum>("family")))
105  mooseError("Both the MooseVariable* and Add*VariableAction parameters objects have had the "
106  "`family` parameter set, and they are different values: ",
107  _moose_object_pars.get<MooseEnum>("family"),
108  " and ",
109  _pars.get<MooseEnum>("family"),
110  " respectively. I don't know how you achieved this, but you need to rectify it.");
111 
112  if (_pars.isParamSetByUser("order") && _moose_object_pars.isParamSetByUser("order") &&
113  !_pars.get<MooseEnum>("order").compareCurrent(_moose_object_pars.get<MooseEnum>("order")))
114  mooseError("Both the MooseVariable* and Add*VariableAction parameters objects have had the "
115  "`order` parameter set, and they are different values: ",
116  _moose_object_pars.get<MooseEnum>("order"),
117  " and ",
118  _pars.get<MooseEnum>("order"),
119  " respectively. I don't know how you achieved this, but you need to rectify it.");
120 
121  if (_pars.isParamSetByUser("scaling") && _moose_object_pars.isParamSetByUser("scaling") &&
122  _pars.get<std::vector<Real>>("scaling") !=
123  _moose_object_pars.get<std::vector<Real>>("scaling"))
124  mooseError("Both the MooseVariable* and Add*VariableAction parameters objects have had the "
125  "`scaling` parameter set, and they are different values. I don't know how you "
126  "achieved this, but you need to rectify it.");
127 
128  _moose_object_pars.applySpecificParameters(_pars, {"order", "family", "scaling"});
129 
130  // Determine the MooseVariable type
132 
133  // Need static_cast to resolve overloads
134  _problem_add_var_method = static_cast<void (FEProblemBase::*)(
135  const std::string &, const std::string &, InputParameters &)>(&FEProblemBase::addVariable);
136 }

Referenced by act(), and AddAuxVariableAction::init().

◆ isParamValid()

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

◆ 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 155 of file Action.h.

156  {
157  auto prefix = param + ": ";
158  if (!_pars.inputLocation(param).empty())
159  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
160  mooseError(prefix, args...);
161  }

◆ parameters() [1/2]

InputParameters& Action::parameters ( )
inlineinherited

◆ parameters() [2/2]

const InputParameters& Action::parameters ( ) const
inlineinherited

Definition at line 118 of file Action.h.

118 { return _pars; }

◆ 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 186 of file Action.h.

187  {
188  auto prefix = param + ": ";
189  if (!_pars.inputLocation(param).empty())
190  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
191  mooseInfo(prefix, args...);
192  }

◆ 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 170 of file Action.h.

171  {
172  auto prefix = param + ": ";
173  if (!_pars.inputLocation(param).empty())
174  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
175  mooseWarning(prefix, args...);
176  }

◆ registerMetaDataOnApp()

RestartableDataValue & MeshMetaDataInterface::registerMetaDataOnApp ( const std::string &  name,
std::unique_ptr< RestartableDataValue data 
)
privateinherited

Helper function for actually registering the restartable data.

Definition at line 23 of file MeshMetaDataInterface.C.

25 {
26  return _meta_data_app.registerRestartableData(name, std::move(data), 0, true, true);
27 }

Referenced by MeshMetaDataInterface::getMeshProperty().

◆ 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 51 of file PerfGraphInterface.C.

52 {
53  if (_prefix != "")
54  return _perf_graph.registerSection(_prefix + "::" + section_name, level);
55  else
56  return _perf_graph.registerSection(section_name, level);
57 }

◆ specificTaskName()

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

Definition at line 120 of file Action.h.

120 { return _specific_task_name; }

◆ timedAct()

void Action::timedAct ( )
inherited

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

Definition at line 90 of file Action.C.

91 {
92  TIME_SECTION(_act_timer);
93  act();
94 }

◆ type()

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

◆ validParams()

InputParameters AddVariableAction::validParams ( )
static

Class constructor.

Definition at line 35 of file AddVariableAction.C.

36 {
37  auto params = MooseObjectAction::validParams();
38 
39  // The user may specify a type in the Variables block, but if they don't we'll just use all the
40  // parameters available from MooseVariableBase
41  params.set<std::string>("type") = "MooseVariableBase";
42 
43  // The below is for backwards compatibility
46  params.addParam<MooseEnum>(
47  "family", families, "Specifies the family of FE shape functions to use for this variable");
48  params.addParam<MooseEnum>("order",
49  orders,
50  "Specifies the order of the FE shape function to use "
51  "for this variable (additional orders not listed are "
52  "allowed)");
53  params.addParam<std::vector<Real>>("scaling",
54  "Specifies a scaling factor to apply to this variable");
55  return params;
56 }

Referenced by AddElementalFieldAction::validParams(), and AddAuxVariableAction::validParams().

Member Data Documentation

◆ _act_timer

PerfID Action::_act_timer
protectedinherited

Timers.

Definition at line 249 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 210 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 234 of file Action.h.

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

◆ _app

MooseApp& Action::_app
protectedinherited

◆ _awh

ActionWarehouse& Action::_awh
protectedinherited

◆ _components

unsigned int AddVariableAction::_components
protected

Number of components for an array variable.

Definition at line 93 of file AddVariableAction.h.

Referenced by addVariable(), createInitialConditionAction(), and init().

◆ _console

const ConsoleStream ConsoleStreamInterface::_console
inherited

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

Definition at line 31 of file ConsoleStreamInterface.h.

Referenced by IterationAdaptiveDT::acceptStep(), Adaptivity::adaptMesh(), FEProblemBase::adaptMesh(), SimplePredictor::apply(), MultiApp::backup(), FEProblemBase::backupMultiApps(), ReferenceResidualProblem::checkNonlinearConvergence(), FEProblemBase::checkProblemIntegrity(), CoarsenedPiecewiseLinear::CoarsenedPiecewiseLinear(), IterationAdaptiveDT::computeAdaptiveDT(), Transient::computeConstrainedDT(), NonlinearSystemBase::computeDamping(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInterpolationDT(), FEProblemBase::computeResidualTags(), NonlinearSystem::computeScaling(), IterationAdaptiveDT::constrainStep(), TimeStepper::constrainStep(), MultiApp::createApp(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), MultiAppPostprocessorTransfer::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppVectorPostprocessorTransfer::execute(), MultiAppMeshFunctionTransfer::execute(), MultiAppCopyTransfer::execute(), MultiAppInterpolationTransfer::execute(), MultiAppUserObjectTransfer::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppProjectionTransfer::execute(), Steady::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), 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(), MultiAppConservativeTransfer::postExecute(), EigenExecutionerBase::postExecute(), AB2PredictorCorrector::postSolve(), ActionWarehouse::printActionDependencySets(), EigenExecutionerBase::printEigenvalue(), MaterialPropertyDebugOutput::printMaterialMap(), AutomaticMortarGeneration::projectMasterNodesSinglePair(), AutomaticMortarGeneration::projectSlaveNodesSinglePair(), SolutionTimeAdaptiveDT::rejectStep(), DT2::rejectStep(), MultiApp::restore(), FEProblemBase::restoreMultiApps(), SimplePredictor::shouldApply(), PicardSolve::solve(), NonlinearSystem::solve(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), AStableDirk4::solve(), LStableDirk4::solve(), ExplicitRK2::solve(), TransientMultiApp::solveStep(), PicardSolve::solveStep(), DT2::step(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), Transient::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
protected

FEType for the variable being created.

Definition at line 87 of file AddVariableAction.h.

Referenced by AddElementalFieldAction::init(), AddAuxVariableAction::init(), and init().

◆ _mesh

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

◆ _meta_data_app

MooseApp& MeshMetaDataInterface::_meta_data_app
privateinherited

Reference to the application.

Definition at line 67 of file MeshMetaDataInterface.h.

Referenced by MeshMetaDataInterface::registerMetaDataOnApp().

◆ _moose_object_pars

InputParameters MooseObjectAction::_moose_object_pars
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 67 of file PerfGraphInterface.h.

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

◆ _pg_params

const InputParameters* PerfGraphInterface::_pg_params
protectedinherited

Params.

Definition at line 64 of file PerfGraphInterface.h.

◆ _prefix

std::string PerfGraphInterface::_prefix
protectedinherited

A prefix to use for all sections.

Definition at line 70 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 246 of file Action.h.

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

◆ _problem_add_var_method

std::function<void(FEProblemBase &, const std::string &, const std::string &, InputParameters &)> AddVariableAction::_problem_add_var_method
protected

◆ _registered_identifier

std::string Action::_registered_identifier
protectedinherited

Definition at line 204 of file Action.h.

Referenced by SetupMeshAction::act().

◆ _scalar_var

bool AddVariableAction::_scalar_var
protected

True if the variable being created is a scalar.

Definition at line 90 of file AddVariableAction.h.

Referenced by createInitialConditionAction(), AddElementalFieldAction::init(), and AddAuxVariableAction::init().

◆ _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 227 of file Action.h.

Referenced by Action::specificTaskName().

◆ _type

std::string MooseObjectAction::_type
protectedinherited

◆ FILE_SUFFIX

constexpr auto MeshMetaDataInterface::FILE_SUFFIX = "_mesh"
staticconstexprinherited

The suffix appended when writing the restartable data file.

Definition at line 32 of file MeshMetaDataInterface.h.

Referenced by SetupRecoverFileBaseAction::act(), and Checkpoint::output().

◆ NAME

constexpr auto MeshMetaDataInterface::NAME = "<empty>"
staticconstexprinherited

The data name used when initializing the Restartable interface for non-MeshGenerator objects.

Definition at line 38 of file MeshMetaDataInterface.h.

◆ SYSTEM

constexpr auto MeshMetaDataInterface::SYSTEM = "MeshMetaData"
staticconstexprinherited

The system name used when initializing the Restartable interface.

Definition at line 35 of file MeshMetaDataInterface.h.

Referenced by MeshGenerator::declareMeshProperty(), and MeshMetaDataInterface::getMeshProperty().


The documentation for this class was generated from the following files:
FEProblemBase::addVariable
virtual void addVariable(const std::string &var_type, const std::string &var_name, InputParameters &params)
Canonical method for adding a non-linear variable.
Definition: FEProblemBase.C:2013
InputParameters::getParamHelper
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type)
Definition: InputParameters.h:1517
InputParameters::isParamSetByUser
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was by the user.
Definition: InputParameters.C:837
Action::_app
MooseApp & _app
The MOOSE application this is associated with.
Definition: Action.h:213
Factory::create
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>())
Definition: Factory.C:93
Factory::getValidParams
InputParameters getValidParams(const std::string &name)
Get valid parameters for the object.
Definition: Factory.C:67
PerfGraphInterface::_perf_graph
PerfGraph & _perf_graph
The performance graph to add to.
Definition: PerfGraphInterface.h:67
InputParameters::getBuildableRelationshipManagerTypes
const std::vector< std::tuple< std::string, Moose::RelationshipManagerType, Moose::RelationshipManagerInputParameterCallback > > & getBuildableRelationshipManagerTypes() const
Returns the list of buildable (or required) RelationshipManager object types for this object.
Definition: InputParameters.C:361
ActionFactory::getValidParams
InputParameters getValidParams(const std::string &name)
Definition: ActionFactory.C:70
Moose::RelationshipManagerType::GEOMETRIC
AddVariableAction::_fe_type
FEType _fe_type
FEType for the variable being created.
Definition: AddVariableAction.h:87
AddVariableAction::determineType
static std::string determineType(const FEType &fe_type, unsigned int components)
determine the variable type given an FEType and number of components
Definition: AddVariableAction.C:199
MooseEnum
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:31
PerfGraph::registerSection
PerfID registerSection(const std::string &section_name, unsigned int level)
Registers a named section of code.
Definition: PerfGraph.C:45
ActionWarehouse::addActionBlock
void addActionBlock(std::shared_ptr< Action > blk)
This method add an Action instance to the warehouse.
Definition: ActionWarehouse.C:73
Action::name
const std::string & name() const
The name of the action.
Definition: Action.h:105
Action::_all_tasks
std::set< std::string > _all_tasks
A list of all the tasks that this Action will satisfy.
Definition: Action.h:234
MeshMetaDataInterface::_meta_data_app
MooseApp & _meta_data_app
Reference to the application.
Definition: MeshMetaDataInterface.h:67
MooseEigenSystem
Definition: MooseEigenSystem.h:19
Action::_action_factory
ActionFactory & _action_factory
Builds Actions.
Definition: Action.h:219
MeshMetaDataInterface::registerMetaDataOnApp
RestartableDataValue & registerMetaDataOnApp(const std::string &name, std::unique_ptr< RestartableDataValue > data)
Helper function for actually registering the restartable data.
Definition: MeshMetaDataInterface.C:23
Action::_problem
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
Definition: Action.h:246
InputParameters::paramFullpath
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.
Definition: InputParameters.h:785
Moose::RelationshipManagerType::ALGEBRAIC
Moose::stringify
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:61
mooseInfo
void mooseInfo(Args &&... args)
Emit an informational message with the given stringified, concatenated args.
Definition: MooseError.h:255
Action::act
virtual void act()=0
Method to add objects to the simulation or perform other setup tasks.
AddVariableAction::getNonlinearVariableOrders
static MooseEnum getNonlinearVariableOrders()
Get the possible variable orders.
Definition: AddVariableAction.C:75
mooseError
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition: MooseError.h:210
MooseObjectAction::validParams
static InputParameters validParams()
Definition: MooseObjectAction.C:21
Moose::RMSystemType
RMSystemType
Definition: MooseTypes.h:860
ActionWarehouse
Storage for action instances.
Definition: ActionWarehouse.h:34
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Definition: InputParameters.h:53
InputParameters::set
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Definition: InputParameters.h:987
InputParameters::inputLocation
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....
Definition: InputParameters.h:773
mooseWarning
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
Definition: MooseError.h:222
MeshMetaDataInterface::SYSTEM
static constexpr auto SYSTEM
The system name used when initializing the Restartable interface.
Definition: MeshMetaDataInterface.h:35
PerfGraphInterface::_prefix
std::string _prefix
A prefix to use for all sections.
Definition: PerfGraphInterface.h:70
Action::_factory
Factory & _factory
The Factory associated with the MooseApp.
Definition: Action.h:216
ActionFactory::create
std::shared_ptr< Action > create(const std::string &action, const std::string &action_name, InputParameters &parameters)
Definition: ActionFactory.C:41
AddVariableAction::getNonlinearVariableFamilies
static MooseEnum getNonlinearVariableFamilies()
Get the possible variable families.
Definition: AddVariableAction.C:67
AddVariableAction::_components
unsigned int _components
Number of components for an array variable.
Definition: AddVariableAction.h:93
MooseObjectAction::_type
std::string _type
The Object type that is being created.
Definition: MooseObjectAction.h:48
MooseUtils::shortName
std::string shortName(const std::string &name)
Function for stripping name after the file / in parser block.
Definition: MooseUtils.C:375
MooseObjectAction::MooseObjectAction
MooseObjectAction(InputParameters params)
Definition: MooseObjectAction.C:30
InputParameters::isParamValid
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another,...
Definition: InputParameters.C:257
Moose::RelationshipManagerType
RelationshipManagerType
Main types of Relationship Managers.
Definition: MooseTypes.h:852
MooseObjectAction::_moose_object_pars
InputParameters _moose_object_pars
The parameters for the object to be created.
Definition: MooseObjectAction.h:51
Action::_name
std::string _name
The name of the action.
Definition: Action.h:207
Action::_action_type
std::string _action_type
Definition: Action.h:210
mooseDeprecated
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:239
MooseApp::registerRestartableData
RestartableDataValue & registerRestartableData(const std::string &name, std::unique_ptr< RestartableDataValue > data, THREAD_ID tid, bool mesh_meta_data, bool read_only)
Definition: MooseApp.C:1156
Action::_pars
InputParameters _pars
Input parameters for the action.
Definition: Action.h:201
SubdomainID
subdomain_id_type SubdomainID
Definition: AutomaticMortarGeneration.h:48
Action::addRelationshipManager
void addRelationshipManager(Moose::RelationshipManagerType input_rm_type, const InputParameters &moose_object_pars, std::string rm_name, Moose::RelationshipManagerType rm_type, Moose::RelationshipManagerInputParameterCallback rm_input_parameter_func, Moose::RMSystemType sys_type)
Method for adding a single relationship manager.
Definition: Action.C:97
MooseObjectAction::addRelationshipManagers
virtual void addRelationshipManagers(Moose::RelationshipManagerType when_type) override
Method to add a relationship manager for the objects being added to the system.
Definition: MooseObjectAction.C:46
AddVariableAction::addVariable
void addVariable(const std::string &var_name)
Adds a nonlinear variable to the system.
Definition: AddVariableAction.C:221
MooseUtils::baseName
std::string baseName(const std::string &name)
Function for string the information before the final / in a parser block.
Definition: MooseUtils.C:381
RelationshipManager
RelationshipManagers are used for describing what kinds of non-local resources are needed for an obje...
Definition: RelationshipManager.h:31
Action::_displaced_mesh
std::shared_ptr< MooseMesh > & _displaced_mesh
Definition: Action.h:243
AddVariableAction::feType
static FEType feType(const InputParameters &params)
determine the FEType by examining family and order in the provided parameters
Definition: AddVariableAction.C:81
InputParameters::getCheckedPointerParam
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.
Definition: InputParameters.h:1162
MooseApp::addRelationshipManager
bool addRelationshipManager(std::shared_ptr< RelationshipManager > relationship_manager)
Transfers ownership of a RelationshipManager to the application for lifetime management.
Definition: MooseApp.C:1860
Moose::NONE
Definition: MooseTypes.h:864
MooseMesh
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
AddVariableAction::init
virtual void init()
Initialize the action's member variables.
Definition: AddVariableAction.C:88
Action::_mesh
std::shared_ptr< MooseMesh > & _mesh
Definition: Action.h:242
libMesh::RealEigenVector
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition: MooseTypes.h:133
Action::_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:227
Action::parameters
InputParameters & parameters()
Definition: Action.h:117
Action::_awh
ActionWarehouse & _awh
Reference to ActionWarehouse where we store object build by actions.
Definition: Action.h:237
FEProblemBase
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Definition: FEProblemBase.h:139
RestartableData
Concrete definition of a parameter value for a specified type.
Definition: RestartableData.h:76
Factory::releaseSharedObjects
void releaseSharedObjects(const MooseObject &moose_object, THREAD_ID tid=0)
Releases any shared resources created as a side effect of creating an object through the Factory::cre...
Definition: Factory.C:172
InputParameters::applySpecificParameters
void applySpecificParameters(const InputParameters &common, const std::vector< std::string > &include, bool allow_private=false)
Method for applying common parameters.
Definition: InputParameters.C:729
AddVariableAction::_scalar_var
bool _scalar_var
True if the variable being created is a scalar.
Definition: AddVariableAction.h:90
AddVariableAction::_problem_add_var_method
std::function< void(FEProblemBase &, const std::string &, const std::string &, InputParameters &)> _problem_add_var_method
Definition: AddVariableAction.h:96
Action::_act_timer
PerfID _act_timer
Timers.
Definition: Action.h:249
AddVariableAction::createInitialConditionAction
void createInitialConditionAction()
Create the action to generate the InitialCondition object.
Definition: AddVariableAction.C:154
Moose::AUXILIARY
Definition: MooseTypes.h:863
RestartableData::get
T & get()
Definition: RestartableData.h:92
Moose::NONLINEAR
Definition: MooseTypes.h:862