https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
21public:
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
56protected:
59
60 unsigned int _i, _j;
61};
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
Class for scalar variables (they are different).
This is the common base class for objects that give residual contributions.
Interface for objects that needs scalar coupling capabilities.
Base class shared by AD and non-AD scalar kernels.
const VariableValue & uOld() const
Retrieves the old value of the variable that this ScalarKernelBase operates on.
MooseVariableScalar & _var
Scalar variable.
virtual bool isActive()
Use this to enable/disable the scalar kernel.
virtual const MooseVariableScalar & variable() const override
The variable that this kernel operates on.
static InputParameters validParams()
virtual void reinit()=0
Reinitialization method called before each call to computeResidual()
virtual bool computesJacobian() const