LCOV - code coverage report
Current view: top level - src/fvkernels - FVFunctorTimeKernel.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 419b9d Lines: 14 15 93.3 %
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 "FVFunctorTimeKernel.h"
      11             : 
      12             : #include "SystemBase.h"
      13             : 
      14             : registerADMooseObject("MooseApp", FVFunctorTimeKernel);
      15             : 
      16             : InputParameters
      17       14292 : FVFunctorTimeKernel::validParams()
      18             : {
      19       14292 :   InputParameters params = FVElementalKernel::validParams();
      20       14292 :   params.addClassDescription("Residual contribution from time derivative of an AD functor (default "
      21             :                              "is the variable this kernel is acting upon if the 'functor' "
      22             :                              "parameter is not supplied)  for the finite volume method.");
      23       14292 :   params.set<MultiMooseEnum>("vector_tags") = "time";
      24       14292 :   params.set<MultiMooseEnum>("matrix_tags") = "system time";
      25       14292 :   params.addParam<MooseFunctorName>("functor",
      26             :                                     "The functor this kernel queries for the time derivative.");
      27       14292 :   return params;
      28           0 : }
      29             : 
      30          14 : FVFunctorTimeKernel::FVFunctorTimeKernel(const InputParameters & parameters)
      31             :   : FVElementalKernel(parameters),
      32          28 :     _functor(isParamValid("functor")
      33          28 :                  ? static_cast<const Moose::FunctorBase<ADReal> &>(getFunctor<ADReal>("functor"))
      34          28 :                  : static_cast<Moose::FunctorBase<ADReal> &>(_var))
      35             : {
      36          14 : }
      37             : 
      38             : ADReal
      39       54300 : FVFunctorTimeKernel::computeQpResidual()
      40             : {
      41      108600 :   return _functor.dot(makeElemArg(_current_elem), determineState());
      42             : }

Generated by: LCOV version 1.14