Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 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 : #include "MooseApp.h" 13 : #include "InputParameterWarehouse.h" 14 : 15 : registerMooseAction("MooseApp", GlobalParamsAction, "set_global_params"); 16 : 17 : InputParameters 18 2839 : GlobalParamsAction::validParams() 19 : { 20 2839 : InputParameters params = Action::validParams(); 21 2839 : params.addClassDescription("Action used to aid in the application of parameters defined in the " 22 : "GlobalParams input block."); 23 2839 : std::vector<std::string> blocks(1, ""); 24 : 25 : /* GlobalParams should not have children or other standard public Action attributes */ 26 2839 : params.addPrivateParam<std::vector<std::string>>("active", blocks); 27 2839 : params.addPrivateParam<std::vector<std::string>>("inactive", blocks); 28 5678 : return params; 29 2839 : } 30 : 31 2635 : GlobalParamsAction::GlobalParamsAction(const InputParameters & params) : Action(params) {} 32 : 33 : void 34 2627 : GlobalParamsAction::act() 35 : { 36 2627 : } 37 : 38 : void 39 54706 : GlobalParamsAction::remove(const std::string & name) 40 : { 41 54706 : parameters().remove(name); 42 54706 : } 43 : 44 : InputParameters & 45 112290 : GlobalParamsAction::parameters() 46 : { 47 112290 : return const_cast<InputParameters &>(_pars); 48 : }