www.mooseframework.org
MooseObjectAction.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "MooseObject.h"
11 #include "MooseObjectAction.h"
12 #include "MooseUtils.h"
13 #include "Factory.h"
14 #include "Conversion.h"
15 #include "MooseMesh.h"
16 #include "MooseApp.h"
17 
18 template <>
21 {
23  params.addRequiredParam<std::string>(
24  "type", "A string representing the Moose Object that will be built by this Action");
25  params.addParam<bool>("isObjectAction", true, "Indicates that this is a MooseObjectAction.");
26  return params;
27 }
28 
29 template <>
31 
33  : Action(params),
34  _type(getParam<std::string>("type")),
35  // We will create a second parameters object from the main factory unless instructed otherwise
36  _moose_object_pars(!params.have_parameter<bool>("skip_param_construction") ||
37  (params.have_parameter<bool>("skip_param_construction") &&
38  !params.get<bool>("skip_param_construction"))
39  ? (Registry::isADObj(_type + "<RESIDUAL>")
40  ? _factory.getValidParams(_type + "<RESIDUAL>")
41  : _factory.getValidParams(_type))
43 {
45 }
46 
47 void
49 {
51 }
RelationshipManagerType
Main types of Relationship Managers.
Definition: MooseTypes.h:716
InputParameters validParams< MooseObjectAction >()
InputParameters validParams< MooseObject >()
Definition: MooseObject.C:25
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters validParams()
This is the templated validParams() function that every MooseObject-derived class is required to spec...
Base class for actions.
Definition: Action.h:35
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:42
virtual void addRelationshipManagers(Moose::RelationshipManagerType when_type) override
Method to add a relationship manager for the objects being added to the system.
MooseObjectAction(InputParameters params)
std::string & blockFullpath()
Get/set a string representing the full HIT parameter path from the input file (e.g.
InputParameters _moose_object_pars
The parameters for the object to be created.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object...
The registry is used as a global singleton to collect information on all available MooseObject and Ac...
Definition: Registry.h:227
InputParameters validParams< Action >()
Definition: Action.C:22