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 3295 : GlobalParamsAction::validParams() 19 : { 20 3295 : InputParameters params = Action::validParams(); 21 6590 : params.addClassDescription("Action used to aid in the application of parameters defined in the " 22 : "GlobalParams input block."); 23 6590 : std::vector<std::string> blocks(1, ""); 24 : 25 : /* GlobalParams should not have children or other standard public Action attributes */ 26 6590 : params.addPrivateParam<std::vector<std::string>>("active", blocks); 27 3295 : params.addPrivateParam<std::vector<std::string>>("inactive", blocks); 28 6590 : return params; 29 3295 : } 30 : 31 3091 : GlobalParamsAction::GlobalParamsAction(const InputParameters & params) : Action(params) {} 32 : 33 : void 34 3079 : GlobalParamsAction::act() 35 : { 36 3079 : } 37 : 38 : void 39 62039 : GlobalParamsAction::remove(const std::string & name) 40 : { 41 62039 : parameters().remove(name); 42 62039 : } 43 : 44 : InputParameters & 45 130172 : GlobalParamsAction::parameters() 46 : { 47 130172 : return const_cast<InputParameters &>(_pars); 48 : }