www.mooseframework.org
NodalBC.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 NODALBC_H
16 #define NODALBC_H
17 
18 #include "BoundaryCondition.h"
19 #include "RandomInterface.h"
21 
22 // Forward declarations
23 class NodalBC;
24 
25 // libMesh forward declarations
26 namespace libMesh
27 {
28 template <typename T>
29 class NumericVector;
30 }
31 
32 template <>
34 
38 class NodalBC : public BoundaryCondition,
39  public RandomInterface,
41 {
42 public:
43  NodalBC(const InputParameters & parameters);
44 
45  virtual void computeResidual(NumericVector<Number> & residual);
46  virtual void computeJacobian();
47  virtual void computeOffDiagJacobian(unsigned int jvar);
48 
49  void setBCOnEigen(bool iseigen) { _is_eigen = iseigen; }
50 
51 protected:
53  const Node *& _current_node;
54 
56  unsigned int _qp;
58  const VariableValue & _u;
59 
62  std::vector<MooseVariable *> _save_in;
63  std::vector<AuxVariableName> _save_in_strings;
64 
67  std::vector<MooseVariable *> _diag_save_in;
68  std::vector<AuxVariableName> _diag_save_in_strings;
69 
72  bool _is_eigen;
73 
74  virtual Real computeQpResidual() = 0;
75 
81  virtual Real computeQpJacobian();
82 
87  virtual Real computeQpOffDiagJacobian(unsigned int jvar);
88 };
89 
90 #endif /* NODALBC_H */
Interface for objects that need parallel consistent random numbers without patterns over the course o...
void setBCOnEigen(bool iseigen)
Definition: NodalBC.h:49
std::vector< AuxVariableName > _save_in_strings
Definition: NodalBC.h:63
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
Base class for deriving any boundary condition that works at nodes.
Definition: NodalBC.h:38
InputParameters validParams< NodalBC >()
Definition: NodalBC.C:23
bool _has_diag_save_in
The aux variables to save the diagonal Jacobian contributions to.
Definition: NodalBC.h:66
std::vector< AuxVariableName > _diag_save_in_strings
Definition: NodalBC.h:68
bool _is_eigen
Indicate whether or not the boundary condition is applied to the right hand side of eigenvalue proble...
Definition: NodalBC.h:72
Base class for creating new types of boundary conditions.
std::vector< MooseVariable * > _save_in
Definition: NodalBC.h:62
bool _has_save_in
The aux variables to save the residual contributions to.
Definition: NodalBC.h:61
Intermediate base class that ties together all the interfaces for getting MooseVariables with the Moo...
const Node *& _current_node
current node being processed
Definition: NodalBC.h:53
std::vector< MooseVariable * > _diag_save_in
Definition: NodalBC.h:67
const VariableValue & _u
Value of the unknown variable this BC is acting on.
Definition: NodalBC.h:58
unsigned int _qp
Quadrature point index.
Definition: NodalBC.h:56