https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NullKernel.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 "NullKernel.h"
11
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
31Real
33{
34 return 0.0;
35}
36
37Real
registerMooseObject("MooseApp", NullKernel)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
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.
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.
static InputParameters validParams()
Definition Kernel.C:24
const Real _jacobian_fill
filler value to put on the on-diagonal Jacobian
Definition NullKernel.h:29
NullKernel(const InputParameters &parameters)
Definition NullKernel.C:26
virtual Real computeQpJacobian() override
Compute this Kernel's contribution to the Jacobian at the current quadrature point.
Definition NullKernel.C:38
static InputParameters validParams()
Definition NullKernel.C:15
virtual Real computeQpResidual() override
Compute this Kernel's contribution to the residual at the current quadrature point.
Definition NullKernel.C:32