www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SwitchingFunctionConstraintEta Class Reference

SwitchingFunctionConstraintEta is a constraint kernel that acts on the lambda lagrange multiplier non-linear variables to enforce \( \sum_n h_i(\eta_i) \equiv 1 \). More...

#include <SwitchingFunctionConstraintEta.h>

Inheritance diagram for SwitchingFunctionConstraintEta:
[legend]

Public Member Functions

 SwitchingFunctionConstraintEta (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpResidual ()
 
virtual Real computeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned int)
 

Protected Attributes

VariableName _eta_name
 Switching function name. More...
 
const MaterialProperty< Real > & _dh
 Switching function drivatives. More...
 
const MaterialProperty< Real > & _d2h
 
const VariableValue & _lambda
 Lagrange multiplier. More...
 
unsigned int _lambda_var
 

Detailed Description

SwitchingFunctionConstraintEta is a constraint kernel that acts on the lambda lagrange multiplier non-linear variables to enforce \( \sum_n h_i(\eta_i) \equiv 1 \).

Definition at line 27 of file SwitchingFunctionConstraintEta.h.

Constructor & Destructor Documentation

◆ SwitchingFunctionConstraintEta()

SwitchingFunctionConstraintEta::SwitchingFunctionConstraintEta ( const InputParameters &  parameters)

Definition at line 28 of file SwitchingFunctionConstraintEta.C.

29  : DerivativeMaterialInterface<Kernel>(parameters),
30  _eta_name(_var.name()),
31  _dh(getMaterialPropertyDerivative<Real>("h_name", _eta_name)),
32  _d2h(getMaterialPropertyDerivative<Real>("h_name", _eta_name, _eta_name)),
33  _lambda(coupledValue("lambda")),
34  _lambda_var(coupled("lambda"))
35 {
36 }
const MaterialProperty< Real > & _dh
Switching function drivatives.
const MaterialProperty< Real > & _d2h
VariableName _eta_name
Switching function name.
const VariableValue & _lambda
Lagrange multiplier.

Member Function Documentation

◆ computeQpJacobian()

Real SwitchingFunctionConstraintEta::computeQpJacobian ( )
protectedvirtual

Definition at line 45 of file SwitchingFunctionConstraintEta.C.

46 {
47  return _lambda[_qp] * _d2h[_qp] * _phi[_j][_qp] * _test[_i][_qp];
48 }
const MaterialProperty< Real > & _d2h
const VariableValue & _lambda
Lagrange multiplier.

◆ computeQpOffDiagJacobian()

Real SwitchingFunctionConstraintEta::computeQpOffDiagJacobian ( unsigned int  j_var)
protectedvirtual

Definition at line 51 of file SwitchingFunctionConstraintEta.C.

52 {
53  if (j_var == _lambda_var)
54  return _phi[_j][_qp] * _dh[_qp] * _test[_i][_qp];
55  else
56  return 0.0;
57 }
const MaterialProperty< Real > & _dh
Switching function drivatives.

◆ computeQpResidual()

Real SwitchingFunctionConstraintEta::computeQpResidual ( )
protectedvirtual

Definition at line 39 of file SwitchingFunctionConstraintEta.C.

40 {
41  return _lambda[_qp] * _dh[_qp] * _test[_i][_qp];
42 }
const MaterialProperty< Real > & _dh
Switching function drivatives.
const VariableValue & _lambda
Lagrange multiplier.

Member Data Documentation

◆ _d2h

const MaterialProperty<Real>& SwitchingFunctionConstraintEta::_d2h
protected

Definition at line 42 of file SwitchingFunctionConstraintEta.h.

Referenced by computeQpJacobian().

◆ _dh

const MaterialProperty<Real>& SwitchingFunctionConstraintEta::_dh
protected

Switching function drivatives.

Definition at line 41 of file SwitchingFunctionConstraintEta.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

◆ _eta_name

VariableName SwitchingFunctionConstraintEta::_eta_name
protected

Switching function name.

Definition at line 38 of file SwitchingFunctionConstraintEta.h.

◆ _lambda

const VariableValue& SwitchingFunctionConstraintEta::_lambda
protected

Lagrange multiplier.

Definition at line 45 of file SwitchingFunctionConstraintEta.h.

Referenced by computeQpJacobian(), and computeQpResidual().

◆ _lambda_var

unsigned int SwitchingFunctionConstraintEta::_lambda_var
protected

Definition at line 46 of file SwitchingFunctionConstraintEta.h.

Referenced by computeQpOffDiagJacobian().


The documentation for this class was generated from the following files: