LCOV - code coverage report
Current view: top level - src/bcs - ADVectorFunctionNeumannBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 18 19 94.7 %
Date: 2026-05-29 20:35:17 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 "ADVectorFunctionNeumannBC.h"
      11             : #include "Function.h"
      12             : #include "MooseTypes.h"
      13             : 
      14             : registerMooseObject("MooseApp", ADVectorFunctionNeumannBC);
      15             : 
      16             : InputParameters
      17        3105 : ADVectorFunctionNeumannBC::validParams()
      18             : {
      19        3105 :   InputParameters params = ADVectorIntegratedBC::validParams();
      20       12420 :   params.addParam<FunctionName>("function_x", 0, "The function for the x component");
      21       12420 :   params.addParam<FunctionName>("function_y", 0, "The function for the y component");
      22       12420 :   params.addParam<FunctionName>("function_z", 0, "The function for the z component");
      23        3105 :   params.addClassDescription(
      24             :       "Imposes the integrated boundary condition "
      25             :       "$\\frac{\\partial \\vec{u}}{\\partial n} = \\vec{h}$, "
      26             :       "where $\\vec{h}$ is a (possibly) time and space-dependent MOOSE Function.");
      27        3105 :   return params;
      28           0 : }
      29             : 
      30          23 : ADVectorFunctionNeumannBC::ADVectorFunctionNeumannBC(const InputParameters & parameters)
      31             :   : ADVectorIntegratedBC(parameters),
      32          23 :     _function_x(getFunction("function_x")),
      33          46 :     _function_y(getFunction("function_y")),
      34          69 :     _function_z(getFunction("function_z"))
      35             : {
      36          23 : }
      37             : 
      38             : ADReal
      39      243520 : ADVectorFunctionNeumannBC::computeQpResidual()
      40             : {
      41      243520 :   ADRealVectorValue func_u = {_function_x.value(_t, _q_point[_qp]),
      42      243520 :                               _function_y.value(_t, _q_point[_qp]),
      43      487040 :                               _function_z.value(_t, _q_point[_qp])};
      44             : 
      45      487040 :   return -_test[_i][_qp] * func_u;
      46      243520 : }

Generated by: LCOV version 1.14