www.mooseframework.org
CoupledODETimeDerivative.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
16 
17 template <>
20 {
22  params.addRequiredCoupledVar("v", "Coupled variable.");
23  return params;
24 }
25 
27  : ODETimeKernel(parameters), _v_dot(coupledScalarDot("v")), _dv_dot_dv(coupledScalarDotDu("v"))
28 {
29 }
30 
31 Real
33 {
34  return _v_dot[_i];
35 }
36 
37 Real
39 {
40  if (_i == _j)
41  return _dv_dot_dv[_i];
42  else
43  return 0;
44 }
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual Real computeQpJacobian() override
Base class for ODEKernels that contribute to the time residual vector.
Definition: ODETimeKernel.h:30
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
InputParameters validParams< CoupledODETimeDerivative >()
unsigned int _i
Definition: ScalarKernel.h:84
InputParameters validParams< ODETimeKernel >()
Definition: ODETimeKernel.C:24
CoupledODETimeDerivative(const InputParameters &parameters)
virtual Real computeQpResidual() override
unsigned int _j
Definition: ScalarKernel.h:84