LCOV - code coverage report
Current view: top level - src/bcs - NeumannBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 12 13 92.3 %
Date: 2025-07-17 01:28:37 Functions: 6 6 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 "NeumannBC.h"
      11             : 
      12             : registerMooseObject("MooseApp", NeumannBC);
      13             : registerMooseObject("MooseApp", ADNeumannBC);
      14             : 
      15             : template <bool is_ad>
      16             : InputParameters
      17       88266 : NeumannBCTempl<is_ad>::validParams()
      18             : {
      19       88266 :   InputParameters params = GenericIntegratedBC<is_ad>::validParams();
      20      264798 :   params.addParam<Real>("value",
      21      176532 :                         0.0,
      22             :                         "For a Laplacian problem, the value of the gradient dotted with the "
      23             :                         "normals on the boundary.");
      24       88266 :   params.declareControllable("value");
      25       88266 :   params.addClassDescription("Imposes the integrated boundary condition "
      26             :                              "$\\frac{\\partial u}{\\partial n}=h$, "
      27             :                              "where $h$ is a constant, controllable value.");
      28       88266 :   return params;
      29           0 : }
      30             : 
      31             : template <bool is_ad>
      32        1382 : NeumannBCTempl<is_ad>::NeumannBCTempl(const InputParameters & parameters)
      33        1382 :   : GenericIntegratedBC<is_ad>(parameters), _value(this->template getParam<Real>("value"))
      34             : {
      35        1378 : }
      36             : 
      37             : template <bool is_ad>
      38             : GenericReal<is_ad>
      39     2587830 : NeumannBCTempl<is_ad>::computeQpResidual()
      40             : {
      41     2714550 :   return -_test[_i][_qp] * _value;
      42             : }
      43             : 
      44             : template class NeumannBCTempl<false>;
      45             : template class NeumannBCTempl<true>;

Generated by: LCOV version 1.14