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_classes.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/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
21 #include "includes/variables.h"
23 #include "includes/serializer.h"
24 
25 namespace Kratos
26 {
27 
30 
34 
35  // Point and nodes defines
36  using PointType = Point;
38 
39  // Type definition for integration methods
41 
43  using SizeType = std::size_t;
44 
46  using IndexType = std::size_t;
47 
48 
52 
55  enum class PointBelongs
56  {
57  Master = 0,
58  Slave = 1,
59  Intersection = 2
60  };
61 
66  {
67  SlaveLine2D2N0 = 0,
68  SlaveLine2D2N1 = 1,
69  MasterLine2D2N0 = 2,
70  MasterLine2D2N1 = 3,
72  };
73 
78  {
122  };
123 
128  {
202  };
203 
208  {
265  };
266 
271  {
272  SlaveTriangle3D3N0 = 0,
273  SlaveTriangle3D3N1 = 1,
274  SlaveTriangle3D3N2 = 2,
328  };
329 
333 
337 
347 template< const SizeType TNumNodes, const SizeType TNumNodesMaster = TNumNodes>
349 {
350 public:
353 
356 
360 
362 
364 
365  // Shape functions for contact pair
366  Vector NMaster = Vector(TNumNodesMaster, 0.0);
367  Vector NSlave = Vector(TNumNodes, 0.0);
369 
370  // Determinant of slave cell's jacobian
371  double DetjSlave = 0.0;
372 
376 
380 
384  void Initialize()
385  {
386  // Shape functions
387  noalias(NMaster) = ZeroVector(TNumNodesMaster);
388  noalias(NSlave) = ZeroVector(TNumNodes);
390 
391  // Jacobian of slave
392  DetjSlave = 0.0;
393  }
394 
398  void PrintInfo(std::ostream& rOStream) const
399  {
400  rOStream << "NSlave:" << NSlave << std::endl;
401  rOStream << "NMaster: " <<NMaster << std::endl;
402  rOStream << "PhiLagrangeMultipliers: "<< PhiLagrangeMultipliers << std::endl;
403  rOStream << "DetjSlave: " << DetjSlave << std::endl;
404  }
405 
409 
413 
417 
421 
423 private:
426 
430 
434 
438 
442 
443  friend class Serializer;
444 
445  virtual void save(Serializer& rSerializer) const
446  {
447  rSerializer.save("NMaster", NMaster);
448  rSerializer.save("NSlave", NSlave);
449  rSerializer.save("PhiLagrangeMultipliers", PhiLagrangeMultipliers);
450  rSerializer.save("DetjSlave", DetjSlave);
451  }
452 
453  virtual void load(Serializer& rSerializer)
454  {
455  rSerializer.load("NMaster", NMaster);
456  rSerializer.load("NSlave", NSlave);
457  rSerializer.load("PhiLagrangeMultipliers", PhiLagrangeMultipliers);
458  rSerializer.load("DetjSlave", DetjSlave);
459  }
460 
464 
468 
472 
474 
475 }; // Class MortarKinematicVariables
476 
487 template< const SizeType TDim, const SizeType TNumNodes, const SizeType TNumNodesMaster = TNumNodes>
489  : public MortarKinematicVariables<TNumNodes, TNumNodesMaster>
490 {
491 public:
494 
497 
500 
504 
506 
508 
509  // Shape functions local derivatives for contact pair
510  Matrix DNDeMaster = ScalarMatrix(TNumNodesMaster, TDim - 1, 0.0);
511  Matrix DNDeSlave = ScalarMatrix(TNumNodes, TDim - 1, 0.0);
512 
513  /*
514  * Jacobians in current configuration on all integration points of slave segment
515  * Only those two variables contain info on all GP
516  * other variables contain info only on the currently-calculated GP
517  */
518  Matrix jSlave = ScalarMatrix(TDim, TDim - 1, 0.0);
519  Matrix jMaster = ScalarMatrix(TDim, TDim - 1, 0.0);
520 
524 
528 
532  void Initialize()
533  {
535 
536  // Shape functions local derivatives
537  noalias(DNDeMaster) = ZeroMatrix(TNumNodesMaster, TDim - 1);
538  noalias(DNDeSlave) = ZeroMatrix(TNumNodes, TDim - 1);
539 
540  // Jacobians on all integration points
541  noalias(jSlave) = ZeroMatrix(TDim, TDim - 1);
542  noalias(jMaster) = ZeroMatrix(TDim, TDim - 1);
543  }
544 
548  void PrintInfo(std::ostream& rOStream) const
549  {
550  BaseClassType::PrintInfo(rOStream);
551  }
552 
556 
560 
564 
568 
570 private:
573 
577 
581 
585 
589 
590  friend class Serializer;
591 
592  void save(Serializer& rSerializer) const override
593  {
595  rSerializer.save("DNDeMaster", DNDeMaster);
596  rSerializer.save("DNDeSlave", DNDeSlave);
597  rSerializer.save("jSlave", jSlave);
598  rSerializer.save("jMaster", jMaster);
599  }
600 
601  void load(Serializer& rSerializer) override
602  {
604  rSerializer.load("DNDeMaster", DNDeMaster);
605  rSerializer.load("DNDeSlave", DNDeSlave);
606  rSerializer.load("jSlave", jSlave);
607  rSerializer.load("jMaster", jMaster);
608  }
609 
613 
617 
621 
623 
624 }; // Class MortarKinematicVariablesWithDerivatives
625 
636 template< const SizeType TDim, const SizeType TNumNodes, const SizeType TNumNodesMaster = TNumNodes>
638 {
639 public:
642 
643  // Auxiliary types
645 
647 
649 
651 
653 
655 
656  using VertexDerivativesMatrixType = typename std::conditional<TNumNodes == 2, DummyBoundedMatrixType, BoundedMatrix<double, 3, 3>>::type;
657 
658  // Auxiliary sizes
659  static const SizeType DummySize = 1;
660 
661  static const SizeType DoFSizeSlaveGeometry = (TNumNodes * TDim);
662 
663  static const SizeType DoFSizeMasterGeometry = (TNumNodesMaster * TDim);
664 
666 
668 
670 
674 
675  DerivativeData()= default;
676 
677  virtual ~DerivativeData()= default;
678 
682  double ScaleFactor;
683 
687 
691 
704 
712 
715 
719 
723 
729  virtual void Initialize(
730  const GeometryType& SlaveGeometry,
731  const ProcessInfo& rCurrentProcessInfo
732  )
733  {
734  // The normals of the nodes
735  noalias(NormalSlave) = MortarUtilities::GetVariableMatrix<TDim,TNumNodes>(SlaveGeometry, NORMAL, 0);
736 
737  // Displacements and velocities of the slave
738  const IndexType step = (rCurrentProcessInfo[STEP] == 1) ? 0 : 1;
739  noalias(u1) = step == 0 ?
740  MortarUtilities::GetVariableMatrix<TDim,TNumNodes>(SlaveGeometry, DISPLACEMENT, 0) :
741  MortarUtilities::GetVariableMatrix<TDim,TNumNodes>(SlaveGeometry, DISPLACEMENT, 0)
742  - MortarUtilities::GetVariableMatrix<TDim,TNumNodes>(SlaveGeometry, DISPLACEMENT, 1);
743  noalias(X1) = MortarUtilities::GetCoordinates<TDim,TNumNodes>(SlaveGeometry, false, step);
744 
745  // We get the ALM variables
746  for (IndexType i = 0; i < TNumNodes; ++i)
747  PenaltyParameter[i] = SlaveGeometry[i].GetValue(INITIAL_PENALTY);
748  ScaleFactor = rCurrentProcessInfo[SCALE_FACTOR];
749 
750  // We initialize the derivatives
751  const array_1d<double, TNumNodes> zero_vector_slave(TNumNodes, 0.0);
752  const array_1d<double, TNumNodesMaster> zero_vector_master(TNumNodesMaster, 0.0);
753  for (IndexType i = 0; i < DoFSizeSlaveGeometry; ++i) {
754  DeltaDetjSlave[i] = 0.0;
755  noalias(DeltaPhi[i]) = zero_vector_slave;
756  noalias(DeltaN1[i]) = zero_vector_slave;
757  noalias(DeltaN2[i]) = zero_vector_master;
758  }
759  if constexpr (TDim == 3) {
760  for (IndexType i = 0; i < DoFSizeMasterGeometry; ++i) {
762  noalias(DeltaPhi[i + DoFSizeSlaveGeometry]) = zero_vector_slave;
763  noalias(DeltaN1[i + DoFSizeSlaveGeometry]) = zero_vector_slave;
764  noalias(DeltaN2[i + DoFSizeSlaveGeometry]) = zero_vector_master;
765  }
766  }
767  }
768 
772  virtual void ResetDerivatives()
773  {
774  // Derivatives
775  if constexpr (TDim == 3) { // Derivative of the cell vertex
776  // Auxiliary zero matrix
777  const BoundedMatrix<double, 3, 3> aux_zero = ZeroMatrix(3, 3);
778  for (IndexType i = 0; i < TNumNodes * TDim; ++i) {
779  noalias(DeltaCellVertex[i]) = aux_zero;
780  }
781  for (IndexType i = 0; i < TNumNodesMaster * TDim; ++i) {
782  noalias(DeltaCellVertex[i + TNumNodes * TDim]) = aux_zero;
783  }
784  }
785  }
786 
791  {
792  // Auxiliary zero matrix
793  const GeometryMatrixType aux_zero = ZeroMatrix(TNumNodes, TNumNodes);
794 
795  // Ae
796  noalias(Ae) = aux_zero;
797 
798  // Derivatives Ae
799  for (IndexType i = 0; i < DoFSizeDerivativesDependence; ++i)
800  noalias(DeltaAe[i]) = aux_zero;
801  }
802 
808  virtual void UpdateMasterPair(
809  const GeometryType& MasterGeometry,
810  const ProcessInfo& rCurrentProcessInfo
811  )
812  {
813  NormalMaster = MortarUtilities::GetVariableMatrix<TDim,TNumNodesMaster>(MasterGeometry, NORMAL, 0);
814 
815  // Displacements, coordinates and normals of the master
816  const IndexType step = (rCurrentProcessInfo[STEP] == 1) ? 0 : 1;
817  noalias(u2) = step == 0 ?
818  MortarUtilities::GetVariableMatrix<TDim,TNumNodesMaster>(MasterGeometry, DISPLACEMENT, 0) :
819  MortarUtilities::GetVariableMatrix<TDim,TNumNodesMaster>(MasterGeometry, DISPLACEMENT, 0)
820  - MortarUtilities::GetVariableMatrix<TDim,TNumNodesMaster>(MasterGeometry, DISPLACEMENT, 1);
821  noalias(X2) = MortarUtilities::GetCoordinates<TDim,TNumNodesMaster>(MasterGeometry, false, step);
822  }
823 
827 
831 
835 
839 
841 private:
844 
848 
852 
856 
860 
861  friend class Serializer;
862 
863  virtual void save(Serializer& rSerializer) const
864  {
865  rSerializer.save("PenaltyParameter", PenaltyParameter);
866  rSerializer.save("ScaleFactor", ScaleFactor);
867  rSerializer.save("NormalSlave", NormalSlave);
868  rSerializer.save("NormalMaster", NormalMaster);
869  rSerializer.save("X1", X1);
870  rSerializer.save("u1", u1);
871  rSerializer.save("X2", X2);
872  rSerializer.save("u2", u2);
873  rSerializer.save("DeltaDetjSlave", DeltaDetjSlave);
874  rSerializer.save("DeltaPhi", DeltaPhi);
875  rSerializer.save("DeltaN1", DeltaN1);
876  rSerializer.save("DeltaN2", DeltaN2);
877  rSerializer.save("DeltaNormalSlave", DeltaNormalSlave);
878  rSerializer.save("DeltaNormalMaster", DeltaNormalMaster);
879  rSerializer.save("DeltaCellVertex", DeltaCellVertex);
880  rSerializer.save("Ae", Ae);
881  rSerializer.save("DeltaAe", DeltaAe);
882  }
883 
884  virtual void load(Serializer& rSerializer)
885  {
886  rSerializer.load("PenaltyParameter", PenaltyParameter);
887  rSerializer.load("ScaleFactor", ScaleFactor);
888  rSerializer.load("NormalSlave", NormalSlave);
889  rSerializer.load("NormalMaster", NormalMaster);
890  rSerializer.load("X1", X1);
891  rSerializer.load("u1", u1);
892  rSerializer.load("X2", X2);
893  rSerializer.load("u2", u2);
894  rSerializer.load("DeltaDetjSlave", DeltaDetjSlave);
895  rSerializer.load("DeltaPhi", DeltaPhi);
896  rSerializer.load("DeltaN1", DeltaN1);
897  rSerializer.load("DeltaN2", DeltaN2);
898  rSerializer.load("DeltaNormalSlave", DeltaNormalSlave);
899  rSerializer.load("DeltaNormalMaster", DeltaNormalMaster);
900  rSerializer.load("DeltaCellVertex", DeltaCellVertex);
901  rSerializer.load("Ae", Ae);
902  rSerializer.load("DeltaAe", DeltaAe);
903  }
904 
908 
912 
916 
918 
919 }; // Class DerivativeData
920 
931 template< const SizeType TDim, const SizeType TNumNodes, const SizeType TNumNodesMaster = TNumNodes>
933  : public DerivativeData<TDim, TNumNodes, TNumNodesMaster>
934 {
935 public:
938 
941 
945 
946  // Size of DoFs of a not paired dependency
947  static const SizeType DoFSizeSlaveGeometry = (TNumNodes * TDim);
948  static const SizeType DoFSizeMasterGeometry = (TNumNodes * TDim);
949 
952 
956 
958 
959  virtual ~DerivativeDataFrictional()= default;
960 
962  double TangentFactor = 0.0;
963 
967 
971 
975 
982  const GeometryType& SlaveGeometry,
983  const ProcessInfo& rCurrentProcessInfo
984  ) override
985  {
986  BaseClassType::Initialize(SlaveGeometry, rCurrentProcessInfo);
987 
988  TangentFactor = rCurrentProcessInfo[TANGENT_FACTOR];
989 
990  noalias(u1old) = MortarUtilities::GetVariableMatrix<TDim,TNumNodes>(SlaveGeometry, DISPLACEMENT, 1) - MortarUtilities::GetVariableMatrix<TDim,TNumNodes>(SlaveGeometry, DISPLACEMENT, 2);
991  }
992 
999  const GeometryType& MasterGeometry,
1000  const ProcessInfo& rCurrentProcessInfo
1001  ) override
1002  {
1003  BaseClassType::UpdateMasterPair(MasterGeometry, rCurrentProcessInfo);
1004 
1005  noalias(u2old) = MortarUtilities::GetVariableMatrix<TDim,TNumNodesMaster>(MasterGeometry, DISPLACEMENT, 1) - MortarUtilities::GetVariableMatrix<TDim,TNumNodesMaster>(MasterGeometry, DISPLACEMENT, 2);
1006  }
1007 
1011 
1015 
1019 
1023 
1025 private:
1028 
1032 
1036 
1040 
1044 
1045  friend class Serializer;
1046 
1047  void save(Serializer& rSerializer) const override
1048  {
1050  rSerializer.save("TangentFactor", TangentFactor);
1051  rSerializer.save("u1old", u1old);
1052  rSerializer.save("u2old", u2old);
1053  }
1054 
1055  void load(Serializer& rSerializer) override
1056  {
1058  rSerializer.load("TangentFactor", TangentFactor);
1059  rSerializer.load("u1old", u1old);
1060  rSerializer.load("u2old", u2old);
1061  }
1062 
1066 
1070 
1074 
1076 
1077 }; // Class DerivativeDataFrictional
1078 
1092 template< const SizeType TNumNodes, const SizeType TNumNodesMaster = TNumNodes>
1094 {
1095 public:
1098 
1101 
1105 
1108 
1112 
1114 
1115  virtual ~MortarOperator(){}
1116 
1120 
1124 
1128 
1132  void Initialize()
1133  {
1134  // We initialize the D and M operators
1135  noalias(DOperator) = ZeroMatrix(TNumNodes, TNumNodes);
1136  noalias(MOperator) = ZeroMatrix(TNumNodes, TNumNodesMaster);
1137  }
1138 
1145  KinematicVariables& rKinematicVariables,
1146  const double rIntegrationWeight
1147  )
1148  {
1149  /* DEFINITIONS */
1150  const double det_j_slave = rKinematicVariables.DetjSlave;
1151  const Vector& phi_vector = rKinematicVariables.PhiLagrangeMultipliers;
1152  const Vector& n1_vector = rKinematicVariables.NSlave;
1153  const Vector& n2_vector = rKinematicVariables.NMaster;
1154 
1155  for (IndexType i_slave = 0; i_slave < TNumNodes; ++i_slave) {
1156  const double phi = phi_vector[i_slave];
1157  for (IndexType j_slave = 0; j_slave < TNumNodes; ++j_slave) {
1158  DOperator(i_slave, j_slave) += det_j_slave * rIntegrationWeight * phi * n1_vector[j_slave];
1159  }
1160  for (IndexType j_slave = 0; j_slave < TNumNodesMaster; ++j_slave) {
1161  MOperator(i_slave, j_slave) += det_j_slave * rIntegrationWeight * phi * n2_vector[j_slave];
1162  }
1163  }
1164  }
1165 
1171  {
1172  // We calculate the inverse of D operator
1173  double auxdet;
1174  GeometryMatrixSlaveType inv_D_operator;
1175  MathUtils<double>::InvertMatrix(DOperator, inv_D_operator, auxdet);
1176 
1177  // We calculate the P operator
1178  const GeometryMatrixMasterType POperator = prod(inv_D_operator, MOperator);
1179 
1180  return POperator;
1181  }
1182 
1186  void PrintInfo(std::ostream& rOStream) const
1187  {
1188  rOStream << "DOperator: " << DOperator << std::endl;
1189  rOStream << "MOperator: " << MOperator << std::endl;
1190  }
1191 
1195 
1199 
1203 
1207 
1209 private:
1212 
1216 
1220 
1224 
1228 
1229  friend class Serializer;
1230 
1231  virtual void save(Serializer& rSerializer) const
1232  {
1233  rSerializer.save("DOperator", DOperator);
1234  rSerializer.save("MOperator", MOperator);
1235  }
1236 
1237  virtual void load(Serializer& rSerializer)
1238  {
1239  rSerializer.load("DOperator", DOperator);
1240  rSerializer.load("MOperator", MOperator);
1241  }
1242 
1246 
1250 
1254 
1256 
1257 }; // Class MortarOperator
1258 
1270 template< const SizeType TDim, const SizeType TNumNodes, bool TFrictional, const SizeType TNumNodesMaster = TNumNodes>
1272  : public MortarOperator<TNumNodes, TNumNodesMaster>
1273 {
1274 public:
1277 
1280 
1283 
1286 
1289 
1292 
1295 
1298 
1299  // Auxiliary sizes
1300  static const SizeType DoFSizeSlaveGeometry = (TNumNodes * TDim);
1301  static const SizeType DoFSizeMasterGeometry = (TNumNodesMaster * TDim);
1302 
1304 
1306 
1309 
1313 
1315 
1317 
1318  // D and M directional derivatives
1321 
1325 
1329 
1333  void Initialize()
1334  {
1336 
1337  // Auxiliary zero matrix
1338  const GeometryMatrixSlaveType aux_zero_slave = ZeroMatrix(TNumNodes, TNumNodes);
1339  const GeometryMatrixMasterType aux_zero_master = ZeroMatrix(TNumNodes, TNumNodesMaster);
1340 
1341  // We initialize the D and M derivatives operators
1342  for (IndexType i = 0; i < DoFSizeSlaveGeometry; ++i) {
1343  noalias(DeltaDOperator[i]) = aux_zero_slave;
1344  noalias(DeltaMOperator[i]) = aux_zero_master;
1345  }
1346  for (IndexType i = 0; i < DoFSizeMasterGeometry; ++i) {
1347  noalias(DeltaDOperator[i + DoFSizeSlaveGeometry]) = aux_zero_slave;
1348  noalias(DeltaMOperator[i + DoFSizeSlaveGeometry]) = aux_zero_master;
1349  }
1350  }
1351 
1359  KinematicVariables& rKinematicVariables,
1360  DerivativeDataType& rDerivativeData,
1361  const double rIntegrationWeight
1362  )
1363  {
1364  /* DEFINITIONS */
1365  const double det_j_slave = rKinematicVariables.DetjSlave;
1366  const Vector& vector_phi = rKinematicVariables.PhiLagrangeMultipliers;
1367  const Vector& vector_n1 = rKinematicVariables.NSlave;
1368  const Vector& vector_n2 = rKinematicVariables.NMaster;
1369 
1370  // Derivatives
1371  const array_1d<double, DoFSizeDerivativesDependence>& delta_det_j_slave = rDerivativeData.DeltaDetjSlave;
1372  const array_1d<array_1d<double, TNumNodes >, DoFSizeDerivativesDependence>& delta_phi = rDerivativeData.DeltaPhi;
1373  const array_1d<array_1d<double, TNumNodes >, DoFSizeDerivativesDependence>& delta_n1 = rDerivativeData.DeltaN1;
1374  const array_1d<array_1d<double, TNumNodesMaster >, DoFSizeDerivativesDependence>& delta_n2 = rDerivativeData.DeltaN2;
1375 
1376  for (IndexType i_node = 0; i_node < TNumNodes; ++i_node) {
1377  const double phi = vector_phi[i_node];
1378 
1379  for (IndexType j_node = 0; j_node < TNumNodes; ++j_node) {
1380  const double n1 = vector_n1[j_node];
1381 
1382  BaseClassType::DOperator(i_node, j_node) += det_j_slave * rIntegrationWeight * phi * n1;
1383 
1384  for (IndexType i = 0; i < DoFSizeSlaveGeometry; ++i) {
1385  DeltaDOperator[i](i_node, j_node) += delta_det_j_slave[i] * rIntegrationWeight * phi* n1
1386  + det_j_slave * rIntegrationWeight * delta_phi[i][i_node] * n1
1387  + det_j_slave * rIntegrationWeight * phi* delta_n1[i][j_node];
1388  }
1389  if constexpr (TDim == 3) {
1391  DeltaDOperator[i](i_node, j_node) += det_j_slave * rIntegrationWeight * phi * delta_n1[i][j_node];
1392  DeltaDOperator[i](i_node, j_node) += delta_det_j_slave[i] * rIntegrationWeight * phi * n1;
1393  DeltaDOperator[i](i_node, j_node) += det_j_slave * rIntegrationWeight * delta_phi[i][i_node] * n1;
1394  }
1395  }
1396  }
1397  for (IndexType j_node = 0; j_node < TNumNodesMaster; ++j_node) {
1398  const double n2 = vector_n2[j_node];
1399 
1400  BaseClassType::MOperator(i_node, j_node) += det_j_slave * rIntegrationWeight * phi * n2;
1401 
1402  for (IndexType i = 0; i < DoFSizeSlaveGeometry; ++i) {
1403  DeltaMOperator[i](i_node, j_node) += delta_det_j_slave[i] * rIntegrationWeight * phi* n2
1404  + det_j_slave * rIntegrationWeight * delta_phi[i][i_node] * n2
1405  + det_j_slave * rIntegrationWeight * phi* delta_n2[i][j_node];
1406  }
1407  if constexpr (TDim == 3) {
1409  DeltaMOperator[i](i_node, j_node) += det_j_slave * rIntegrationWeight * phi * delta_n2[i][j_node];
1410  DeltaMOperator[i](i_node, j_node) += delta_det_j_slave[i] * rIntegrationWeight * phi * n2;
1411  DeltaMOperator[i](i_node, j_node) += det_j_slave * rIntegrationWeight * delta_phi[i][i_node] * n2;
1412  }
1413  }
1414  }
1415  }
1416  }
1417 
1421  void PrintInfo(std::ostream& rOStream) const
1422  {
1423  BaseClassType::PrintInfo(rOStream);
1424 
1425  for (IndexType i = 0; i < TNumNodes * TDim; ++i) {
1426  rOStream << "DeltaDOperator_" << i << ": " << DeltaDOperator[i] << std::endl;
1427  rOStream << "DeltaMOperator_" << i << ": " << DeltaMOperator[i] << std::endl;
1428  }
1429  }
1430 
1434 
1438 
1442 
1446 
1448 private:
1451 
1455 
1459 
1463 
1467 
1468  friend class Serializer;
1469 
1470  void save(Serializer& rSerializer) const override
1471  {
1473  rSerializer.save("DeltaDOperator", DeltaDOperator);
1474  rSerializer.save("DeltaMOperator", DeltaMOperator);
1475  }
1476 
1477  void load(Serializer& rSerializer) override
1478  {
1480  rSerializer.load("DeltaDOperator", DeltaDOperator);
1481  rSerializer.load("DeltaMOperator", DeltaMOperator);
1482  }
1483 
1487 
1491 
1495 
1497 
1498 }; // Class MortarOperatorWithDerivatives
1499 
1511 template< const SizeType TNumNodes, const SizeType TNumNodesMaster = TNumNodes>
1513 {
1514 public:
1517 
1520 
1523 
1526 
1530 
1532 
1534 
1537 
1541 
1545 
1549  void Initialize()
1550  {
1551  // We initialize the De and Me operators
1552  noalias(Me) = ZeroMatrix(TNumNodes, TNumNodes);
1553  noalias(De) = ZeroMatrix(TNumNodes, TNumNodes);
1554  }
1555 
1563  KinematicVariables& rKinematicVariables,
1564  const double rIntegrationWeight
1565  )
1566  {
1567  /* DEFINITIONS */
1568  const Vector& n1 = rKinematicVariables.NSlave;
1569  const double det_j = rKinematicVariables.DetjSlave;
1570 
1571  noalias(De) += rIntegrationWeight * (ComputeDe(n1, det_j));
1572  noalias(Me) += rIntegrationWeight * det_j * outer_prod(n1, n1);
1573  }
1574 
1581  {
1582  const double tolerance = std::numeric_limits<double>::epsilon();
1583 
1584  // We compute the norm
1585  const double norm_me = norm_frobenius(Me);
1586 
1587  // Now we normalize the matrix
1588  if (norm_me >= tolerance) {
1589  const GeometryMatrixType normalized_Me = Me/norm_me;
1590 
1591  // We compute the normalized inverse
1592  double aux_det;
1593  GeometryMatrixType normalized_inv_Me;
1594  MathUtils<double>::InvertMatrix(normalized_Me, normalized_inv_Me, aux_det, -1.0);
1595  const bool good_condition_number = MathUtils<double>::CheckConditionNumber(normalized_Me, normalized_inv_Me, tolerance, false);
1596  if (good_condition_number) {
1597  noalias(Ae) = (1.0/norm_me) * prod(De, normalized_inv_Me);
1598  return true;
1599  }
1600  }
1601 
1602  noalias(Ae) = IdentityMatrix(TNumNodes);
1603  return false;
1604  }
1605 
1611  template<class TArray>
1613  const TArray& N1,
1614  const double detJ
1615  ) const
1616  {
1618 
1619  for (IndexType i = 0; i < TNumNodes; ++i) {
1620  for (IndexType j = 0; j < TNumNodes; ++j) {
1621  if (i == j) De(i,i) = detJ * N1[i];
1622  else De(i,j) = 0.0;
1623  }
1624  }
1625 
1626  return De;
1627  }
1628 
1632  void PrintInfo(std::ostream& rOStream) const {
1633  rOStream << "Me: " << Me << std::endl;
1634  rOStream << "De: " << De << std::endl;
1635  }
1636 
1640 
1644 
1648 
1652 
1654 private:
1657 
1661 
1665 
1669 
1673 
1674  friend class Serializer;
1675 
1676  virtual void save(Serializer& rSerializer) const
1677  {
1678  rSerializer.save("Me", Me);
1679  rSerializer.save("De", De);
1680  }
1681 
1682  virtual void load(Serializer& rSerializer)
1683  {
1684  rSerializer.load("Me", Me);
1685  rSerializer.load("De", De);
1686  }
1687 
1691 
1695 
1699 
1701 
1702 }; // Class DualLagrangeMultiplierOperators
1703 
1715 template< const SizeType TDim, const SizeType TNumNodes, bool TFrictional, const SizeType TNumNodesMaster = TNumNodes>
1717  : public DualLagrangeMultiplierOperators<TNumNodes, TNumNodesMaster>
1718 {
1719 public:
1722 
1725 
1728 
1731 
1734 
1737 
1740 
1741  // Auxiliary sizes
1742  static const SizeType DoFSizeSlaveGeometry = (TNumNodes * TDim);
1743 
1744  static const SizeType DoFSizeMasterGeometry = (TNumNodesMaster * TDim);
1745 
1747 
1749 
1752 
1756 
1758 
1760 
1761  // Derivatives matrices
1763 
1767 
1771 
1775  void Initialize()
1776  {
1778 
1779  // Derivatives matrices
1780  const BoundedMatrix<double, TNumNodes, TNumNodes> zeromatrix = ZeroMatrix(TNumNodes, TNumNodes);
1781  for (IndexType i = 0; i < DoFSizeDerivativesDependence; ++i) {
1782  noalias(DeltaMe[i]) = zeromatrix;
1783  noalias(DeltaDe[i]) = zeromatrix;
1784  }
1785  }
1786 
1795  KinematicVariablesType& rKinematicVariables,
1796  DerivativeDataType& rDerivativeData,
1797  const double rIntegrationWeight
1798  )
1799  {
1800  /* DEFINITIONS */
1801  const double det_j_slave = rKinematicVariables.DetjSlave;
1802  const Vector& n1 = rKinematicVariables.NSlave;
1803 
1804  BaseClassType::CalculateAeComponents(rKinematicVariables, rIntegrationWeight);
1805 
1806  for (IndexType i = 0; i < DoFSizeDerivativesDependence; ++i) {
1807  const double delta_det_j = rDerivativeData.DeltaDetjSlave[i];
1808  const array_1d<double, TNumNodes>& delta_n1 = rDerivativeData.DeltaN1[i];
1809 
1810  noalias(DeltaDe[i]) += rIntegrationWeight * this->ComputeDe( n1, delta_det_j )
1811  + rIntegrationWeight * this->ComputeDe( delta_n1, det_j_slave );
1812 
1813  noalias(DeltaMe[i]) += rIntegrationWeight * delta_det_j * outer_prod(n1, n1)
1814  + rIntegrationWeight * det_j_slave * (outer_prod(delta_n1, n1) + outer_prod(n1, delta_n1));
1815  }
1816  }
1817 
1823  bool CalculateDeltaAe(DerivativeDataType& rDerivativeData)
1824  {
1825  const double tolerance = std::numeric_limits<double>::epsilon();
1826 
1827  // We compute the norm
1828  const double norm_Me = norm_frobenius(BaseClassType::Me);
1829 
1830  // Now we normalize the matrix
1831  const GeometryMatrixType normalized_Me = BaseClassType::Me/norm_Me;
1832 
1833  // We compute the normalized inverse
1834  double aux_det;
1835  GeometryMatrixType normalized_inv_Me;
1836  MathUtils<double>::InvertMatrix(normalized_Me, normalized_inv_Me, aux_det, -1.0);
1837  const bool good_condition_number = MathUtils<double>::CheckConditionNumber(normalized_Me, normalized_inv_Me, tolerance, false);
1838  if (!good_condition_number) {
1839  return false;
1840  }
1841 
1842  // Now we compute the inverse
1843  const GeometryMatrixType inv_Me = normalized_inv_Me/norm_Me;
1844 
1845  noalias(rDerivativeData.Ae) = prod(BaseClassType::De, inv_Me);
1846 
1847  array_1d<GeometryMatrixType , DoFSizeDerivativesDependence>& delta_Ae = rDerivativeData.DeltaAe;
1848 
1849  for (IndexType i = 0; i < DoFSizeDerivativesDependence; ++i) {
1850  const GeometryMatrixType aux_matrix = DeltaDe[i] - prod(rDerivativeData.Ae, DeltaMe[i]);
1851  noalias(delta_Ae[i]) = prod(aux_matrix, inv_Me);
1852  }
1853 
1854  return true;
1855  }
1856 
1860  void PrintInfo(std::ostream& rOStream) const
1861  {
1862  BaseClassType::PrintInfo(rOStream);
1863 
1864  // Derivatives matrices
1865  for (IndexType i = 0; i < DoFSizeDerivativesDependence; ++i) {
1866  rOStream << "DeltaMe_" << i << ": " << DeltaMe[i] << std::endl;
1867  rOStream << "DeltaDe_" << i << ": " << DeltaDe[i] << std::endl;
1868  }
1869  }
1870 
1874 
1878 
1882 
1886 
1888 private:
1891 
1895 
1899 
1903 
1907 
1908  friend class Serializer;
1909 
1910  void save(Serializer& rSerializer) const override
1911  {
1913  rSerializer.save("DeltaMe", DeltaMe);
1914  rSerializer.save("DeltaDe", DeltaDe);
1915  }
1916 
1917  void load(Serializer& rSerializer) override
1918  {
1920  rSerializer.load("DeltaMe", DeltaMe);
1921  rSerializer.load("DeltaDe", DeltaDe);
1922  }
1923 
1927 
1931 
1935 
1937 
1938 }; // Class DualLagrangeMultiplierOperatorsWithDerivatives
1939 
1949 template<const SizeType TNumNodes, const SizeType TNumNodesMaster = TNumNodes>
1951  : public Point
1952 {
1953 public:
1956 
1959 
1962 
1966 
1969  Point()
1970  {}
1971 
1973  Point(Coords)
1974  {}
1975 
1976  PointBelong(const array_1d<double, 3> Coords, const BelongType& ThisBelongs):
1977  Point(Coords),
1978  mBelongs(ThisBelongs)
1979  {}
1980 
1982  ~PointBelong() override= default;
1983 
1987 
1991 
1995  void SetBelong(BelongType ThisBelongs)
1996  {
1997  mBelongs = ThisBelongs;
1998  }
1999 
2004  {
2005  return mBelongs;
2006  }
2007 private:
2013 
2014  BelongType mBelongs;
2015 
2019 
2023 
2028 
2032 
2036 
2040 }; // Class PointBelong
2041 
2043 
2046 
2050 
2052 
2053 }// namespace Kratos.
This class is a derived class of DerivativeData.
Definition: mortar_classes.h:934
static const SizeType DoFSizeMasterGeometry
Definition: mortar_classes.h:948
double TangentFactor
The ALM parameters.
Definition: mortar_classes.h:962
static const SizeType DoFSizeSlaveGeometry
Definition: mortar_classes.h:947
GeometryDoFMatrixSlaveType u1old
Displacements and velocities.
Definition: mortar_classes.h:965
void UpdateMasterPair(const GeometryType &MasterGeometry, const ProcessInfo &rCurrentProcessInfo) override
Updating the Master pair.
Definition: mortar_classes.h:998
void Initialize(const GeometryType &SlaveGeometry, const ProcessInfo &rCurrentProcessInfo) override
Initializer method.
Definition: mortar_classes.h:981
DerivativeData< TDim, TNumNodes, TNumNodesMaster > BaseClassType
The base class type.
Definition: mortar_classes.h:940
GeometryDoFMatrixMasterType u2old
Definition: mortar_classes.h:966
static const SizeType DoFSizePairedGeometry
Size of DoFs of a paired dependency.
Definition: mortar_classes.h:951
virtual ~DerivativeDataFrictional()=default
This data will be used to compute the derivatives.
Definition: mortar_classes.h:638
GeometryDoFMatrixMasterType u2
Definition: mortar_classes.h:690
virtual void UpdateMasterPair(const GeometryType &MasterGeometry, const ProcessInfo &rCurrentProcessInfo)
Updating the Master pair.
Definition: mortar_classes.h:808
GeometryMatrixType Ae
Ae matrix.
Definition: mortar_classes.h:711
virtual void ResetDerivatives()
This method reset to zero the cell vertex derivatives.
Definition: mortar_classes.h:772
GeometryDoFMatrixSlaveType u1
Definition: mortar_classes.h:689
static const SizeType DummySize
Definition: mortar_classes.h:659
double ScaleFactor
The scale factor.
Definition: mortar_classes.h:682
array_1d< GeometryArrayMasterType, DoFSizeDerivativesDependence > DeltaN2
Definition: mortar_classes.h:698
array_1d< double, DoFSizeDerivativesDependence > DeltaDetjSlave
Jacobian derivatives.
Definition: mortar_classes.h:693
GeometryDoFMatrixSlaveType X1
Displacements and original coordinates.
Definition: mortar_classes.h:689
array_1d< GeometryArraySlaveType, DoFSizeDerivativesDependence > DeltaN1
Shape function derivatives.
Definition: mortar_classes.h:697
GeometryDoFMatrixMasterType NormalMaster
Definition: mortar_classes.h:686
static const SizeType DoFSizeDerivativesDependence
Definition: mortar_classes.h:667
GeometryDoFMatrixMasterType X2
Definition: mortar_classes.h:690
array_1d< GeometryArraySlaveType, DoFSizeDerivativesDependence > DeltaPhi
Dual shape function derivatives.
Definition: mortar_classes.h:695
virtual ~DerivativeData()=default
array_1d< GeometryDoFMatrixMasterType, DoFSizeMasterGeometry > DeltaNormalMaster
Definition: mortar_classes.h:701
static const SizeType DoFSizeDerivativesVertex
Definition: mortar_classes.h:669
virtual void Initialize(const GeometryType &SlaveGeometry, const ProcessInfo &rCurrentProcessInfo)
Initializer method.
Definition: mortar_classes.h:729
array_1d< GeometryMatrixType, DoFSizeDerivativesDependence > DeltaAe
Derivatives Ae.
Definition: mortar_classes.h:714
static const SizeType DoFSizeSlaveGeometry
Definition: mortar_classes.h:661
array_1d< double, TNumNodes > PenaltyParameter
The penalty parameter.
Definition: mortar_classes.h:680
GeometryDoFMatrixSlaveType NormalSlave
The normals of the nodes.
Definition: mortar_classes.h:685
typename std::conditional< TNumNodes==2, DummyBoundedMatrixType, BoundedMatrix< double, 3, 3 > >::type VertexDerivativesMatrixType
Definition: mortar_classes.h:656
array_1d< VertexDerivativesMatrixType, DoFSizeDerivativesVertex > DeltaCellVertex
Integration cell vertex derivatives.
Definition: mortar_classes.h:703
static const SizeType DoFSizeMasterGeometry
Definition: mortar_classes.h:663
static const SizeType DoFSizePairedGeometry
Definition: mortar_classes.h:665
void InitializeDeltaAeComponents()
Initialize the DeltaAe components.
Definition: mortar_classes.h:790
array_1d< GeometryDoFMatrixSlaveType, DoFSizeSlaveGeometry > DeltaNormalSlave
Normal derivatives.
Definition: mortar_classes.h:700
This is the definition dual lagrange multiplier operators according to the work of Alexander Popp: ht...
Definition: mortar_classes.h:1513
void CalculateAeComponents(KinematicVariables &rKinematicVariables, const double rIntegrationWeight)
Calculates the Ae components necessary to compute the Phi_LagrangeMultipliers shape functions.
Definition: mortar_classes.h:1562
DualLagrangeMultiplierOperators()
Definition: mortar_classes.h:1531
GeometryMatrixType Me
The auxiliary operators needed to build the dual LM Ae operator.
Definition: mortar_classes.h:1536
void Initialize()
This method initialized the operators.
Definition: mortar_classes.h:1549
virtual ~DualLagrangeMultiplierOperators()
Definition: mortar_classes.h:1533
GeometryMatrixType ComputeDe(const TArray &N1, const double detJ) const
Calculates the matrix De.
Definition: mortar_classes.h:1612
KRATOS_CLASS_POINTER_DEFINITION(DualLagrangeMultiplierOperators)
Counted pointer of DualLagrangeMultiplierOperators.
bool CalculateAe(GeometryMatrixType &Ae)
Calculates the matrix Ae. To avoid problems in the inversion the matrix is normalized.
Definition: mortar_classes.h:1580
void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: mortar_classes.h:1632
GeometryMatrixType De
Definition: mortar_classes.h:1536
This is the definition dual lagrange multiplier operators including the derivatives.
Definition: mortar_classes.h:1718
array_1d< GeometryMatrixType, DoFSizeDerivativesDependence > DeltaMe
Definition: mortar_classes.h:1762
typename std::conditional< TFrictional, DerivativeDataFrictionalType, DerivativeFrictionalessDataType >::type DerivativeDataType
The type for derivative data, determined by the presence of friction.
Definition: mortar_classes.h:1736
static const SizeType DoFSizeDerivativesDependence
Definition: mortar_classes.h:1748
void CalculateDeltaAeComponents(KinematicVariablesType &rKinematicVariables, DerivativeDataType &rDerivativeData, const double rIntegrationWeight)
Calculates the Ae components and its derivatives necessary to compute the Phi_LagrangeMultipliers sha...
Definition: mortar_classes.h:1794
DualLagrangeMultiplierOperators< TNumNodes, TNumNodesMaster > BaseClassType
The base class type.
Definition: mortar_classes.h:1724
~DualLagrangeMultiplierOperatorsWithDerivatives() override
Definition: mortar_classes.h:1759
static const SizeType DoFSizePairedGeometry
Definition: mortar_classes.h:1746
array_1d< GeometryMatrixType, DoFSizeDerivativesDependence > DeltaDe
Definition: mortar_classes.h:1762
static const SizeType DoFSizeSlaveGeometry
Definition: mortar_classes.h:1742
bool CalculateDeltaAe(DerivativeDataType &rDerivativeData)
Calculates the matrix DeltaAe.
Definition: mortar_classes.h:1823
static const SizeType DoFSizeMasterGeometry
Definition: mortar_classes.h:1744
KRATOS_CLASS_POINTER_DEFINITION(DualLagrangeMultiplierOperatorsWithDerivatives)
Counted pointer of DualLagrangeMultiplierOperatorsWithDerivatives.
DualLagrangeMultiplierOperatorsWithDerivatives()
Definition: mortar_classes.h:1757
void Initialize()
This method initialized the operators.
Definition: mortar_classes.h:1775
void PrintInfo(std::ostream &rOStream) const
This method prints the current operators.
Definition: mortar_classes.h:1860
Geometry base class.
Definition: geometry.h:71
std::vector< IntegrationPointType > IntegrationPointsArrayType
Definition: geometry.h:161
static bool CheckConditionNumber(const TMatrix1 &rInputMatrix, TMatrix2 &rInvertedMatrix, const double Tolerance=std::numeric_limits< double >::epsilon(), const bool ThrowError=true)
This method checks the condition number of amtrix.
Definition: math_utils.h:236
static BoundedMatrix< double, TDim, TDim > InvertMatrix(const BoundedMatrix< double, TDim, TDim > &rInputMatrix, double &rInputMatrixDet, const double Tolerance=ZeroTolerance)
Calculates the inverse of a 2x2, 3x3 and 4x4 matrices (using bounded matrix for performance)
Definition: math_utils.h:197
MortarKinematicVariables.
Definition: mortar_classes.h:349
Vector NMaster
Definition: mortar_classes.h:366
void PrintInfo(std::ostream &rOStream) const
Definition: mortar_classes.h:398
MortarKinematicVariables()
Definition: mortar_classes.h:361
KRATOS_CLASS_POINTER_DEFINITION(MortarKinematicVariables)
Counted pointer of MortarKinematicVariables.
void Initialize()
Definition: mortar_classes.h:384
Vector PhiLagrangeMultipliers
Definition: mortar_classes.h:368
Vector NSlave
Definition: mortar_classes.h:367
double DetjSlave
Definition: mortar_classes.h:371
virtual ~MortarKinematicVariables()
Definition: mortar_classes.h:363
MortarKinematicVariablesWithDerivatives.
Definition: mortar_classes.h:490
Matrix jSlave
Definition: mortar_classes.h:518
Matrix DNDeMaster
Definition: mortar_classes.h:510
KRATOS_CLASS_POINTER_DEFINITION(MortarKinematicVariablesWithDerivatives)
Counted pointer of MortarKinematicVariables.
void Initialize()
This method initialized the operators.
Definition: mortar_classes.h:532
void PrintInfo(std::ostream &rOStream) const
Definition: mortar_classes.h:548
Matrix DNDeSlave
Definition: mortar_classes.h:511
Matrix jMaster
Definition: mortar_classes.h:519
MortarKinematicVariables< TNumNodes, TNumNodesMaster > BaseClassType
Definition of the base class.
Definition: mortar_classes.h:496
This is the definition of the mortar operator according to the work of Alexander Popp: https://www....
Definition: mortar_classes.h:1094
void Initialize()
This method initialized the operators.
Definition: mortar_classes.h:1132
void CalculateMortarOperators(KinematicVariables &rKinematicVariables, const double rIntegrationWeight)
It calculates the mortar operators. Popp thesis page 56, equation 3.31 and 3.32.
Definition: mortar_classes.h:1144
virtual ~MortarOperator()
Definition: mortar_classes.h:1115
GeometryMatrixSlaveType DOperator
Mortar condition matrices - DOperator and MOperator.
Definition: mortar_classes.h:1118
KRATOS_CLASS_POINTER_DEFINITION(MortarOperator)
Counted pointer of MortarOperator.
void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: mortar_classes.h:1186
MortarOperator()
Definition: mortar_classes.h:1113
GeometryMatrixMasterType ComputePOperator()
It calculates the POperator (Inverse(D x M))
Definition: mortar_classes.h:1170
GeometryMatrixMasterType MOperator
Definition: mortar_classes.h:1119
This class derives from the MortarOperator class and it includes the derived operators.
Definition: mortar_classes.h:1273
array_1d< GeometryMatrixSlaveType, DoFSizePairedGeometry > DeltaDOperator
Definition: mortar_classes.h:1319
KRATOS_CLASS_POINTER_DEFINITION(MortarOperatorWithDerivatives)
Counted pointer of MortarOperatorWithDerivatives.
~MortarOperatorWithDerivatives() override
Definition: mortar_classes.h:1316
MortarOperatorWithDerivatives()
Definition: mortar_classes.h:1314
void Initialize()
This method initialized the operators.
Definition: mortar_classes.h:1333
void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: mortar_classes.h:1421
static const SizeType DoFSizeDerivativesDependence
Definition: mortar_classes.h:1305
static const SizeType DoFSizeSlaveGeometry
Definition: mortar_classes.h:1300
typename std::conditional< TFrictional, DerivativeDataFrictionalType, DerivativeFrictionalessDataType >::type DerivativeDataType
The type for derivative data, determined by the presence of friction.
Definition: mortar_classes.h:1291
static const SizeType DoFSizeMasterGeometry
Definition: mortar_classes.h:1301
static const SizeType DoFSizePairedGeometry
Definition: mortar_classes.h:1303
MortarOperator< TNumNodes, TNumNodesMaster > BaseClassType
The base class type.
Definition: mortar_classes.h:1279
array_1d< GeometryMatrixMasterType, DoFSizePairedGeometry > DeltaMOperator
Definition: mortar_classes.h:1320
void CalculateDeltaMortarOperators(KinematicVariables &rKinematicVariables, DerivativeDataType &rDerivativeData, const double rIntegrationWeight)
It calculates the mortar operators.
Definition: mortar_classes.h:1358
Custom Point container to be used by the mapper.
Definition: mortar_classes.h:1952
~PointBelong() override=default
Destructor.
void SetBelong(BelongType ThisBelongs)
This method allows to set where the point belongs.
Definition: mortar_classes.h:1995
PointBelong(const array_1d< double, 3 > Coords)
Definition: mortar_classes.h:1972
PointBelong()
Default constructors.
Definition: mortar_classes.h:1968
KRATOS_CLASS_POINTER_DEFINITION(PointBelong)
Counted pointer of PointBelong.
BelongType GetBelong() const
This method recovers where the point belongs.
Definition: mortar_classes.h:2003
PointBelong(const array_1d< double, 3 > Coords, const BelongType &ThisBelongs)
Definition: mortar_classes.h:1976
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 belonging type.
Definition: mortar_classes.h:1958
Point class.
Definition: point.h:59
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
void load(std::string const &rTag, TDataType &rObject)
Definition: serializer.h:207
void save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
Parameters GetValue(Parameters &rParameters, const std::string &rEntry)
Definition: add_kratos_parameters_to_python.cpp:53
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
AMatrix::IdentityMatrix< double > IdentityMatrix
Definition: amatrix_interface.h:564
PointBelongsLine2D2N
Case for 2D line intersected with another 2D line.
Definition: mortar_classes.h:66
@ MasterLine2D2N0
The point belongs to the second slave node of a 2D line element.
@ MasterLine2D2N1
The point belongs to the first master node of a 2D line element.
@ SlaveLine2D2N1
The point belongs to the first slave node of a 2D line element.
@ IntersectionLine2D2N
The point belongs to the second master node of a 2D line element.
Internals::Matrix< double, AMatrix::dynamic, 1 > Vector
Definition: amatrix_interface.h:472
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
AMatrix::MatrixProductExpression< TExpression1Type, TExpression2Type > prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:568
PointBelongsQuadrilateral3D4N
Case for 3D quadrilateral intersected with another 3D quadrilateral.
Definition: mortar_classes.h:128
PointBelongsTriangle3D3NQuadrilateral3D4N
Case for 3D quadrilateral intersected with triangle 3D.
Definition: mortar_classes.h:271
AMatrix::VectorOuterProductExpression< TExpression1Type, TExpression2Type > outer_prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:582
PointBelongs
This enum defines a "hash" used to identify in which combination of cuts the point is found when the ...
Definition: mortar_classes.h:56
@ Intersection
The point belongs to the slave entity.
@ Slave
The point belongs to the master entity.
std::size_t SizeType
The definition of the size type.
Definition: mortar_classes.h:43
PointBelongsTriangle3D3N
Case for 3D triangle intersected with another 3D triangle.
Definition: mortar_classes.h:78
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
scalar_matrix< double > ScalarMatrix
Definition: amatrix_interface.h:728
TExpressionType::data_type norm_frobenius(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression)
Definition: amatrix_interface.h:687
typename GeometryType::IntegrationPointsArrayType IntegrationPointsType
Definition: mortar_classes.h:40
PointBelongsQuadrilateral3D4NTriangle3D3N
Case for 3D triangle intersected with quadrilateral 3D.
Definition: mortar_classes.h:208
int step
Definition: face_heat.py:88
type
Definition: generate_gid_list_file.py:35
phi
Definition: isotropic_damage_automatic_differentiation.py:168
def load(f)
Definition: ode_solve.py:307
int j
Definition: quadrature.py:648
n2
Definition: read_stl.py:20
n1
Definition: read_stl.py:18
integer i
Definition: TensorModule.f:17