LCOV - code coverage report
Current view: top level - src/nodalkernels - UserForcingFunctorNodalKernel.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 10 11 90.9 %
Date: 2025-07-17 01:28:37 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       14382 : UserForcingFunctorNodalKernel::validParams()
      17             : {
      18       14382 :   InputParameters params = ADNodalKernel::validParams();
      19       14382 :   params.addClassDescription(
      20             :       "Residual contribution to an ODE from a source functor acting at nodes.");
      21       14382 :   params.addRequiredParam<MooseFunctorName>("functor", "The forcing functor");
      22       14382 :   return params;
      23           0 : }
      24             : 
      25          61 : UserForcingFunctorNodalKernel::UserForcingFunctorNodalKernel(const InputParameters & parameters)
      26          61 :   : ADNodalKernel(parameters), _functor(getFunctor<ADReal>("functor"))
      27             : {
      28          61 : }
      29             : 
      30             : ADReal
      31      114663 : UserForcingFunctorNodalKernel::computeQpResidual()
      32             : {
      33      229326 :   return -_functor(nodeArg(), determineState());
      34             : }

Generated by: LCOV version 1.14