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