www.mooseframework.org
NodalKernel.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 NODALKERNEL_H
16 #define NODALKERNEL_H
17 
18 // MOOSE
19 #include "MooseObject.h"
20 #include "BlockRestrictable.h"
21 #include "SetupInterface.h"
22 #include "FunctionInterface.h"
23 #include "UserObjectInterface.h"
24 #include "TransientInterface.h"
25 #include "PostprocessorInterface.h"
27 #include "BlockRestrictable.h"
28 #include "BoundaryRestrictable.h"
29 #include "Restartable.h"
30 #include "ZeroInterface.h"
31 #include "MeshChangedInterface.h"
32 #include "RandomInterface.h"
34 
35 // Forward declerations
36 class MooseVariable;
37 class MooseMesh;
38 class SubProblem;
39 class SystemBase;
40 class NodalKernel;
41 class Assembly;
42 
43 template <>
45 
50 class NodalKernel : public MooseObject,
51  public BlockRestrictable,
52  public BoundaryRestrictable,
53  public SetupInterface,
54  public FunctionInterface,
55  public UserObjectInterface,
56  public TransientInterface,
59  public Restartable,
60  public ZeroInterface,
61  public MeshChangedInterface,
62  public RandomInterface,
64 {
65 public:
71 
77 
83 
90  virtual void computeResidual();
91 
98  virtual void computeJacobian();
99 
106  virtual void computeOffDiagJacobian(unsigned int jvar);
107 
108 protected:
112  virtual Real computeQpResidual() = 0;
113 
119  virtual Real computeQpJacobian();
120 
125  virtual Real computeQpOffDiagJacobian(unsigned int jvar);
126 
129 
132 
135 
138 
141 
144 
147 
149  const Node *& _current_node;
150 
152  unsigned int _qp;
153 
155  const VariableValue & _u;
156 
159 
162 
165  std::vector<MooseVariable *> _save_in;
166  std::vector<AuxVariableName> _save_in_strings;
167 
170  std::vector<MooseVariable *> _diag_save_in;
171  std::vector<AuxVariableName> _diag_save_in_strings;
172 };
173 
174 #endif /* NODALKERNEL_H */
Interface for objects that need parallel consistent random numbers without patterns over the course o...
MooseVariable & variable()
Gets the variable this is active on.
Definition: NodalKernel.C:133
std::vector< AuxVariableName > _save_in_strings
Definition: NodalKernel.h:166
A class for creating restricted objects.
Definition: Restartable.h:31
Keeps track of stuff related to assembling.
Definition: Assembly.h:63
Class for stuff related to variables.
Definition: MooseVariable.h:43
SubProblem & subProblem()
Get a reference to the subproblem.
Definition: NodalKernel.C:139
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:207
const Node *& _current_node
current node being processed
Definition: NodalKernel.h:149
std::vector< MooseVariable * > _diag_save_in
Definition: NodalKernel.h:170
Assembly & _assembly
Reference to assembly.
Definition: NodalKernel.h:140
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters validParams< NodalKernel >()
Definition: NodalKernel.C:24
/class BoundaryRestrictable /brief Provides functionality for limiting the object to certain boundary...
virtual void computeJacobian()
Compute the Jacobian at one node.
Definition: NodalKernel.C:164
virtual void computeResidual()
Compute the residual at the current node.
Definition: NodalKernel.C:145
Base class for a system (of equations)
Definition: SystemBase.h:91
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
SubProblem & _subproblem
Reference to SubProblem.
Definition: NodalKernel.h:128
MooseVariable & _var
variable this works on
Definition: NodalKernel.h:143
Interface for objects that needs transient capabilities.
std::vector< AuxVariableName > _diag_save_in_strings
Definition: NodalKernel.h:171
virtual void computeOffDiagJacobian(unsigned int jvar)
Compute the off-diagonal Jacobian at one node.
Definition: NodalKernel.C:184
Interface for notifications that the mesh has changed.
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:36
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
virtual Real computeQpJacobian()
The user can override this function to compute the "on-diagonal" Jacobian contribution.
Definition: NodalKernel.C:201
const VariableValue & _u
Value of the unknown variable this is acting on.
Definition: NodalKernel.h:155
Interface for objects that need to use UserObjects.
SystemBase & _sys
Reference to SystemBase.
Definition: NodalKernel.h:134
const VariableValue & _du_dot_du
Derivative of u_dot with respect to u.
Definition: NodalKernel.h:161
const VariableValue & _u_dot
Time derivative of the variable this is acting on.
Definition: NodalKernel.h:158
bool _has_diag_save_in
The aux variables to save the diagonal Jacobian contributions to.
Definition: NodalKernel.h:169
bool _has_save_in
The aux variables to save the residual contributions to.
Definition: NodalKernel.h:164
MooseMesh & _mesh
Mesh this is defined on.
Definition: NodalKernel.h:146
std::vector< MooseVariable * > _save_in
Definition: NodalKernel.h:165
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:53
FEProblemBase & _fe_problem
Reference to FEProblemBase.
Definition: NodalKernel.h:131
Interface to bring zero values inside objects.
Definition: ZeroInterface.h:35
Intermediate base class that ties together all the interfaces for getting MooseVariables with the Moo...
An interface that restricts an object to subdomains via the &#39;blocks&#39; input parameter.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
unsigned int _qp
Quadrature point index.
Definition: NodalKernel.h:152
Base class for creating new types of boundary conditions.
Definition: NodalKernel.h:50
Interface for objects that need to use functions.
THREAD_ID _tid
Thread id.
Definition: NodalKernel.h:137
virtual Real computeQpResidual()=0
The user can override this function to compute the residual at a node.
Interface class for classes which interact with Postprocessors.
NodalKernel(const InputParameters &parameters)
Class constructor.
Definition: NodalKernel.C:63
unsigned int THREAD_ID
Definition: MooseTypes.h:79