https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ArrayTimeDerivativeNodalKernel.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
13
16{
18 params.set<MultiMooseEnum>("vector_tags") = "time";
19 params.set<MultiMooseEnum>("matrix_tags") = "system time";
20 params.addClassDescription("Forms the contribution to the residual and jacobian of the time "
21 "derivative term for an array variable for ODEs "
22 "being solved at all nodes.");
23 return params;
24}
25
27 : ArrayNodalKernel(parameters), _u_dot(_var.dofValuesDot()), _du_dot_du(_var.dofValuesDuDotDu())
28{
29}
30
31void
33{
34 residual = _u_dot[_qp];
35}
36
37void
39{
40 for (const auto i : make_range(_count))
42}
registerMooseObject("MooseApp", ArrayTimeDerivativeNodalKernel)
Base class for creating nodal kernels with hand-coded Jacobians.
void setJacobian(unsigned int i, unsigned int j, Real value)
Add a Jacobian entry for the current nodal kernel contribution.
const unsigned int _count
Number of components of the array variable.
static InputParameters validParams()
Class constructor.
const VariableValue & _du_dot_du
Derivative of u_dot with respect to u.
ArrayTimeDerivativeNodalKernel(const InputParameters &parameters)
virtual void computeQpResidual(RealEigenVector &residual) override
The user must override this function to compute the residual at a node.
virtual void computeQpJacobian() override
The user can override this function to compute the intra-variable off-diagonal Jacobian contribution ...
const ArrayVariableValue & _u_dot
Time derivative of u.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type.
unsigned int _qp
Quadrature point index.