www.mooseframework.org
EqualGradientConstraint.C
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 
11 #include "SubProblem.h"
12 #include "FEProblem.h"
13 
15 
18 {
20  params.addClassDescription(
21  "EqualGradientConstraint enforces continuity of a gradient component between secondary and "
22  "primary sides of a mortar interface using lagrange multipliers");
23  params.addRequiredParam<unsigned int>("component", "Gradient component to constrain");
24  return params;
25 }
26 
28  : ADMortarConstraint(parameters), _component(getParam<unsigned int>("component"))
29 {
30 }
31 
32 ADReal
34 {
35  switch (mortar_type)
36  {
43  _test[_i][_qp];
44  default:
45  return 0;
46  }
47 }
EqualGradientConstraint(const InputParameters &parameters)
const VariableTestGradient & _grad_test_primary
The shape function gradients corresponding to the primary interior primal variable.
MortarType
Definition: MooseTypes.h:683
const ADVariableGradient & _grad_u_secondary
The primal solution gradient on the secondary side.
Constrain a specified component of the gradient of a variable to be the same on both sides of an inte...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
unsigned int _i
Definition: Constraint.h:35
const ADVariableGradient & _grad_u_primary
The primal solution gradient on the primary side.
const ADVariableValue & _lambda
The LM solution.
ADReal computeQpResidual(Moose::MortarType mortar_type) final
compute the residual at the quadrature points
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
const VariableTestValue & _test
The shape functions corresponding to the lagrange multiplier variable.
DualReal ADReal
Definition: ADRealForward.h:14
static InputParameters validParams()
registerMooseObject("MooseApp", EqualGradientConstraint)
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
const VariableTestGradient & _grad_test_secondary
The shape function gradients corresponding to the secondary interior primal variable.
static InputParameters validParams()
unsigned int _qp
Definition: Constraint.h:36
void ErrorVector unsigned int