www.mooseframework.org
NullKernel.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 "NullKernel.h"
11 
12 registerMooseObject("MooseApp", NullKernel);
13 
16 {
18  params.addClassDescription("Kernel that sets a zero residual.");
19  params.addParam<Real>(
20  "jacobian_fill",
21  1e-9,
22  "On diagonal Jacobian fill term to retain an invertible matrix for the preconditioner");
23  return params;
24 }
25 
27  : Kernel(parameters), _jacobian_fill(getParam<Real>("jacobian_fill"))
28 {
29 }
30 
31 Real
33 {
34  return 0.0;
35 }
36 
37 Real
39 {
40  return _jacobian_fill;
41 }
static InputParameters validParams()
Definition: Kernel.C:23
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
NullKernel(const InputParameters &parameters)
Definition: NullKernel.C:26
const Real _jacobian_fill
filler value to put on the on-diagonal Jacobian
Definition: NullKernel.h:29
static InputParameters validParams()
Definition: NullKernel.C:15
virtual Real computeQpJacobian() override
Compute this Kernel&#39;s contribution to the Jacobian at the current quadrature point.
Definition: NullKernel.C:38
virtual Real computeQpResidual() override
Compute this Kernel&#39;s contribution to the residual at the current quadrature point.
Definition: NullKernel.C:32
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Definition: Kernel.h:15
registerMooseObject("MooseApp", NullKernel)
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 option parameter and a documentation string to the InputParameters object...