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 "ExplicitDirichletBC.h" 11 : 12 : registerMooseObject("SolidMechanicsApp", ExplicitDirichletBC); 13 : registerMooseObjectRenamed("SolidMechanicsApp", 14 : DirectDirichletBC, 15 : "10/14/2025 00:00", 16 : ExplicitDirichletBC); 17 : 18 : InputParameters 19 24 : ExplicitDirichletBC::validParams() 20 : { 21 24 : InputParameters params = ExplicitDirichletBCBase::validParams(); 22 48 : params.addRequiredParam<Real>("value", "Value of the BC"); 23 48 : params.declareControllable("value"); 24 24 : params.addClassDescription("Imposes the essential boundary condition $u=g$, where $g$ " 25 : "is a constant, controllable value."); 26 24 : return params; 27 0 : } 28 : 29 12 : ExplicitDirichletBC::ExplicitDirichletBC(const InputParameters & parameters) 30 24 : : ExplicitDirichletBCBase(parameters), _value(getParam<Real>("value")) 31 : { 32 12 : } 33 : 34 : Real 35 240 : ExplicitDirichletBC::computeQpValue() 36 : { 37 240 : return _value; 38 : }