https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ADArrayDirichletBC.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
10#include "ADArrayDirichletBC.h"
11
13
16{
18 params.addRequiredParam<RealEigenVector>("values",
19 "The values the components must take on the boundary");
20 params.declareControllable("values");
22 "Imposes the essential boundary condition $\\vec{u}=\\vec{g}$, where $\\vec{g}$ "
23 "are constant, controllable values.");
24 return params;
25}
26
28 : ADArrayNodalBC(parameters), _values(getParam<RealEigenVector>("values"))
29{
30 if (_values.size() != _var.count())
31 paramError("values",
32 "Number of 'values' must equal number of variable components (",
33 _var.count(),
34 ").");
35}
36
37ADRealEigenVector
registerMooseObject("MooseApp", ADArrayDirichletBC)
Boundary condition of a Dirichlet type.
virtual ADRealEigenVector computeQpResidual() override
Compute this NodalBC's contribution to the residual at the current quadrature point.
ADArrayDirichletBC(const InputParameters &parameters)
static InputParameters validParams()
const RealEigenVector & _values
The value for this BC.
Base class for deriving any automatic differentiation boundary condition of a integrated type.
Definition ADNodalBC.h:22
const Moose::ADType< T >::type & _u
Value of the unknown variable this BC is acting on.
Definition ADNodalBC.h:48
static InputParameters validParams()
Definition ADNodalBC.C:26
MooseVariableFE< T > & _var
The variable that this NodalBC operates on.
Definition ADNodalBC.h:39
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
Declare the given parameters as controllable.
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one.