www.mooseframework.org
EigenKernel.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef EIGENKERNEL_H
16 #define EIGENKERNEL_H
17 
18 #include "KernelBase.h"
19 
20 // Forward Declarations
21 class EigenKernel;
22 class MooseEigenSystem;
23 
24 template <>
26 
34 class EigenKernel : public KernelBase
35 {
36 public:
37  virtual void computeResidual() override;
38  virtual void computeJacobian() override;
39  virtual void computeOffDiagJacobian(unsigned int /*jvar*/) override;
40  virtual void computeOffDiagJacobianScalar(unsigned int /*jvar*/) override {}
41 
43  virtual bool enabled() override;
44 
45 protected:
46  virtual Real computeQpResidual() = 0;
47  virtual Real computeQpJacobian() { return 0; }
48  virtual Real computeQpOffDiagJacobian(unsigned int /*jvar*/) { return 0; }
49 
51  const VariableValue & _u;
52 
55 
57  bool _eigen;
58 
61 
66  const Real * _eigenvalue;
67 };
68 
69 #endif // EIGENKERNEL_H
MooseEigenSystem * _eigen_sys
EigenKernel always lives in EigenSystem.
Definition: EigenKernel.h:60
virtual void computeOffDiagJacobian(unsigned int) override
Computes d-residual / d-jvar... storing the result in Ke.
Definition: EigenKernel.C:142
const Real * _eigenvalue
A pointer to the eigenvalue that is stored in a postprocessor This is a pointer so that the method fo...
Definition: EigenKernel.h:66
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual void computeResidual() override
Compute this Kernel&#39;s contribution to the residual.
Definition: EigenKernel.C:87
This is the common base class for the two main kernel types implemented in MOOSE, EigenKernel and Ker...
Definition: KernelBase.h:47
virtual bool enabled() override
Return the enabled status of the object.
Definition: EigenKernel.C:168
const VariableGradient & _grad_u
Holds the solution gradient at the current quadrature points.
Definition: EigenKernel.h:54
The behavior of this kernel is controlled by one problem-wise global parameter eigen_on_current - boo...
Definition: EigenKernel.h:34
virtual Real computeQpOffDiagJacobian(unsigned int)
Definition: EigenKernel.h:48
const VariableValue & _u
Holds the solution at current quadrature points.
Definition: EigenKernel.h:51
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
virtual void computeJacobian() override
Compute this Kernel&#39;s contribution to the diagonal Jacobian entries.
Definition: EigenKernel.C:110
virtual void computeOffDiagJacobianScalar(unsigned int) override
Computes jacobian block with respect to a scalar variable.
Definition: EigenKernel.h:40
virtual Real computeQpResidual()=0
InputParameters validParams< EigenKernel >()
Definition: EigenKernel.C:29
EigenKernel(const InputParameters &parameters)
Definition: EigenKernel.C:40
bool _eigen
flag for as an eigen kernel or a normal kernel
Definition: EigenKernel.h:57
virtual Real computeQpJacobian()
Definition: EigenKernel.h:47