https://mooseframework.inl.gov
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 
31 void
33 {
34  residual = _u_dot[_qp];
35 }
36 
39 {
40  return RealEigenVector::Constant(_count, _du_dot_du[_qp]);
41 }
const VariableValue & _du_dot_du
Derivative of u_dot with respect to u.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
virtual RealEigenVector computeQpJacobian() override
The user can override this function to compute the "on-diagonal" Jacobian contribution.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const ArrayVariableValue & _u_dot
Time derivative of u.
static InputParameters validParams()
Class constructor.
virtual void computeQpResidual(RealEigenVector &residual) override
The user must override this function to compute the residual at a node.
registerMooseObject("MooseApp", ArrayTimeDerivativeNodalKernel)
const unsigned int _count
Number of components of the array variable.
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...
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition: MooseTypes.h:147
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type...
ArrayTimeDerivativeNodalKernel(const InputParameters &parameters)
Base class for creating nodal kernels with hand-coded Jacobians.
unsigned int _qp
Quadrature point index.