https://mooseframework.inl.gov
ExplicitFunctionDirichletBC.C
Go to the documentation of this file.
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 
11 #include "Function.h"
12 
14 registerMooseObjectRenamed("SolidMechanicsApp",
15  DirectFunctionDirichletBC,
16  "10/14/2025 00:00",
18 
21 {
23  params.addRequiredParam<FunctionName>("function", "The forcing function.");
24  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  return params;
28 }
29 
31  : ExplicitDirichletBCBase(parameters), _func(getFunction("function"))
32 {
33 }
34 
35 Real
37 {
38  return _func.value(_t, *_current_node);
39 }
static InputParameters validParams()
registerMooseObject("SolidMechanicsApp", ExplicitFunctionDirichletBC)
ExplicitFunctionDirichletBC(const InputParameters &parameters)
Defines a boundary condition that forces the value to be a user specified function at the boundary...
const Node *const & _current_node
Base boundary condition of a direct Dirichlet type.
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
Real & _t
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
virtual Real computeQpValue() override
Compute the value of the DirichletBC at the current quadrature point.
const Function & _func
The function being used for evaluation.
virtual Real value(Real t, const Point &p) const
registerMooseObjectRenamed("SolidMechanicsApp", DirectFunctionDirichletBC, "10/14/2025 00:00", ExplicitFunctionDirichletBC)