www.mooseframework.org
NeighborMooseVariableInterface.C
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 
16 
17 // MOOSE includes
18 #include "Assembly.h"
19 #include "MooseVariable.h"
20 #include "MooseTypes.h"
21 #include "Problem.h"
22 #include "SubProblem.h"
23 
25  bool nodal)
26  : MooseVariableInterface(moose_object, nodal)
27 {
28 }
29 
31 
32 const VariableValue &
34 {
35  if (_nodal)
36  return _variable->nodalSlnNeighbor();
37  else
38  return _variable->slnNeighbor();
39 }
40 
41 const VariableValue &
43 {
44  if (_nodal)
46  else
47  return _variable->slnOldNeighbor();
48 }
49 
50 const VariableValue &
52 {
53  if (_nodal)
55  else
56  return _variable->slnOlderNeighbor();
57 }
58 
59 const VariableGradient &
61 {
62  if (_nodal)
63  mooseError("Nodal variables do not have gradients");
64 
65  return _variable->gradSlnNeighbor();
66 }
67 
68 const VariableGradient &
70 {
71  if (_nodal)
72  mooseError("Nodal variables do not have gradients");
73 
74  return _variable->gradSlnOldNeighbor();
75 }
76 
77 const VariableGradient &
79 {
80  if (_nodal)
81  mooseError("Nodal variables do not have gradients");
82 
84 }
85 
86 const VariableSecond &
88 {
89  if (_nodal)
90  mooseError("Nodal variables do not have second derivatives");
91 
92  return _variable->secondSlnNeighbor();
93 }
94 
95 const VariableSecond &
97 {
98  if (_nodal)
99  mooseError("Nodal variables do not have second derivatives");
100 
102 }
103 
104 const VariableSecond &
106 {
107  if (_nodal)
108  mooseError("Nodal variables do not have second derivatives");
109 
111 }
112 
113 const VariableTestSecond &
115 {
116  if (_nodal)
117  mooseError("Nodal variables do not have second derivatives");
118 
120 }
121 
122 const VariablePhiSecond &
124 {
125  if (_nodal)
126  mooseError("Nodal variables do not have second derivatives");
127 
129 }
const VariableGradient & gradSlnNeighbor()
virtual const VariableGradient & neighborGradientOlder()
The older gradient of the variable this object is operating on evaluated on the "neighbor" element...
const VariableSecond & secondSlnOldNeighbor()
virtual const VariableGradient & neighborGradient()
The gradient of the variable this object is operating on evaluated on the "neighbor" element...
virtual const VariableValue & neighborValueOlder()
The older value of the variable this object is operating on evaluated on the "neighbor" element...
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
const VariableGradient & gradSlnOldNeighbor()
const VariableValue & nodalSlnNeighbor()
bool _nodal
Whether or not this object is acting only at nodes.
virtual const VariablePhiSecond & neighborSecondPhi()
The second derivative of the neighbor's shape function.
const VariablePhiSecond & secondPhiFaceNeighbor()
const VariableValue & nodalSlnOldNeighbor()
virtual const VariableGradient & neighborGradientOld()
The old gradient of the variable this object is operating on evaluated on the "neighbor" element...
virtual const VariableSecond & neighborSecondOld()
The old second derivative of the variable this object is operating on evaluated on the "neighbor" ele...
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:36
virtual const VariableSecond & neighborSecond()
The second derivative of the variable this object is operating on evaluated on the "neighbor" element...
const VariableValue & nodalSlnOlderNeighbor()
virtual const VariableSecond & neighborSecondOlder()
The older second derivative of the variable this object is operating on evaluated on the "neighbor" e...
const VariableValue & slnOlderNeighbor()
const VariableSecond & secondSlnOlderNeighbor()
NeighborMooseVariableInterface(const MooseObject *moose_object, bool nodal)
Constructing the object.
virtual const VariableValue & neighborValue()
The value of the variable this object is operating on evaluated on the "neighbor" element...
const VariableGradient & gradSlnOlderNeighbor()
const VariableValue & slnOldNeighbor()
virtual const VariableValue & neighborValueOld()
The old value of the variable this object is operating on evaluated on the "neighbor" element...
virtual const VariableTestSecond & neighborSecondTest()
The second derivative of the neighbor's test function.
Interface for objects that need to get values of MooseVariables.
const VariableValue & slnNeighbor()
MooseVariable * _variable
The variable this object is acting on.
const VariableSecond & secondSlnNeighbor()
const VariablePhiSecond & secondPhiFaceNeighbor()
Definition: Assembly.h:548