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 "KokkosBodyForce.h" 11 : 12 414293 : registerKokkosResidualObject("MooseApp", KokkosBodyForce); 13 : 14 : InputParameters 15 17446 : KokkosBodyForce::validParams() 16 : { 17 17446 : InputParameters params = Kernel::validParams(); 18 69784 : params.addParam<Real>("value", 1.0, "Coefficient to multiply by the body force term"); 19 34936 : params.addParam<PostprocessorName>( 20 34804 : "postprocessor", 1, "A postprocessor whose value is multiplied by the body force"); 21 52338 : params.declareControllable("value"); 22 17446 : params.addClassDescription("Demonstrates the two ways that scalar values can be introduced " 23 : "into kernels, e.g. (controllable) constants and postprocessors. " 24 : "Implements the weak form $(\\psi_i, -f)$."); 25 17446 : return params; 26 0 : } 27 : 28 156 : KokkosBodyForce::KokkosBodyForce(const InputParameters & parameters) 29 : : Kernel(parameters), 30 72 : _scale(getParam<Real>("value")), 31 216 : _postprocessor(getPostprocessorValue("postprocessor")) 32 : { 33 93 : }