LCOV - code coverage report
Current view: top level - src/nodalkernels - UserForcingFunctorNodalKernel.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 419b9d Lines: 10 11 90.9 %
Date: 2025-08-08 20:01:16 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          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 "UserForcingFunctorNodalKernel.h"
      11             : #include "MooseFunctor.h"
      12             : 
      13             : registerMooseObject("MooseApp", UserForcingFunctorNodalKernel);
      14             : 
      15             : InputParameters
      16       14388 : UserForcingFunctorNodalKernel::validParams()
      17             : {
      18       14388 :   InputParameters params = ADNodalKernel::validParams();
      19       14388 :   params.addClassDescription(
      20             :       "Residual contribution to an ODE from a source functor acting at nodes.");
      21       14388 :   params.addRequiredParam<MooseFunctorName>("functor", "The forcing functor");
      22       14388 :   return params;
      23           0 : }
      24             : 
      25          64 : UserForcingFunctorNodalKernel::UserForcingFunctorNodalKernel(const InputParameters & parameters)
      26          64 :   : ADNodalKernel(parameters), _functor(getFunctor<ADReal>("functor"))
      27             : {
      28          64 : }
      29             : 
      30             : ADReal
      31      129822 : UserForcingFunctorNodalKernel::computeQpResidual()
      32             : {
      33      259644 :   return -_functor(nodeArg(), determineState());
      34             : }

Generated by: LCOV version 1.14