www.mooseframework.org
ScalarKernel.h
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 #pragma once
11 
12 #include "ScalarKernelBase.h"
13 
15 {
16 public:
18 
20  virtual void computeResidual() override;
21  virtual void computeJacobian() override;
22 
23 protected:
24  virtual Real computeQpResidual() { mooseError(type(), " must implement 'computeQpResidual'"); }
25  virtual Real computeQpJacobian() { mooseError(type(), " must implement 'computeQpJacobian'"); }
26 
28  const VariableValue & _u;
29 };
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual Real computeQpJacobian()
Definition: ScalarKernel.h:25
virtual void computeJacobian() override
Compute this object's contribution to the diagonal Jacobian entries.
Definition: ScalarKernel.C:37
virtual void computeResidual() override
Compute this object's contribution to the residual.
Definition: ScalarKernel.C:26
virtual Real computeQpResidual()
Definition: ScalarKernel.h:24
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
const VariableValue & _u
The current solution (old solution if explicit)
Definition: ScalarKernel.h:28
ScalarKernel(const InputParameters &parameters)
Definition: ScalarKernel.C:20
forward declarations
Definition: MooseArray.h:17
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Base class shared by AD and non-AD scalar kernels.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.
static InputParameters validParams()
Definition: ScalarKernel.C:14