LCOV - code coverage report
Current view: top level - src/bcs - ADArrayDirichletBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 12 15 80.0 %
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 "ADArrayDirichletBC.h"
      11             : 
      12             : registerMooseObject("MooseApp", ADArrayDirichletBC);
      13             : 
      14             : InputParameters
      15        3229 : ADArrayDirichletBC::validParams()
      16             : {
      17        3229 :   InputParameters params = ADArrayNodalBC::validParams();
      18        9687 :   params.addRequiredParam<RealEigenVector>("values",
      19             :                                            "The values the components must take on the boundary");
      20        9687 :   params.declareControllable("values");
      21        3229 :   params.addClassDescription(
      22             :       "Imposes the essential boundary condition $\\vec{u}=\\vec{g}$, where $\\vec{g}$ "
      23             :       "are constant, controllable values.");
      24        3229 :   return params;
      25           0 : }
      26             : 
      27          84 : ADArrayDirichletBC::ADArrayDirichletBC(const InputParameters & parameters)
      28         168 :   : ADArrayNodalBC(parameters), _values(getParam<RealEigenVector>("values"))
      29             : {
      30          84 :   if (_values.size() != _var.count())
      31           0 :     paramError("values",
      32             :                "Number of 'values' must equal number of variable components (",
      33           0 :                _var.count(),
      34             :                ").");
      35          84 : }
      36             : 
      37             : ADRealEigenVector
      38       13880 : ADArrayDirichletBC::computeQpResidual()
      39             : {
      40       27760 :   return _u - _values;
      41             : }

Generated by: LCOV version 1.14