LCOV - code coverage report
Current view: top level - src/fvbcs - FVFunctionNeumannBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 12 13 92.3 %
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 "FVFunctionNeumannBC.h"
      11             : #include "Function.h"
      12             : 
      13             : registerMooseObject("MooseApp", FVFunctionNeumannBC);
      14             : 
      15             : InputParameters
      16       15579 : FVFunctionNeumannBC::validParams()
      17             : {
      18       15579 :   InputParameters params = FVFluxBC::validParams();
      19       15579 :   params.addClassDescription("Neumann boundary condition for finite volume method.");
      20       46737 :   params.addParam<Real>("factor",
      21       31158 :                         1.,
      22             :                         "A factor for multiplying the function. This could be useful for flipping "
      23             :                         "the sign of the function for example based off the normal");
      24       15579 :   params.addRequiredParam<FunctionName>("function", "The value of the flux crossing the boundary.");
      25       15579 :   return params;
      26           0 : }
      27             : 
      28         662 : FVFunctionNeumannBC::FVFunctionNeumannBC(const InputParameters & parameters)
      29         662 :   : FVFluxBC(parameters), _function(getFunction("function")), _factor(getParam<Real>("factor"))
      30             : {
      31         662 : }
      32             : 
      33             : ADReal
      34        5038 : FVFunctionNeumannBC::computeQpResidual()
      35             : {
      36       10076 :   return -_factor * _function.value(_t, _face_info->faceCentroid());
      37             : }

Generated by: LCOV version 1.14