https://mooseframework.inl.gov
FVElementalKernel.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 "FVKernel.h"
13 #include "MooseVariableFV.h"
14 #include "MooseVariableInterface.h"
17 
25 class FVElementalKernel : public FVKernel,
26  public MooseVariableInterface<Real>,
29 {
30 public:
33 
37  void computeResidual() override;
38  void computeResidualAndJacobian() override;
39  void computeJacobian() override;
40  virtual void computeOffDiagJacobian();
41  void computeOffDiagJacobian(unsigned int) override;
43 
44  const MooseVariableFV<Real> & variable() const override { return _var; }
45 
46 protected:
52  virtual ADReal computeQpResidual() = 0;
53 
57  const unsigned int _qp = 0;
58  const Elem * const & _current_elem;
59 
62 };
virtual void computeOffDiagJacobian()
const MooseVariableFV< Real > & variable() const override
Returns the variable that this object operates on.
void computeResidual() override
Usually you should not override these functions - they have some tricky stuff in them that you don&#39;t ...
This is a wrapper that forwards calls to the implementation, which can be switched out at any time wi...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual ADReal computeQpResidual()=0
This is the primary function that must be implemented for flux kernel terms.
DualNumber< Real, DNDerivativeType, true > ADReal
Definition: ADRealForward.h:47
FVElemental is used for calculating residual contributions from volume integral terms of a PDE where ...
const Elem *const & _current_elem
const MooseArray< Point > & _q_point
The physical location of the element&#39;s quadrature Points, indexed by _qp.
FVElementalKernel(const InputParameters &parameters)
static InputParameters validParams()
void computeResidualAndJacobian() override
Compute this object&#39;s contribution to the residual and Jacobian simultaneously.
const ADVariableValue & _u
void computeJacobian() override
Compute this object&#39;s contribution to the diagonal Jacobian entries.
FVKernel is a base class for all finite volume method kernels.
Definition: FVKernel.h:32
An interface for accessing Materials.
Intermediate base class that ties together all the interfaces for getting MooseVariableFEBases with t...
const Moose::Functor< ADReal > & _u_functor
Interface for objects that need to get values of MooseVariables.
const unsigned int _qp
const InputParameters & parameters() const
Get the parameters of the object.
MooseVariableFV< Real > & _var