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());
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();
virtual void computeValue(NumericVector< Number > ¤t_solution) override
Method to preset the nodal value if applicable.
Base class for deriving any automatic differentiation boundary condition of a integrated type...
Base class for automatic differentiation Dirichlet BCs.
virtual Moose::ADType< T >::type computeQpResidual() override
Compute this NodalBC's contribution to the residual at the current quadrature point.
ADDirichletBCBaseTempl(const InputParameters ¶meters)
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
static InputParameters validParams()
IntRange< T > make_range(T beg, T end)
static InputParameters validParams()
virtual void set(const numeric_index_type i, const Number value)=0