https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MortarNodalFrames.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#include "MooseTypes.h"
13#include "ADReal.h"
14
15#include "libmesh/vector_value.h"
16#include "libmesh/point.h"
17
18#include <array>
19#include <string>
20#include <unordered_map>
21#include <vector>
22
24class MooseBase;
25class SystemBase;
26template <typename>
27class MooseVariableFE;
29namespace libMesh
30{
31class Elem;
32class Node;
33}
34
35namespace Moose
36{
37namespace Mortar
38{
45ADPoint nodalCoordinate(const Node & node, const std::array<const MooseVariable *, 3> & disp_vars);
46
53bool supportsNodalNormalDerivatives(const std::array<const MooseVariable *, 3> & disp_vars,
54 const SystemBase & sys);
55
64 const std::array<const MooseVariable *, 3> & disp_vars,
65 const std::array<std::string, 3> & param_names,
66 const SystemBase & sys);
67
74{
75public:
79 explicit ADNodalFrames(const std::array<const MooseVariable *, 3> & disp_vars)
80 : _disp_vars(disp_vars)
81 {
82 }
83
92 const Node & node,
93 const Point & stored_normal,
94 bool do_derivatives);
95
100 const std::array<ADRealVectorValue, 2> & tangents(const AutomaticMortarGeneration & amg,
101 const Node & node,
102 const Point & stored_normal,
103 bool do_derivatives);
104
116 std::vector<ADRealVectorValue> interpolatedNormals(const AutomaticMortarGeneration & amg,
117 const Elem & secondary_elem,
118 const std::vector<Point> & xi_pts,
119 const std::vector<Point> & stored_normals,
120 bool do_derivatives);
121
122 void clear();
123
124private:
125 const std::array<const MooseVariable *, 3> _disp_vars;
126 std::unordered_map<const Node *, ADRealVectorValue> _normals;
127 std::unordered_map<const Node *, std::array<ADRealVectorValue, 2>> _tangents;
128};
129}
130}
MooseVariableFE< Real > MooseVariable
This class is a container/interface for the objects involved in automatic generation of mortar spaces...
Base class for everything in MOOSE with a name and a type.
Definition MooseBase.h:50
Class for stuff related to variables.
Cache of the secondary nodal normals and tangents of one mortar interface, carrying their displacemen...
std::vector< ADRealVectorValue > interpolatedNormals(const AutomaticMortarGeneration &amg, const Elem &secondary_elem, const std::vector< Point > &xi_pts, const std::vector< Point > &stored_normals, bool do_derivatives)
Interpolate the nodal normals of secondary_elem to reference points in the same way as AutomaticMorta...
std::unordered_map< const Node *, ADRealVectorValue > _normals
const std::array< const MooseVariable *, 3 > _disp_vars
const std::array< ADRealVectorValue, 2 > & tangents(const AutomaticMortarGeneration &amg, const Node &node, const Point &stored_normal, bool do_derivatives)
ADNodalFrames(const std::array< const MooseVariable *, 3 > &disp_vars)
std::unordered_map< const Node *, std::array< ADRealVectorValue, 2 > > _tangents
const ADRealVectorValue & normal(const AutomaticMortarGeneration &amg, const Node &node, const Point &stored_normal, bool do_derivatives)
Base class for a system (of equations)
Definition SystemBase.h:87
ADPoint nodalCoordinate(const Node &node, const std::array< const MooseVariable *, 3 > &disp_vars)
void checkNodalNormalDisplacements(const MooseBase &object, const std::array< const MooseVariable *, 3 > &disp_vars, const std::array< std::string, 3 > &param_names, const SystemBase &sys)
Error unless supportsNodalNormalDerivatives() holds.
bool supportsNodalNormalDerivatives(const std::array< const MooseVariable *, 3 > &disp_vars, const SystemBase &sys)
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...