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 "ArrayConstantIC.h" 11 : 12 : registerMooseObject("MooseApp", ArrayConstantIC); 13 : 14 : InputParameters 15 16291 : ArrayConstantIC::validParams() 16 : { 17 16291 : InputParameters params = ArrayInitialCondition::validParams(); 18 65164 : params.addRequiredParam<RealEigenVector>("value", "The values to be set in IC"); 19 16291 : params.addClassDescription("Sets constant component values for an array field variable."); 20 16291 : return params; 21 0 : } 22 : 23 754 : ArrayConstantIC::ArrayConstantIC(const InputParameters & parameters) 24 1508 : : ArrayInitialCondition(parameters), _value(getParam<RealEigenVector>("value")) 25 : { 26 754 : if (_var.count() != _value.size()) 27 4 : mooseError("'value' size is inconsistent to the number of components of the array variable"); 28 750 : } 29 : 30 : RealEigenVector 31 105460 : ArrayConstantIC::value(const Point & /*p*/) 32 : { 33 105460 : return _value; 34 : }