KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
mortar_explicit_contribution_utilities.h
Go to the documentation of this file.
1 // KRATOS ______ __ __ _____ __ __ __
2 // / ____/___ ____ / /_____ ______/ /_/ ___// /________ _______/ /___ ___________ _/ /
3 // / / / __ \/ __ \/ __/ __ `/ ___/ __/\__ \/ __/ ___/ / / / ___/ __/ / / / ___/ __ `/ /
4 // / /___/ /_/ / / / / /_/ /_/ / /__/ /_ ___/ / /_/ / / /_/ / /__/ /_/ /_/ / / / /_/ / /
5 // \____/\____/_/ /_/\__/\__,_/\___/\__//____/\__/_/ \__,_/\___/\__/\__,_/_/ \__,_/_/ MECHANICS
6 //
7 // License: BSD License
8 // license: ContactStructuralMechanicsApplication/license.txt
9 //
10 // Main authors: Vicente Mataix Ferrandiz
11 //
12 
13 #pragma once
14 
15 // System includes
16 
17 // External includes
18 
19 // Project includes
20 #include "utilities/math_utils.h"
23 
24 /* Utilities */
27 
28 /* Geometries */
29 #include "geometries/line_2d_2.h"
31 
32 namespace Kratos
33 {
36 
40 
44 
48 
52 
63 template< const SizeType TDim, const SizeType TNumNodes, const FrictionalCase TFrictional, const bool TNormalVariation, const SizeType TNumNodesMaster = TNumNodes>
64 class KRATOS_API(CONTACT_STRUCTURAL_MECHANICS_APPLICATION) MortarExplicitContributionUtilities
65 {
66 public:
69 
71  using SizeType = std::size_t;
72 
74  using IndexType = std::size_t;
75 
77  using PointType = Point;
78 
81 
82  // Type definition for integration methods
84 
87 
90 
93 
96 
98  using ConditionArrayListType = typename std::vector<ConditionArrayType>;
99 
102 
105 
108 
110  using DerivativeDataType = typename std::conditional<TFrictional == FrictionalCase::FRICTIONAL || TFrictional == FrictionalCase::FRICTIONAL_PENALTY, DerivativeDataFrictional<TDim, TNumNodes, TNumNodesMaster>, DerivativeData<TDim, TNumNodes, TNumNodesMaster>>::type;
111 
113  static constexpr IndexType MatrixSize = (TFrictional == FrictionalCase::FRICTIONLESS) ? TDim * (TNumNodesMaster + TNumNodes) + TNumNodes : (TFrictional == FrictionalCase::FRICTIONLESS_COMPONENTS || TFrictional == FrictionalCase::FRICTIONAL) ? TDim * (TNumNodesMaster + TNumNodes + TNumNodes) : TDim * (TNumNodesMaster + TNumNodes);
114 
116  static constexpr bool IsFrictional = (TFrictional == FrictionalCase::FRICTIONAL || TFrictional == FrictionalCase::FRICTIONAL_PENALTY) ? true : false;
117 
120 
123 
126 
129 
132 
133  // The threshold coefficient considered for checking
134  static constexpr double CheckThresholdCoefficient = 1.0e-12;
135 
139 
140 
144 
157  static MortarConditionMatrices AddExplicitContributionOfMortarCondition(
158  PairedCondition* pCondition,
159  const ProcessInfo& rCurrentProcessInfo,
160  const IndexType IntegrationOrder = 2,
161  const bool AxisymmetricCase = false,
162  const bool ComputeNodalArea = false,
163  const bool ComputeDualLM = true,
164  const Variable<double>& rAreaVariable = NODAL_AREA
165  );
180  static MortarConditionMatrices AddExplicitContributionOfMortarFrictionalCondition(
181  PairedCondition* pCondition,
182  const ProcessInfo& rCurrentProcessInfo,
183  const MortarOperator<TNumNodes, TNumNodesMaster>& rPreviousMortarOperators,
184  const IndexType IntegrationOrder = 2,
185  const bool AxisymmetricCase = false,
186  const bool ComputeNodalArea = false,
187  const bool ComputeDualLM = true,
188  const Variable<double>& rAreaVariable = NODAL_AREA,
189  const bool ConsiderObjetiveFormulation = false
190  );
191 
202  static bool ExplicitCalculateAe(
203  const GeometryType& rSlaveGeometry,
204  GeneralVariables& rVariables,
205  const ConditionArrayListType& rConditionsPointsSlave,
207  const IntegrationMethod& rIntegrationMethod,
208  const double AxiSymCoeff = 1.0
209  );
210 
223  static void ExplicitCalculateKinematics(
224  const PairedCondition* pCondition,
225  GeneralVariables& rVariables,
227  const array_1d<double, 3>& rNormalMaster,
228  const PointType& rLocalPointDecomp,
229  const PointType& rLocalPointParent,
230  const GeometryPointType& rGeometryDecomp,
231  const bool DualLM = true
232  );
233 
244  static void ComputeNodalArea(
245  PairedCondition* pCondition,
246  const ProcessInfo& rCurrentProcessInfo,
247  const Variable<double>& rAreaVariable = NODAL_AREA,
248  const IndexType IntegrationOrder = 2,
249  const bool AxisymmetricCase = false
250  );
251 
265  static bool ComputePreviousMortarOperators(
266  PairedCondition* pCondition,
267  const ProcessInfo& rCurrentProcessInfo,
268  MortarOperator<TNumNodes, TNumNodesMaster>& rPreviousMortarOperators,
269  const IndexType IntegrationOrder = 2,
270  const bool AxisymmetricCase = false,
271  const bool ComputeNodalArea = false,
272  const bool ComputeDualLM = true,
273  const Variable<double>& rAreaVariable = NODAL_AREA
274  );
275 
288  static void CalculateKinematics(
289  const PairedCondition* pCondition,
290  GeneralVariables& rVariables,
291  const DerivativeDataType& rDerivativeData,
292  const array_1d<double, 3>& rNormalMaster,
293  const PointType& rLocalPointDecomp,
294  const PointType& rLocalPointParent,
295  const GeometryPointType& rGeometryDecomp,
296  const bool DualLM = true
297  );
298 
306  static void MasterShapeFunctionValue(
307  const PairedCondition* pCondition,
308  GeneralVariables& rVariables,
309  const array_1d<double, 3>& rNormalMaster,
310  const PointType& rLocalPoint
311  );
312 
313 }; // class MortarExplicitContributionUtilities
314 
315 namespace AuxiliaryOperationsUtilities
316 {
322  double KRATOS_API(CONTACT_STRUCTURAL_MECHANICS_APPLICATION) GetAxisymmetricCoefficient(
323  const PairedCondition* pCondition,
324  const Vector& rNSlave
325  );
326 
333  double KRATOS_API(CONTACT_STRUCTURAL_MECHANICS_APPLICATION) CalculateRadius(
334  const PairedCondition* pCondition,
335  const Vector& rNSlave
336  );
337 }
338 
339 } // namespace Kratos
This data will be used to compute the derivatives.
Definition: mortar_classes.h:638
This utilities are used in order to compute the directional derivatives during mortar contact.
Definition: derivatives_utilities.h:63
This is the definition dual lagrange multiplier operators including the derivatives.
Definition: mortar_classes.h:1718
This utility calculates the exact integration necessary for the Mortar Conditions.
Definition: exact_mortar_segmentation_utility.h:89
IntegrationMethod
Definition: geometry_data.h:76
Geometry base class.
Definition: geometry.h:71
std::vector< IntegrationPointType > IntegrationPointsArrayType
Definition: geometry.h:161
Definition: amatrix_interface.h:41
An two node 2D line geometry with linear shape functions.
Definition: line_2d_2.h:65
This namespace includes several utilities necessaries for the computation of the explicit contributio...
Definition: mortar_explicit_contribution_utilities.h:65
typename std::conditional< TDim==2, LineType, TriangleType >::type DecompositionType
Type definition for the decomposition based on dimension.
Definition: mortar_explicit_contribution_utilities.h:107
typename std::conditional< TNumNodes==2, PointBelongsLine2D2N, typename std::conditional< TNumNodes==3, typename std::conditional< TNumNodesMaster==3, PointBelongsTriangle3D3N, PointBelongsTriangle3D3NQuadrilateral3D4N >::type, typename std::conditional< TNumNodesMaster==3, PointBelongsQuadrilateral3D4NTriangle3D3N, PointBelongsQuadrilateral3D4N >::type >::type >::type BelongType
The type of points belongs to be considered.
Definition: mortar_explicit_contribution_utilities.h:86
std::size_t IndexType
The index type definition.
Definition: mortar_explicit_contribution_utilities.h:74
std::size_t SizeType
The size type definition.
Definition: mortar_explicit_contribution_utilities.h:71
GeometryType::IntegrationPointsArrayType IntegrationPointsType
Definition: mortar_explicit_contribution_utilities.h:83
typename std::conditional< TFrictional==FrictionalCase::FRICTIONAL||TFrictional==FrictionalCase::FRICTIONAL_PENALTY, DerivativeDataFrictional< TDim, TNumNodes, TNumNodesMaster >, DerivativeData< TDim, TNumNodes, TNumNodesMaster > >::type DerivativeDataType
Type definition for the derivative data based on frictional case.
Definition: mortar_explicit_contribution_utilities.h:110
typename std::vector< ConditionArrayType > ConditionArrayListType
Type definition for the array list of conditions.
Definition: mortar_explicit_contribution_utilities.h:98
MortarKinematicVariablesWithDerivatives.
Definition: mortar_classes.h:490
This class derives from the MortarOperator class and it includes the derived operators.
Definition: mortar_classes.h:1273
This is a base class for the conditions paired.
Definition: paired_condition.h:53
Custom Point container to be used by the mapper.
Definition: mortar_classes.h:1952
Point class.
Definition: point.h:59
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
A three node 3D triangle geometry with linear shape functions.
Definition: triangle_3d_3.h:77
Short class definition.
Definition: array_1d.h:61
#define KRATOS_API(...)
Definition: kratos_export_api.h:40
double CalculateRadius(const PairedCondition *pCondition, const Vector &rNSlave)
Calculates the radius of axisymmetry.
Definition: mortar_explicit_contribution_utilities.cpp:675
double GetAxisymmetricCoefficient(const PairedCondition *pCondition, const Vector &rNSlave)
This functions computes the integration weight to consider.
Definition: mortar_explicit_contribution_utilities.cpp:662
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
@ FRICTIONLESS_COMPONENTS
Frictionless contact with components.
@ FRICTIONLESS
Frictionless contact.
@ FRICTIONAL_PENALTY
Frictional contact with penalty method.
@ FRICTIONAL
Frictional contact.
type
Definition: generate_gid_list_file.py:35