LCOV - code coverage report
Current view: top level - src/bcs - DirectionalNeumannBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 11 12 91.7 %
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 "DirectionalNeumannBC.h"
      11             : 
      12             : registerMooseObject("MooseApp", DirectionalNeumannBC);
      13             : registerMooseObjectRenamed("MooseApp", VectorNeumannBC, "01/01/2025 00:01", DirectionalNeumannBC);
      14             : 
      15             : InputParameters
      16       28555 : DirectionalNeumannBC::validParams()
      17             : {
      18       28555 :   InputParameters params = IntegratedBC::validParams();
      19       85665 :   params.addParam<RealVectorValue>(
      20       57110 :       "vector_value", RealVectorValue(), "vector this BC should act in");
      21       28555 :   params.addClassDescription("Imposes the integrated boundary condition "
      22             :                              "$\\frac{\\partial u}{\\partial n}=\\vec{V}\\cdot\\hat{n}$, "
      23             :                              "where $\\vec{V}$ is a user-defined, constant vector.");
      24       28555 :   return params;
      25           0 : }
      26             : 
      27          13 : DirectionalNeumannBC::DirectionalNeumannBC(const InputParameters & parameters)
      28          13 :   : IntegratedBC(parameters), _value(getParam<RealVectorValue>("vector_value"))
      29             : {
      30          13 : }
      31             : 
      32             : Real
      33       16240 : DirectionalNeumannBC::computeQpResidual()
      34             : {
      35       16240 :   return -_test[_i][_qp] * (_value * _normals[_qp]);
      36             : }

Generated by: LCOV version 1.14