LCOV - code coverage report
Current view: top level - src/mfem/bcs - MFEMScalarDirichletBC.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             : #ifdef MFEM_ENABLED
      11             : 
      12             : #include "MFEMScalarDirichletBC.h"
      13             : 
      14             : registerMooseObject("MooseApp", MFEMScalarDirichletBC);
      15             : 
      16             : InputParameters
      17        8910 : MFEMScalarDirichletBC::validParams()
      18             : {
      19        8910 :   InputParameters params = MFEMEssentialBC::validParams();
      20        8910 :   params.addClassDescription("Applies a Dirichlet condition to a scalar variable.");
      21        8910 :   params.addParam<MFEMScalarCoefficientName>(
      22             :       "coefficient", "0.", "The coefficient setting the values on the essential boundary");
      23        8910 :   return params;
      24           0 : }
      25             : 
      26         140 : MFEMScalarDirichletBC::MFEMScalarDirichletBC(const InputParameters & parameters)
      27             :   : MFEMEssentialBC(parameters),
      28         140 :     _coef(getScalarCoefficient(getParam<MFEMScalarCoefficientName>("coefficient")))
      29             : {
      30         140 : }
      31             : 
      32             : void
      33         264 : MFEMScalarDirichletBC::ApplyBC(mfem::GridFunction & gridfunc)
      34             : {
      35         264 :   gridfunc.ProjectBdrCoefficient(_coef, getBoundaryMarkers());
      36         264 : }
      37             : 
      38             : #endif

Generated by: LCOV version 1.14