https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NodalKernel.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 "NodalKernelBase.h"
14
19{
20public:
26
28
35 virtual void computeResidual() override;
36
43 virtual void computeJacobian() override;
44
51 virtual void computeOffDiagJacobian(unsigned int jvar) override;
52
57 const MooseVariable & variable() const override { return _var; }
58
59protected:
63 virtual Real computeQpResidual() = 0;
64
70 virtual Real computeQpJacobian();
71
76 virtual Real computeQpOffDiagJacobian(unsigned int jvar);
77
80
83
86 std::vector<MooseVariableFEBase *> _save_in;
87 std::vector<AuxVariableName> _save_in_strings;
88
91 std::vector<MooseVariableFEBase *> _diag_save_in;
92 std::vector<AuxVariableName> _diag_save_in_strings;
93};
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
Interface for objects that need to get values of MooseVariables.
Base class for creating new types of nodal kernels.
Base class for creating nodal kernels with hand-coded Jacobians.
Definition NodalKernel.h:19
static InputParameters validParams()
Class constructor.
Definition NodalKernel.C:18
virtual void computeOffDiagJacobian(unsigned int jvar) override
Compute the off-diagonal Jacobian at one node.
virtual void computeJacobian() override
Compute the Jacobian at one node.
std::vector< MooseVariableFEBase * > _diag_save_in
Definition NodalKernel.h:91
virtual Real computeQpResidual()=0
The user can override this function to compute the residual at a node.
std::vector< MooseVariableFEBase * > _save_in
Definition NodalKernel.h:86
virtual void computeResidual() override
Compute the residual at the current node.
Definition NodalKernel.C:91
std::vector< AuxVariableName > _save_in_strings
Definition NodalKernel.h:87
bool _has_diag_save_in
The aux variables to save the diagonal Jacobian contributions to.
Definition NodalKernel.h:90
bool _has_save_in
The aux variables to save the residual contributions to.
Definition NodalKernel.h:85
MooseVariable & _var
variable this works on
Definition NodalKernel.h:79
const VariableValue & _u
Value of the unknown variable this is acting on.
Definition NodalKernel.h:82
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
This is the virtual that derived classes should override for computing an off-diagonal jacobian compo...
virtual Real computeQpJacobian()
The user can override this function to compute the "on-diagonal" Jacobian contribution.
std::vector< AuxVariableName > _diag_save_in_strings
Definition NodalKernel.h:92
const MooseVariable & variable() const override
Gets the variable this is active on.
Definition NodalKernel.h:57