www.mooseframework.org
GlobalParamsAction.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 "GlobalParamsAction.h"
11 
12 registerMooseAction("MooseApp", GlobalParamsAction, "set_global_params");
13 
14 template <>
17 {
19  std::vector<std::string> blocks(1, "");
20 
21  /* GlobalParams should not have children or other standard public Action attributes */
22  params.addPrivateParam<std::vector<std::string>>("active", blocks);
23  params.addPrivateParam<std::vector<std::string>>("inactive", blocks);
24  return params;
25 }
26 
28 
29 void
31 {
32 }
33 
34 void
35 GlobalParamsAction::remove(const std::string & name)
36 {
37  parameters().remove(name);
38 }
GlobalParamsAction(InputParameters params)
registerMooseAction("MooseApp", GlobalParamsAction, "set_global_params")
const std::string & name() const
The name of the action.
Definition: Action.h:76
void addPrivateParam(const std::string &name, const T &value)
These method add a parameter to the InputParameters object which can be retrieved like any other para...
InputParameters validParams< GlobalParamsAction >()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters & parameters()
Definition: Action.h:88
Base class for actions.
Definition: Action.h:35
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
InputParameters validParams< Action >()
Definition: Action.C:22
void remove(const std::string &name)
This function is here to remove parameters of a type so that global parameters can potentially use th...