LCOV - code coverage report
Current view: top level - src/bcs - ADFunctionDirichletBC.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 "ADFunctionDirichletBC.h"
      11             : #include "Function.h"
      12             : 
      13             : #include "libmesh/node.h"
      14             : 
      15             : registerMooseObject("MooseApp", ADFunctionDirichletBC);
      16             : 
      17             : InputParameters
      18       14817 : ADFunctionDirichletBC::validParams()
      19             : {
      20       14817 :   InputParameters params = ADDirichletBCBaseTempl<Real>::validParams();
      21       14817 :   params.addClassDescription("Imposes the essential boundary condition $u=g$, where $g$ "
      22             :                              "is calculated by a function.");
      23       14817 :   params.addParam<FunctionName>("function", 0, "The function describing the Dirichlet condition");
      24       14817 :   return params;
      25           0 : }
      26             : 
      27         276 : ADFunctionDirichletBC::ADFunctionDirichletBC(const InputParameters & parameters)
      28         276 :   : ADDirichletBCBaseTempl<Real>(parameters), _function(getFunction("function"))
      29             : {
      30         276 : }
      31             : 
      32             : ADReal
      33      183556 : ADFunctionDirichletBC::computeQpValue()
      34             : {
      35      367112 :   return _function.value(_t, *_current_node);
      36             : }

Generated by: LCOV version 1.14