www.mooseframework.org
CoupledODETimeDerivative.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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.addClassDescription(
19  "Residual contribution of ODE from the time derivative of a coupled variable.");
20  params.addRequiredCoupledVar("v", "Coupled variable.");
21  return params;
22 }
23 
25  : ODETimeKernel(parameters), _v_dot(coupledScalarDot("v")), _dv_dot_dv(coupledScalarDotDu("v"))
26 {
27 }
28 
29 Real
31 {
32  return _v_dot[_i];
33 }
34 
35 Real
37 {
38  if (_i == _j)
39  return _dv_dot_dv[_i];
40  else
41  return 0;
42 }
const VariableValue & _dv_dot_dv
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual Real computeQpJacobian() override
static InputParameters validParams()
Definition: ODETimeKernel.C:18
Base class for ODEKernels that contribute to the time residual vector.
Definition: ODETimeKernel.h:18
static InputParameters validParams()
registerMooseObject("MooseApp", CoupledODETimeDerivative)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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...
CoupledODETimeDerivative(const InputParameters &parameters)
virtual Real computeQpResidual() override