https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MortarConstraintBase.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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// MOOSE includes
13#include "Constraint.h"
15#include "MooseMesh.h"
19
20// Forward Declarations
21class FEProblemBase;
22namespace libMesh
23{
24class QBase;
25}
26
46 public MooseVariableInterface<Real>
47{
48public:
50
52
56 virtual void computeResidual() override;
57
61 virtual void computeJacobian() override;
62
66 virtual void computeResidual(Moose::MortarType mortar_type) = 0;
67
71 virtual void computeJacobian(Moose::MortarType mortar_type) = 0;
72
76 const MooseVariable & variable() const override { return *_var; }
77
81 const MooseVariable * variablePtr() const { return _var; }
82
86 bool useDual() const { return _use_dual; }
87
91 virtual void post() {}
92
96 virtual void incorrectEdgeDroppingPost(const std::unordered_set<const Node *> &) {}
97
101 void zeroInactiveLMDofs(const std::unordered_set<const Node *> & inactive_lm_nodes,
102 const std::unordered_set<const Elem *> & inactive_lm_elems);
103
104protected:
105 const FEProblemBase & feProblem() const { return _fe_problem; }
106
109
112
115
118
121
124
127
129 const bool _use_dual;
130
133
136
138 const std::vector<Point> & _q_point;
139
142
145
148
151
154
157
160
162 const Elem * const & _interior_secondary_elem;
163
165 const Elem * const & _interior_primary_elem;
166
168 const bool _displaced;
169};
OutputTools< Real >::VariableTestValue VariableTestValue
Definition MooseTypes.h:358
OutputTools< Real >::VariableTestGradient VariableTestGradient
Definition MooseTypes.h:359
Base class for all Constraint types.
Definition Constraint.h:20
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
forward declarations
Definition MooseArray.h:18
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Class for stuff related to variables.
Interface for objects that need to get values of MooseVariables.
User for mortar methods.
const MooseVariable * variablePtr() const
The variable number that this object operates on (pointer).
const bool _use_dual
Whether to use the dual motar approach.
void zeroInactiveLMDofs(const std::unordered_set< const Node * > &inactive_lm_nodes, const std::unordered_set< const Elem * > &inactive_lm_elems)
A post routine for zeroing all inactive LM DoFs.
MooseVariableField< Real > & _primary_var
Reference to the primary variable.
MooseVariable *const _var
Pointer to the lagrange multipler variable. nullptr if none.
const VariableTestGradient & _grad_test_primary
The shape function gradients corresponding to the primary interior primal variable.
const MooseVariable & variable() const override
The variable number that this object operates on.
const Elem *const & _interior_secondary_elem
the higher-dimensional secondary face element
bool useDual() const
Whether to use dual mortar.
const VariableTestValue & _test_secondary
The shape functions corresponding to the secondary interior primal variable.
FEProblemBase & _fe_problem
Reference to the finite element problem.
const MooseArray< Real > & _coord
Member for handling change of coordinate systems (xyz, rz, spherical)
const bool _compute_primal_residuals
Whether to compute primal residuals.
static InputParameters validParams()
MooseVariableField< Real > & _secondary_var
Reference to the secondary variable.
virtual void post()
This method will be called after the loop over the mortar segment mesh.
const FEProblemBase & feProblem() const
const VariableTestValue & _test
The shape functions corresponding to the lagrange multiplier variable.
const VariableTestGradient & _grad_test_secondary
The shape function gradients corresponding to the secondary interior primal variable.
const bool _compute_lm_residuals
Whether to compute lagrange multiplier residuals.
const VariableTestValue _test_dummy
A dummy object useful for constructing _test when not using Lagrange multipliers.
const MooseArray< std::vector< Point > > & _tangents
Tangent vectors on the secondary faces (libmesh)
const bool _use_petrov_galerkin
Whether to use Petrov-Galerkin approach.
virtual void computeResidual(Moose::MortarType mortar_type)=0
compute the residual for the specified element type
virtual void computeJacobian() override
Method for computing the Jacobian.
virtual void computeResidual() override
Method for computing the residual.
virtual void computeJacobian(Moose::MortarType mortar_type)=0
compute the residual for the specified element type
virtual void incorrectEdgeDroppingPost(const std::unordered_set< const Node * > &)
This method will be called after the loop over the mortar segment mesh.
const std::vector< Point > & _q_point
The quadrature points in physical space.
const VariableTestValue & _test_primary
The shape functions corresponding to the primary interior primal variable.
const bool _displaced
Whether this object operates on the displaced mesh.
const MooseVariable *const _aux_lm_var
The auxiliary Lagrange multiplier variable (used together whith the Petrov-Galerkin approach)
const Elem *const & _interior_primary_elem
the higher-dimensional primary face element
An interface for accessing mortar mesh data.
Intermediate base class that ties together all the interfaces for getting MooseVariables with the Moo...
This interface is designed for DGKernel, InternalSideUserObject, InterfaceUserObject,...
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...