https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ScalarKernel.h
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#pragma once
11
12#include "ScalarKernelBase.h"
13
15{
16public:
18
20 virtual void computeResidual() override;
21 virtual void computeJacobian() override;
22
23protected:
24 virtual Real computeQpResidual() { mooseError(type(), " must implement 'computeQpResidual'"); }
25 virtual Real computeQpJacobian() { mooseError(type(), " must implement 'computeQpJacobian'"); }
26
29};
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
OutputTools< Real >::VariableValue VariableValue
Definition MooseTypes.h:348
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
const std::string & type() const
Get the type of this class.
Definition MooseBase.h:93
Base class shared by AD and non-AD scalar kernels.
virtual Real computeQpResidual()
const VariableValue & _u
The current solution (old solution if explicit)
virtual void computeJacobian() override
Compute this object's contribution to the diagonal Jacobian entries.
virtual Real computeQpJacobian()
static InputParameters validParams()
virtual void computeResidual() override
Compute this object's contribution to the residual.