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 "MutableCoefficientsFunctionInterface.h" 11 : 12 : InputParameters 13 341 : MutableCoefficientsFunctionInterface::validParams() 14 : { 15 341 : InputParameters params = MemoizedFunctionInterface::validParams(); 16 : 17 341 : params += MutableCoefficientsInterface::validParams(); 18 : 19 341 : params.addClassDescription("Interface based on MutableCoefficientsInterface for natively " 20 : "supporting operations based on an array of coefficients"); 21 : 22 682 : params.addParam<std::vector<Real>>("coefficients", "Coefficients required by the function."); 23 : 24 341 : return params; 25 0 : } 26 : 27 204 : MutableCoefficientsFunctionInterface::MutableCoefficientsFunctionInterface( 28 204 : const MooseObject * moose_object, const InputParameters & parameters) 29 : : MemoizedFunctionInterface(parameters), 30 : FunctionInterface(this), 31 204 : MutableCoefficientsInterface(moose_object, parameters) 32 : { 33 408 : if (isParamValid("coefficients")) 34 0 : setCoefficients(getParam<std::vector<Real>>("coefficients")), enforceSize(true); 35 204 : } 36 : 37 : void 38 10996 : MutableCoefficientsFunctionInterface::coefficientsChanged() 39 : { 40 : // The coefficients have changed, which invalidates the cache 41 10996 : invalidateCache(); 42 10996 : }