https://mooseframework.inl.gov
ScalarKernelBase.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 "ResidualObject.h"
13 #include "ScalarCoupleable.h"
14 #include "MooseVariableScalar.h"
15 
20 {
21 public:
23 
25 
29  virtual void reinit() = 0;
30 
34  virtual const MooseVariableScalar & variable() const override { return _var; }
35 
40  virtual bool isActive() { return true; }
41 
47  const VariableValue & uOld() const;
48 
54  virtual bool computesJacobian() const { return true; }
55 
56 protected:
59 
60  unsigned int _i, _j;
61 };
virtual bool isActive()
Use this to enable/disable the scalar kernel.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:127
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
MooseVariableScalar & _var
Scalar variable.
virtual const MooseVariableScalar & variable() const override
The variable that this kernel operates on.
ScalarKernelBase(const InputParameters &parameters)
virtual void reinit()=0
Reinitialization method called before each call to computeResidual()
const VariableValue & uOld() const
Retrieves the old value of the variable that this ScalarKernelBase operates on.
OutputTools< Real >::VariableValue VariableValue
Definition: MooseTypes.h:315
This is the common base class for objects that give residual contributions.
Base class shared by AD and non-AD scalar kernels.
Class for scalar variables (they are different).
Interface for objects that needs scalar coupling capabilities.
static InputParameters validParams()
virtual bool computesJacobian() const