LCOV - code coverage report
Current view: top level - include/bcs - VectorIntegratedBC.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 2 4 50.0 %
Date: 2025-07-17 01:28:37 Functions: 2 4 50.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             : #pragma once
      11             : 
      12             : #include "IntegratedBCBase.h"
      13             : #include "MooseVariableInterface.h"
      14             : 
      15             : /**
      16             :  * Base class for deriving any boundary condition of a integrated type
      17             :  */
      18             : class VectorIntegratedBC : public IntegratedBCBase, public MooseVariableInterface<RealVectorValue>
      19             : {
      20             : public:
      21             :   static InputParameters validParams();
      22             : 
      23             :   VectorIntegratedBC(const InputParameters & parameters);
      24             : 
      25      167446 :   virtual const VectorMooseVariable & variable() const override { return _var; }
      26             : 
      27             :   virtual void computeResidual() override;
      28             :   virtual void computeJacobian() override;
      29             :   /**
      30             :    * Computes d-ivar-residual / d-jvar...
      31             :    */
      32             :   virtual void computeOffDiagJacobian(unsigned int jvar) override;
      33             :   /**
      34             :    * Computes jacobian block with respect to a scalar variable
      35             :    * @param jvar The number of the scalar variable
      36             :    */
      37             :   void computeOffDiagJacobianScalar(unsigned int jvar) override;
      38             : 
      39             : protected:
      40             :   /**
      41             :    * Method for computing the residual at quadrature points
      42             :    */
      43             :   virtual Real computeQpResidual() = 0;
      44             : 
      45             :   /**
      46             :    * Method for computing the diagonal Jacobian at quadrature points
      47             :    */
      48           0 :   virtual Real computeQpJacobian() { return 0; }
      49             : 
      50             :   /**
      51             :    * Method for computing an off-diagonal jacobian component at quadrature points.
      52             :    */
      53     1451520 :   virtual Real computeQpOffDiagJacobian(unsigned int /*jvar*/) { return 0; }
      54             : 
      55             :   /**
      56             :    * Method for computing an off-diagonal jacobian component from a scalar var.
      57             :    */
      58           0 :   virtual Real computeQpOffDiagJacobianScalar(unsigned int /*jvar*/) { return 0; }
      59             : 
      60             :   const VectorMooseVariable & _var;
      61             : 
      62             :   /// normals at quadrature points
      63             :   const MooseArray<Point> & _normals;
      64             : 
      65             :   // shape functions
      66             : 
      67             :   /// shape function values (in QPs)
      68             :   const VectorVariablePhiValue & _phi;
      69             : 
      70             :   // test functions
      71             : 
      72             :   /// test function values (in QPs)
      73             :   const VectorVariableTestValue & _test;
      74             : 
      75             :   // solution variable
      76             : 
      77             :   /// the values of the unknown variable this BC is acting on
      78             :   const VectorVariableValue & _u;
      79             : };

Generated by: LCOV version 1.14