www.mooseframework.org
ODETimeKernel.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 
15 #include "ODETimeKernel.h"
16 
17 // MOOSE includes
18 #include "Assembly.h"
19 #include "MooseVariableScalar.h"
20 #include "SystemBase.h"
21 
22 template <>
25 {
27  return params;
28 }
29 
30 ODETimeKernel::ODETimeKernel(const InputParameters & parameters) : ODEKernel(parameters) {}
31 
32 void
34 {
35  DenseVector<Number> & re = _assembly.residualBlock(_var.number(), Moose::KT_TIME);
36  for (_i = 0; _i < _var.order(); _i++)
37  re(_i) += computeQpResidual();
38 }
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters validParams< ODETimeKernel >()
Definition: ODETimeKernel.C:24
Assembly & _assembly
Definition: ScalarKernel.h:79
DenseVector< Number > & residualBlock(unsigned int var_num, Moose::KernelType type=Moose::KT_NONTIME)
Definition: Assembly.h:504
MooseVariableScalar & _var
Scalar variable.
Definition: ScalarKernel.h:81
InputParameters validParams< ODEKernel >()
Definition: ODEKernel.C:24
Order order() const
Get the order of this variable Note: Order enum can be implicitly converted to unsigned int...
unsigned int number() const
Get variable number coming from libMesh.
virtual Real computeQpResidual()=0
ODETimeKernel(const InputParameters &parameters)
Definition: ODETimeKernel.C:30
unsigned int _i
Definition: ScalarKernel.h:84
virtual void computeResidual() override
Definition: ODETimeKernel.C:33