LCOV - code coverage report
Current view: top level - src/bcs - FunctionGradientNeumannBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 12 13 92.3 %
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 "FunctionGradientNeumannBC.h"
      11             : #include "Function.h"
      12             : 
      13             : registerMooseObject("MooseApp", FunctionGradientNeumannBC);
      14             : 
      15             : InputParameters
      16        3811 : FunctionGradientNeumannBC::validParams()
      17             : {
      18        3811 :   InputParameters params = IntegratedBC::validParams();
      19       15244 :   params.addRequiredParam<FunctionName>("exact_solution", "The exact solution.");
      20       15244 :   params.addParam<Real>("coeff", 1, "The diffusion, thermal conductivity, etc. coefficient");
      21        3811 :   params.addClassDescription("Imposes the integrated boundary condition "
      22             :                              "arising from integration by parts of a diffusion/heat conduction "
      23             :                              "operator, and where the exact solution can be specified.");
      24        3811 :   return params;
      25           0 : }
      26             : 
      27         390 : FunctionGradientNeumannBC::FunctionGradientNeumannBC(const InputParameters & parameters)
      28             :   : IntegratedBC(parameters),
      29         390 :     _exact_solution(getFunction("exact_solution")),
      30        1170 :     _coeff(getParam<Real>("coeff"))
      31             : {
      32         390 : }
      33             : 
      34             : Real
      35     3290986 : FunctionGradientNeumannBC::computeQpResidual()
      36             : {
      37     3290986 :   return -_test[_i][_qp] * _normals[_qp] * _coeff * _exact_solution.gradient(_t, _q_point[_qp]);
      38             : }

Generated by: LCOV version 1.14