https://mooseframework.inl.gov
NullScalarKernel.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 
10 #include "NullScalarKernel.h"
11 
12 // MOOSE includes
13 #include "Assembly.h"
14 
16 
19 {
21  params.addClassDescription(
22  "Scalar kernel that sets a zero residual, to avoid error from system missing this variable.");
23  params.addParam<Real>("jacobian_fill",
24  0.0,
25  "On diagonal Jacobian fill term, potentially needed for preconditioner");
26  return params;
27 }
28 
30  : ScalarKernel(parameters), _jacobian_fill(getParam<Real>("jacobian_fill"))
31 {
32 }
33 
34 void
36 {
37 }
38 
39 Real
41 {
42  return 0;
43 }
44 
45 Real
47 {
48  return _jacobian_fill;
49 }
virtual Real computeQpJacobian() override
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const Real _jacobian_fill
filler value to put on the on-diagonal Jacobian
virtual void reinit() override
Reinitialization method called before each call to computeResidual()
virtual Real computeQpResidual() override
Scalar kernel that sets a zero residual, to avoid error from system missing this variable.
registerMooseObject("MooseApp", NullScalarKernel)
static InputParameters validParams()
NullScalarKernel(const InputParameters &parameters)
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...
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object...
static InputParameters validParams()
Definition: ScalarKernel.C:14