LCOV - code coverage report
Current view: top level - src/mfem/bcs - MFEMScalarDirichletBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 419b9d Lines: 11 12 91.7 %
Date: 2025-08-08 20:01:16 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             : #ifdef MOOSE_MFEM_ENABLED
      11             : 
      12             : #include "MFEMScalarDirichletBC.h"
      13             : 
      14             : registerMooseObject("MooseApp", MFEMScalarDirichletBC);
      15             : 
      16             : InputParameters
      17        9118 : MFEMScalarDirichletBC::validParams()
      18             : {
      19        9118 :   InputParameters params = MFEMEssentialBC::validParams();
      20        9118 :   params.addClassDescription("Applies a Dirichlet condition to a scalar variable.");
      21        9118 :   params.addParam<MFEMScalarCoefficientName>(
      22             :       "coefficient", "0.", "The coefficient setting the values on the essential boundary");
      23        9118 :   return params;
      24           0 : }
      25             : 
      26         244 : MFEMScalarDirichletBC::MFEMScalarDirichletBC(const InputParameters & parameters)
      27         244 :   : MFEMEssentialBC(parameters), _coef(getScalarCoefficient("coefficient"))
      28             : {
      29         244 : }
      30             : 
      31             : void
      32         500 : MFEMScalarDirichletBC::ApplyBC(mfem::GridFunction & gridfunc)
      33             : {
      34         500 :   gridfunc.ProjectBdrCoefficient(_coef, getBoundaryMarkers());
      35         500 : }
      36             : 
      37             : #endif

Generated by: LCOV version 1.14