Line data Source code
1 : /********************************************************************/ 2 : /* SOFTWARE COPYRIGHT NOTIFICATION */ 3 : /* Cardinal */ 4 : /* */ 5 : /* (c) 2021 UChicago Argonne, LLC */ 6 : /* ALL RIGHTS RESERVED */ 7 : /* */ 8 : /* Prepared by UChicago Argonne, LLC */ 9 : /* Under Contract No. DE-AC02-06CH11357 */ 10 : /* With the U. S. Department of Energy */ 11 : /* */ 12 : /* Prepared by Battelle Energy Alliance, LLC */ 13 : /* Under Contract No. DE-AC07-05ID14517 */ 14 : /* With the U. S. Department of Energy */ 15 : /* */ 16 : /* See LICENSE for full restrictions */ 17 : /********************************************************************/ 18 : 19 : #include "CardinalAction.h" 20 : 21 : InputParameters 22 2956 : CardinalAction::validParams() 23 : { 24 2956 : InputParameters params = Action::validParams(); 25 5912 : params.addParam<std::vector<SubdomainName>>( 26 : "block", {}, "The list of block ids (SubdomainID) to which this action will be applied"); 27 2956 : return params; 28 0 : } 29 : 30 97 : CardinalAction::CardinalAction(const InputParameters & parameters) 31 194 : : Action(parameters), _blocks(getParam<std::vector<SubdomainName>>("block")) 32 : { 33 97 : } 34 : 35 : void 36 1548 : CardinalAction::setObjectBlocks(InputParameters & params, const std::vector<SubdomainName> & blocks) 37 : { 38 1548 : if (params.have_parameter<std::vector<SubdomainName>>("block")) 39 4348 : for (const auto & id : blocks) 40 5600 : params.set<std::vector<SubdomainName>>("block").push_back(Moose::stringify(id)); 41 1548 : }