www.mooseframework.org
ScalarKernel.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 
10 #include "ScalarKernel.h"
11 #include "MooseVariableScalar.h"
12 
15 {
17  return params;
18 }
19 
21  : ScalarKernelBase(parameters), _u(_is_implicit ? _var.sln() : uOld())
22 {
23 }
24 
25 void
27 {
29 
30  for (_i = 0; _i < _var.order(); _i++)
32 
34 }
35 
36 void
38 {
40 
41  for (_i = 0; _i < _local_ke.m(); _i++)
43 
45 }
void accumulateTaggedLocalResidual()
Local residual blocks will be appended by adding the current local kernel residual.
unsigned int number() const
Get variable number coming from libMesh.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual Real computeQpJacobian()
Definition: ScalarKernel.h:25
MooseVariableScalar & _var
Scalar variable.
unsigned int m() const
virtual void computeJacobian() override
Compute this object&#39;s contribution to the diagonal Jacobian entries.
Definition: ScalarKernel.C:37
virtual void computeResidual() override
Compute this object&#39;s contribution to the residual.
Definition: ScalarKernel.C:26
DenseMatrix< Number > _local_ke
Holds local Jacobian entries as they are accumulated by this Kernel.
virtual Real computeQpResidual()
Definition: ScalarKernel.h:24
void accumulateTaggedLocalMatrix()
Local Jacobian blocks will be appended by adding the current local kernel Jacobian.
ScalarKernel(const InputParameters &parameters)
Definition: ScalarKernel.C:20
Assembly & _assembly
Reference to this Kernel&#39;s assembly object.
Order order() const
Get the order of this variable Note: Order enum can be implicitly converted to unsigned int...
DenseVector< Number > _local_re
Holds local residual entries as they are accumulated by this Kernel.
Base class shared by AD and non-AD scalar kernels.
void prepareVectorTag(Assembly &assembly, unsigned int ivar)
Prepare data for computing element residual according to active tags.
void prepareMatrixTag(Assembly &assembly, unsigned int ivar, unsigned int jvar)
Prepare data for computing element jacobian according to the active tags.
static InputParameters validParams()
Definition: ScalarKernel.C:14
static InputParameters validParams()