https://mooseframework.inl.gov
Loading...
Searching...
No Matches
VectorCoupledTimeDerivative.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{
19 "Time derivative Kernel that acts on a coupled vector variable. Weak form: "
20 "$(\\vec{\\psi}_i, \\frac{\\partial \\vec{v_h}}{\\partial t})$.");
21 params.addRequiredCoupledVar("v", "Coupled vector variable");
22 return params;
23}
24
26 : VectorKernel(parameters),
27 _v_dot(coupledVectorDot("v")),
28 _dv_dot(coupledVectorDotDu("v")),
29 _v_var(coupled("v"))
30{
31}
32
33Real
38
39Real
44
45Real
47{
48 if (jvar == _v_var)
49 return _test[_i][_qp] * _phi[_j][_qp] * _dv_dot[_qp];
50
51 return 0.0;
52}
registerMooseObject("MooseApp", VectorCoupledTimeDerivative)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
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 _qp
The current quadrature point index.
Definition KernelBase.h:43
unsigned int _j
current index for the shape function
Definition KernelBase.h:61
unsigned int _i
current index for the test function
Definition KernelBase.h:58
This calculates the time derivative for a coupled vector variable.
VectorCoupledTimeDerivative(const InputParameters &parameters)
virtual Real computeQpJacobian() override
Compute this Kernel's contribution to the Jacobian at the current quadrature point.
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
This is the virtual that derived classes should override for computing an off-diagonal Jacobian compo...
const VectorVariableValue & _v_dot
virtual Real computeQpResidual() override
Compute this Kernel's contribution to the residual at the current quadrature point.
const VectorVariableTestValue & _test
the current test function
static InputParameters validParams()
const VectorVariablePhiValue & _phi
the current shape functions