LCOV - code coverage report
Current view: top level - src/bcs - ExplicitFunctionDirichletBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: f45d79 Lines: 10 11 90.9 %
Date: 2025-07-25 05:00:39 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 "ExplicitFunctionDirichletBC.h"
      11             : #include "Function.h"
      12             : 
      13             : registerMooseObject("SolidMechanicsApp", ExplicitFunctionDirichletBC);
      14             : registerMooseObjectRenamed("SolidMechanicsApp",
      15             :                            DirectFunctionDirichletBC,
      16             :                            "10/14/2025 00:00",
      17             :                            ExplicitFunctionDirichletBC);
      18             : 
      19             : InputParameters
      20          80 : ExplicitFunctionDirichletBC::validParams()
      21             : {
      22          80 :   InputParameters params = ExplicitDirichletBCBase::validParams();
      23         160 :   params.addRequiredParam<FunctionName>("function", "The forcing function.");
      24          80 :   params.addClassDescription(
      25             :       "Imposes the essential boundary condition $u=g(t,\\vec{x})$, where $g$ "
      26             :       "is a (possibly) time and space-dependent MOOSE Function.");
      27          80 :   return params;
      28           0 : }
      29             : 
      30          40 : ExplicitFunctionDirichletBC::ExplicitFunctionDirichletBC(const InputParameters & parameters)
      31          40 :   : ExplicitDirichletBCBase(parameters), _func(getFunction("function"))
      32             : {
      33          40 : }
      34             : 
      35             : Real
      36        3832 : ExplicitFunctionDirichletBC::computeQpValue()
      37             : {
      38        3832 :   return _func.value(_t, *_current_node);
      39             : }

Generated by: LCOV version 1.14