www.mooseframework.org
SwitchingFunctionPenalty.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 #ifndef SWITCHINGFUNCTIONPENALTY_H
8 #define SWITCHINGFUNCTIONPENALTY_H
9 
10 #include "Kernel.h"
11 #include "DerivativeMaterialInterface.h"
12 
13 // Forward Declarations
15 
16 template <>
18 
24 class SwitchingFunctionPenalty : public DerivativeMaterialInterface<Kernel>
25 {
26 public:
27  SwitchingFunctionPenalty(const InputParameters & parameters);
28 
29 protected:
30  virtual Real computeQpResidual();
31  virtual Real computeQpJacobian();
32  virtual Real computeQpOffDiagJacobian(unsigned int);
33 
35  std::vector<MaterialPropertyName> _h_names;
36  unsigned int _num_h;
37 
39  std::vector<const MaterialProperty<Real> *> _h, _dh;
40  const MaterialProperty<Real> * _d2h;
41 
43  const Real _penalty;
44 
46  const unsigned int _number_of_nl_variables;
47 
49  std::vector<int> _j_eta;
50 
52  int _a;
53 };
54 
55 #endif // SWITCHINGFUNCTIONPENALTY_H
virtual Real computeQpOffDiagJacobian(unsigned int)
const unsigned int _number_of_nl_variables
number of non-linear variables in the problem
std::vector< const MaterialProperty< Real > * > _h
Switching functions and their drivatives.
InputParameters validParams< SwitchingFunctionPenalty >()
SwitchingFunctionPenalty(const InputParameters &parameters)
SwitchingFunctionPenalty is a constraint kernel adds a penalty to each order parameter to enforce ...
std::vector< int > _j_eta
eta index for the j_vars in the jacobian computation
std::vector< MaterialPropertyName > _h_names
Switching function names.
const Real _penalty
Penalty pre-factor.
std::vector< const MaterialProperty< Real > * > _dh
int _a
Index of the eta this kernel is operating on.
const MaterialProperty< Real > * _d2h