13#include "libmesh/node.h"
21 "preset",
true,
"Whether or not to preset the BC (apply the value before the solve begins).");
35 mooseAssert(this->_preset,
"BC is not preset");
37 if (_var.isNodalDefined())
39 const auto n_comp = _current_node->n_comp(_sys.number(), _var.number());
41 for (
const auto i : make_range(n_comp))
43 const auto dof_idx = _current_node->dof_number(_sys.number(), _var.number(), i);
44 if constexpr (std::is_same<T, Real>::value)
46 mooseAssert(n_comp == 1,
"This should only be unity");
47 current_solution.set(dof_idx, value);
52 current_solution.set(dof_idx, value(i));
62 return _u - computeQpValue();
Base class for automatic differentiation Dirichlet BCs.
virtual void computeValue(NumericVector< Number > ¤t_solution) override
Method to preset the nodal value if applicable.
virtual Moose::ADType< T >::type computeQpResidual() override
Compute this NodalBC's contribution to the residual at the current quadrature point.
static InputParameters validParams()
ADDirichletBCBaseTempl(const InputParameters ¶meters)
Base class for automatic differentiation Dirichlet BCs.
Base class for deriving any automatic differentiation boundary condition of a integrated type.
static InputParameters validParams()