www.mooseframework.org
NullKernel.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 "NullKernel.h"
16 
17 template <>
20 {
22  params.addClassDescription("Kernel that sets a zero residual.");
23  params.addParam<Real>(
24  "jacobian_fill",
25  1e-9,
26  "On diagonal Jacobian fill term to retain an invertable matrix for the preconditioner");
27  return params;
28 }
29 
31  : Kernel(parameters), _jacobian_fill(getParam<Real>("jacobian_fill"))
32 {
33 }
34 
35 Real
37 {
38  return 0.0;
39 }
40 
41 Real
43 {
44  return _jacobian_fill;
45 }
InputParameters validParams< NullKernel >()
Definition: NullKernel.C:19
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
NullKernel(const InputParameters &parameters)
Definition: NullKernel.C:30
const Real _jacobian_fill
filler value to put on the on-diagonal Jacobian
Definition: NullKernel.h:38
virtual Real computeQpJacobian() override
Compute this Kernel&#39;s contribution to the Jacobian at the current quadrature point.
Definition: NullKernel.C:42
InputParameters validParams< Kernel >()
Definition: Kernel.C:30
virtual Real computeQpResidual() override
Compute this Kernel&#39;s contribution to the residual at the current quadrature point.
Definition: NullKernel.C:36
Definition: Kernel.h:25
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...