www.mooseframework.org
SwitchingFunctionPenalty.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "Kernel.h"
13 #include "DerivativeMaterialInterface.h"
14 
15 // Forward Declarations
17 
18 template <>
20 
26 class SwitchingFunctionPenalty : public DerivativeMaterialInterface<Kernel>
27 {
28 public:
29  SwitchingFunctionPenalty(const InputParameters & parameters);
30 
31 protected:
32  virtual Real computeQpResidual();
33  virtual Real computeQpJacobian();
34  virtual Real computeQpOffDiagJacobian(unsigned int);
35 
37  std::vector<MaterialPropertyName> _h_names;
38  unsigned int _num_h;
39 
41  std::vector<const MaterialProperty<Real> *> _h, _dh;
42  const MaterialProperty<Real> * _d2h;
43 
45  const Real _penalty;
46 
48  const unsigned int _number_of_nl_variables;
49 
51  std::vector<int> _j_eta;
52 
54  int _a;
55 };
56 
SwitchingFunctionPenalty::_a
int _a
Index of the eta this kernel is operating on.
Definition: SwitchingFunctionPenalty.h:54
SwitchingFunctionPenalty::_num_h
unsigned int _num_h
Definition: SwitchingFunctionPenalty.h:38
SwitchingFunctionPenalty::_dh
std::vector< const MaterialProperty< Real > * > _dh
Definition: SwitchingFunctionPenalty.h:41
SwitchingFunctionPenalty::computeQpOffDiagJacobian
virtual Real computeQpOffDiagJacobian(unsigned int)
Definition: SwitchingFunctionPenalty.C:87
SwitchingFunctionPenalty::_number_of_nl_variables
const unsigned int _number_of_nl_variables
number of non-linear variables in the problem
Definition: SwitchingFunctionPenalty.h:48
SwitchingFunctionPenalty::_h
std::vector< const MaterialProperty< Real > * > _h
Switching functions and their drivatives.
Definition: SwitchingFunctionPenalty.h:41
SwitchingFunctionPenalty
SwitchingFunctionPenalty is a constraint kernel adds a penalty to each order parameter to enforce .
Definition: SwitchingFunctionPenalty.h:26
SwitchingFunctionPenalty::_d2h
const MaterialProperty< Real > * _d2h
Definition: SwitchingFunctionPenalty.h:42
SwitchingFunctionPenalty::_h_names
std::vector< MaterialPropertyName > _h_names
Switching function names.
Definition: SwitchingFunctionPenalty.h:37
SwitchingFunctionPenalty::computeQpJacobian
virtual Real computeQpJacobian()
Definition: SwitchingFunctionPenalty.C:76
SwitchingFunctionPenalty::SwitchingFunctionPenalty
SwitchingFunctionPenalty(const InputParameters &parameters)
Definition: SwitchingFunctionPenalty.C:28
SwitchingFunctionPenalty::_penalty
const Real _penalty
Penalty pre-factor.
Definition: SwitchingFunctionPenalty.h:45
validParams< SwitchingFunctionPenalty >
InputParameters validParams< SwitchingFunctionPenalty >()
Definition: SwitchingFunctionPenalty.C:16
SwitchingFunctionPenalty::computeQpResidual
virtual Real computeQpResidual()
Definition: SwitchingFunctionPenalty.C:66
SwitchingFunctionPenalty::_j_eta
std::vector< int > _j_eta
eta index for the j_vars in the jacobian computation
Definition: SwitchingFunctionPenalty.h:51