LCOV - code coverage report
Current view: top level - src/fvkernels - FVFunctorTimeKernel.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 14 15 93.3 %
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 "FVFunctorTimeKernel.h"
      11             : 
      12             : #include "SystemBase.h"
      13             : 
      14             : registerADMooseObject("MooseApp", FVFunctorTimeKernel);
      15             : 
      16             : InputParameters
      17       14290 : FVFunctorTimeKernel::validParams()
      18             : {
      19       14290 :   InputParameters params = FVElementalKernel::validParams();
      20       14290 :   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       14290 :   params.set<MultiMooseEnum>("vector_tags") = "time";
      24       14290 :   params.set<MultiMooseEnum>("matrix_tags") = "system time";
      25       14290 :   params.addParam<MooseFunctorName>("functor",
      26             :                                     "The functor this kernel queries for the time derivative.");
      27       14290 :   return params;
      28           0 : }
      29             : 
      30          13 : FVFunctorTimeKernel::FVFunctorTimeKernel(const InputParameters & parameters)
      31             :   : FVElementalKernel(parameters),
      32          26 :     _functor(isParamValid("functor")
      33          26 :                  ? static_cast<const Moose::FunctorBase<ADReal> &>(getFunctor<ADReal>("functor"))
      34          26 :                  : static_cast<Moose::FunctorBase<ADReal> &>(_var))
      35             : {
      36          13 : }
      37             : 
      38             : ADReal
      39       48000 : FVFunctorTimeKernel::computeQpResidual()
      40             : {
      41       96000 :   return _functor.dot(makeElemArg(_current_elem), determineState());
      42             : }

Generated by: LCOV version 1.14