www.mooseframework.org
NodalKernel.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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"
13 
18 {
19 public:
25 
27 
34  virtual void computeResidual() override;
35 
42  virtual void computeJacobian() override;
43 
50  virtual void computeOffDiagJacobian(unsigned int jvar) override;
51 
52 protected:
56  virtual Real computeQpResidual() = 0;
57 
63  virtual Real computeQpJacobian();
64 
69  virtual Real computeQpOffDiagJacobian(unsigned int jvar);
70 
72  const VariableValue & _u;
73 
76  std::vector<MooseVariableFEBase *> _save_in;
77  std::vector<AuxVariableName> _save_in_strings;
78 
81  std::vector<MooseVariableFEBase *> _diag_save_in;
82  std::vector<AuxVariableName> _diag_save_in_strings;
83 };
std::vector< AuxVariableName > _save_in_strings
Definition: NodalKernel.h:77
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
This is the virtual that derived classes should override for computing an off-diagonal jacobian compo...
Definition: NodalKernel.C:137
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual void computeJacobian() override
Compute the Jacobian at one node.
Definition: NodalKernel.C:88
std::vector< AuxVariableName > _diag_save_in_strings
Definition: NodalKernel.h:82
virtual void computeResidual() override
Compute the residual at the current node.
Definition: NodalKernel.C:69
virtual Real computeQpJacobian()
The user can override this function to compute the "on-diagonal" Jacobian contribution.
Definition: NodalKernel.C:131
const VariableValue & _u
Value of the unknown variable this is acting on.
Definition: NodalKernel.h:72
bool _has_diag_save_in
The aux variables to save the diagonal Jacobian contributions to.
Definition: NodalKernel.h:80
bool _has_save_in
The aux variables to save the residual contributions to.
Definition: NodalKernel.h:75
OutputTools< Real >::VariableValue VariableValue
Definition: MooseTypes.h:302
Base class for creating new types of nodal kernels.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const InputParameters & parameters() const
Get the parameters of the object.
std::vector< MooseVariableFEBase * > _save_in
Definition: NodalKernel.h:76
std::vector< MooseVariableFEBase * > _diag_save_in
Definition: NodalKernel.h:81
static InputParameters validParams()
Class constructor.
Definition: NodalKernel.C:18
Base class for creating nodal kernels with hand-coded Jacobians.
Definition: NodalKernel.h:17
virtual void computeOffDiagJacobian(unsigned int jvar) override
Compute the off-diagonal Jacobian at one node.
Definition: NodalKernel.C:108
virtual Real computeQpResidual()=0
The user can override this function to compute the residual at a node.
NodalKernel(const InputParameters &parameters)
Definition: NodalKernel.C:23