LCOV - code coverage report
Current view: top level - src/bcs - MatNeumannBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 10 11 90.9 %
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 "MatNeumannBC.h"
      11             : 
      12             : registerMooseObject("MooseApp", MatNeumannBC);
      13             : registerMooseObject("MooseApp", ADMatNeumannBC);
      14             : 
      15             : template <bool is_ad>
      16             : InputParameters
      17       28605 : MatNeumannBCTempl<is_ad>::validParams()
      18             : {
      19       28605 :   InputParameters params = NeumannBCTempl<is_ad>::validParams();
      20             : 
      21       28605 :   params.addClassDescription("Imposes the integrated boundary condition "
      22             :                              "$\\frac{C \\partial u}{\\partial n}=M*h$, "
      23             :                              "where $h$ is a constant, $M$ is a material property, and $C$ is a "
      24             :                              "coefficient defined by the kernel for $u$.");
      25       28605 :   params.addRequiredParam<MaterialPropertyName>(
      26             :       "boundary_material",
      27             :       "Material property multiplying the constant that will be enforced by the BC");
      28       28605 :   return params;
      29           0 : }
      30             : 
      31             : template <bool is_ad>
      32          39 : MatNeumannBCTempl<is_ad>::MatNeumannBCTempl(const InputParameters & parameters)
      33             :   : NeumannBCTempl<is_ad>(parameters),
      34          39 :     _boundary_prop(this->template getGenericMaterialProperty<Real, is_ad>("boundary_material"))
      35             : {
      36          39 : }
      37             : 
      38             : template <bool is_ad>
      39             : GenericReal<is_ad>
      40      311600 : MatNeumannBCTempl<is_ad>::computeQpResidual()
      41             : {
      42      424000 :   return -_test[_i][_qp] * _value * _boundary_prop[_qp];
      43             : }

Generated by: LCOV version 1.14