www.mooseframework.org
IntegratedBC.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 INTEGRATEDBC_H
16 #define INTEGRATEDBC_H
17 
18 #include "BoundaryCondition.h"
19 #include "RandomInterface.h"
22 
23 // Forward declarations
24 class IntegratedBC;
25 class MooseVariable;
26 
27 template <>
29 
34  public RandomInterface,
37 {
38 public:
40 
41  virtual ~IntegratedBC();
42 
43  virtual void computeResidual();
44  virtual void computeJacobian();
48  virtual void computeJacobianBlock(unsigned int jvar);
53  void computeJacobianBlockScalar(unsigned int jvar);
54 
59  virtual void computeNonlocalJacobian() {}
60 
65  virtual void computeNonlocalOffDiagJacobian(unsigned int /* jvar */) {}
66 
67 protected:
69  const Elem *& _current_elem;
71  const Real & _current_elem_volume;
73  unsigned int & _current_side;
75  const Elem *& _current_side_elem;
77  const Real & _current_side_volume;
78 
81 
83  unsigned int _qp;
85  QBase *& _qrule;
93  unsigned int _i, _j;
94 
95  // shape functions
96 
101 
102  // test functions
103 
108 
109  // unknown
110 
112  const VariableValue & _u;
115 
117  DenseVector<Number> _local_re;
118 
120  DenseMatrix<Number> _local_ke;
121 
124  std::vector<MooseVariable *> _save_in;
125  std::vector<AuxVariableName> _save_in_strings;
126 
129  std::vector<MooseVariable *> _diag_save_in;
130  std::vector<AuxVariableName> _diag_save_in_strings;
131 
132  virtual Real computeQpResidual() = 0;
133  virtual Real computeQpJacobian();
138  virtual Real computeQpOffDiagJacobian(unsigned int jvar);
139 };
140 
141 #endif /* INTEGRATEDBC_H */
const VariableTestValue & _test
test function values (in QPs)
Definition: IntegratedBC.h:105
Interface for objects that need parallel consistent random numbers without patterns over the course o...
std::vector< MooseVariable * > _save_in
Definition: IntegratedBC.h:124
InputParameters validParams< IntegratedBC >()
Definition: IntegratedBC.C:28
const MooseArray< Point > & _normals
normals at quadrature points
Definition: IntegratedBC.h:80
const Elem *& _current_side_elem
current side element
Definition: IntegratedBC.h:75
Class for stuff related to variables.
Definition: MooseVariable.h:43
const MooseArray< Real > & _coord
coordinate transformation
Definition: IntegratedBC.h:91
IntegratedBC(const InputParameters &parameters)
Definition: IntegratedBC.C:53
const VariableGradient & _grad_u
the gradient of the unknown variable this BC is acting on
Definition: IntegratedBC.h:114
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
DenseVector< Number > _local_re
Holds residual entries as their accumulated by this Kernel.
Definition: IntegratedBC.h:117
const MooseArray< Real > & _JxW
transformed Jacobian weights
Definition: IntegratedBC.h:89
virtual Real computeQpJacobian()
Definition: IntegratedBC.C:198
const VariablePhiValue & _phi
shape function values (in QPs)
Definition: IntegratedBC.h:98
const Real & _current_elem_volume
Volume of the current element.
Definition: IntegratedBC.h:71
const VariablePhiGradient & _grad_phi
gradients of shape functions (in QPs)
Definition: IntegratedBC.h:100
virtual void computeNonlocalOffDiagJacobian(unsigned int)
Computes d-residual / d-jvar...
Definition: IntegratedBC.h:65
virtual Real computeQpResidual()=0
virtual void computeJacobianBlock(unsigned int jvar)
Computes d-ivar-residual / d-jvar...
Definition: IntegratedBC.C:170
bool _has_diag_save_in
The aux variables to save the diagonal Jacobian contributions to.
Definition: IntegratedBC.h:128
const Real & _current_side_volume
Volume of the current side.
Definition: IntegratedBC.h:77
std::vector< AuxVariableName > _diag_save_in_strings
Definition: IntegratedBC.h:130
bool _has_save_in
The aux variables to save the residual contributions to.
Definition: IntegratedBC.h:123
std::vector< AuxVariableName > _save_in_strings
Definition: IntegratedBC.h:125
virtual void computeJacobian()
Definition: IntegratedBC.C:143
virtual void computeNonlocalJacobian()
Compute this IntegratedBC&#39;s contribution to the diagonal Jacobian entries corresponding to nonlocal d...
Definition: IntegratedBC.h:59
Base class for deriving any boundary condition of a integrated type.
Definition: IntegratedBC.h:33
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
This is the virtual that derived classes should override for computing an off-diagonal jacobian compo...
Definition: IntegratedBC.C:204
virtual ~IntegratedBC()
Definition: IntegratedBC.C:119
Base class for creating new types of boundary conditions.
virtual void computeResidual()
Definition: IntegratedBC.C:122
An interface for accessing Materials.
DenseMatrix< Number > _local_ke
Holds residual entries as they are accumulated by this Kernel.
Definition: IntegratedBC.h:120
unsigned int _qp
quadrature point index
Definition: IntegratedBC.h:83
unsigned int _j
Definition: IntegratedBC.h:93
const MooseArray< Point > & _q_point
active quadrature points
Definition: IntegratedBC.h:87
Intermediate base class that ties together all the interfaces for getting MooseVariables with the Moo...
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
std::vector< MooseVariable * > _diag_save_in
Definition: IntegratedBC.h:129
void computeJacobianBlockScalar(unsigned int jvar)
Computes jacobian block with respect to a scalar variable.
Definition: IntegratedBC.C:186
const VariableTestGradient & _grad_test
gradients of test functions (in QPs)
Definition: IntegratedBC.h:107
const Elem *& _current_elem
current element
Definition: IntegratedBC.h:69
unsigned int _i
i-th, j-th index for enumerating test and shape functions
Definition: IntegratedBC.h:93
const VariableValue & _u
the values of the unknown variable this BC is acting on
Definition: IntegratedBC.h:112
QBase *& _qrule
active quadrature rule
Definition: IntegratedBC.h:85
unsigned int & _current_side
current side of the current element
Definition: IntegratedBC.h:73