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.
updated_lagrangian_element.h
Go to the documentation of this file.
1 //
2 // Project Name: KratosFluidDynamicsApplication $
3 // Last modified by: $Author: AFranci $
4 // Date: $Date: April 2018 $
5 // Revision: $Revision: 0.0 $
6 //
7 //
8 
9 #if !defined(KRATOS_UPDATED_LAGRANGIAN_ELEMENT_H_INCLUDED)
10 #define KRATOS_UPDATED_LAGRANGIAN_ELEMENT_H_INCLUDED
11 
12 // System includes
13 #include <string>
14 #include <iostream>
15 
16 // External includes
17 
18 // Project includes
19 #include "containers/array_1d.h"
20 #include "includes/define.h"
21 #include "includes/element.h"
22 #include "includes/serializer.h"
23 #include "geometries/geometry.h"
24 #include "utilities/math_utils.h"
25 #include "utilities/geometry_utilities.h"
27 
29 
30 #include "includes/model_part.h"
31 /* #include "includes/node.h" */
32 
33 namespace Kratos
34 {
35 
38 
41 
45 
49 
53 
57 
59 
62  template <unsigned int TDim>
64  {
65 
66  protected:
69 
73  typedef struct
74  {
75  unsigned int voigtsize;
76  // strain state
77  double DetFgrad;
78  double DetFgradVel;
90  // Stress state
91  double MeanPressure;
96 
98 
99  public:
102 
105 
107  typedef Node NodeType;
108 
111 
114 
117 
120 
121  typedef std::size_t IndexType;
122 
123  typedef std::size_t SizeType;
124 
125  typedef std::vector<std::size_t> EquationIdVectorType;
126 
127  typedef std::vector<Dof<double>::Pointer> DofsVectorType;
128 
130 
133 
136 
139 
140  /* typedef Element::PropertiesType::Pointer PropertiesType::Pointer; */
141 
143 
146 
148  typedef ConstitutiveLawType::Pointer ConstitutiveLawPointerType;
149 
153 
154  //Constructors.
155 
157 
161  {
162  }
163 
165 
169  UpdatedLagrangianElement(IndexType NewId, const NodesArrayType &ThisNodes) : Element(NewId, ThisNodes)
170  {
171  }
172 
174 
178  UpdatedLagrangianElement(IndexType NewId, GeometryType::Pointer pGeometry) : Element(NewId, pGeometry)
179  {
180  }
181 
183 
188  UpdatedLagrangianElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties) : Element(NewId, pGeometry, pProperties)
189  {
190  }
191 
193 
195 
198  {
199  }
200 
204 
208 
210 
217  Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes,
218  PropertiesType::Pointer pProperties) const override
219  {
220  return Element::Pointer(new UpdatedLagrangianElement(NewId, GetGeometry().Create(ThisNodes), pProperties));
221  }
222 
223  Element::Pointer Clone(IndexType NewId, NodesArrayType const &ThisNodes) const override;
224 
225  virtual void Initialize(const ProcessInfo &rCurrentProcessInfo) override{};
226 
228  virtual void InitializeSolutionStep(const ProcessInfo &rCurrentProcessInfo) override{};
229 
230  virtual void InitializeNonLinearIteration(const ProcessInfo &rCurrentProcessInfo) override{};
231 
232  virtual void Calculate(const Variable<array_1d<double, 3>> &rVariable, array_1d<double, 3> &rOutput, const ProcessInfo &rCurrentProcessInfo) override{};
233 
235  virtual void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix,
236  VectorType &rRightHandSideVector,
237  const ProcessInfo &rCurrentProcessInfo) override{};
238 
239  void CalculateLeftHandSide(MatrixType &rLeftHandSideMatrix,
240  const ProcessInfo &rCurrentProcessInfo) override
241  {
242  KRATOS_TRY;
243  KRATOS_THROW_ERROR(std::logic_error, "UpdatedLagrangianElement::CalculateLeftHandSide not implemented", "");
244  KRATOS_CATCH("");
245  }
246 
247  void CalculateRightHandSide(VectorType &rRightHandSideVector,
248  const ProcessInfo &rCurrentProcessInfo) override{};
249 
250  // The following methods have different implementations depending on TDim
252 
259  EquationIdVectorType &rResult,
260  const ProcessInfo &rCurrentProcessInfo) const override
261  {};
262 
264 
269  DofsVectorType &rElementalDofList,
270  const ProcessInfo &rCurrentProcessInfo) const override
271  {};
272 
274 
275  virtual void UpdateCauchyStress(unsigned int g, const ProcessInfo &rCurrentProcessInfo){};
276 
277  virtual void InitializeElementalVariables(ElementalVariables &rElementalVariables){};
278 
279  void CalculateDeltaPosition(Matrix &rDeltaPosition);
280 
284 
288 
290 
298  int Check(const ProcessInfo &rCurrentProcessInfo) const override { return 0; };
299 
303 
307 
309  std::string Info() const override
310  {
311  std::stringstream buffer;
312  buffer << "UpdatedLagrangianElement #" << Id();
313  return buffer.str();
314  }
315 
317  void PrintInfo(std::ostream &rOStream) const override {}
318 
319  // /// Print object's data.
320  // virtual void PrintData(std::ostream& rOStream) const;
321 
325 
327  protected:
332  double mMaterialDensity = 0;
336 
337  ConstitutiveLaw::Pointer mpConstitutiveLaw = nullptr;
338 
342 
346 
347  virtual void CalculateLocalMomentumEquations(MatrixType &rLeftHandSideMatrix,
348  VectorType &rRightHandSideVector,
349  const ProcessInfo &rCurrentProcessInfo){};
350 
351  virtual void CalculateLocalContinuityEqForPressure(MatrixType &rLeftHandSideMatrix,
352  VectorType &rRightHandSideVector,
353  const ProcessInfo &rCurrentProcessInfo){};
354 
355  virtual void CalculateExplicitContinuityEquation(MatrixType &rLeftHandSideMatrix,
356  VectorType &rRightHandSideVector,
357  const ProcessInfo &rCurrentProcessInfo){};
358 
359  virtual double GetThetaMomentum()
360  {
361  std::cout << "I SHOULD NOT ENTER HERE!" << std::endl;
362  return 0.0;
363  };
364 
365  virtual double GetThetaContinuity()
366  {
367  std::cout << "I SHOULD NOT ENTER HERE!" << std::endl;
368  return 0.0;
369  };
370 
372  const ProcessInfo &rCurrentProcessInfo) const;
373 
375  const ProcessInfo &rCurrentProcessInfo) const;
376 
377  void GetVelocityDofList(DofsVectorType &rElementalDofList,
378  const ProcessInfo &rCurrentProcessInfo) const;
379 
380  void GetPressureDofList(DofsVectorType &rElementalDofList,
381  const ProcessInfo &rCurrentProcessInfo) const;
382 
383  void CalcMeanVelocityNorm(double &meanVelocity,
384  const int Step);
385 
386  void CalcMeanPressure(double &meanPressure,
387  const int Step);
388 
389  void GetPressureValues(Vector &rValues,
390  const int Step = 0);
391 
392  void GetFluidFractionRateValues(Vector &rValues);
393 
394  void GetDensityValues(Vector &rValues,
395  const int Step = 0);
396 
397  void GetVelocityValues(Vector &rValues,
398  const int Step = 0);
399 
401  const int Step = 0);
402 
403  void GetPositions(Vector &rValues,
404  const ProcessInfo &rCurrentProcessInfo,
405  const double theta);
406 
408  const int Step = 0);
409 
410  void GetPressureVelocityValues(Vector &rValues,
411  const int Step);
412 
413  void GetElementalAcceleration(Vector &rValues,
414  const int Step,
415  const double TimeStep);
416 
419  Matrix &rNContainer,
420  Vector &rGaussWeights);
421 
422  void CalculateGeometryData(Vector &rGaussWeights);
423  double ElementSize(/*ShapeFunctionDerivativesType& rDN_DX*/);
424 
434  double EquivalentStrainRate(const ShapeFunctionDerivativesType &rDN_DX) const;
435 
437 
443  virtual void CalculateMassMatrix(Matrix &rMassMatrix,
444  const ProcessInfo &rCurrentProcessInfo) override{};
445 
446  virtual void ComputeMassMatrix(Matrix &rMassMatrix,
447  const ShapeFunctionsType &rN,
448  const double Weight,
449  double &MeanValue){};
450 
451  virtual void ComputeLumpedMassMatrix(Matrix &rMassMatrix,
452  const double Weight,
453  double &MeanValue){};
454 
455  virtual void AddExternalForces(Vector &rRHSVector,
456  const double Density,
457  const ShapeFunctionsType &rN,
458  const double Weight){};
459 
460  virtual void AddInternalForces(Vector &rRHSVector,
461  const ShapeFunctionDerivativesType &rDN_DX,
462  ElementalVariables &rElementalVariables,
463  const double Weight){};
464 
465  virtual void ComputeBulkMatrixLump(MatrixType &BulkMatrix,
466  const double Weight){};
467 
468  virtual void ComputeBulkMatrixRHS(MatrixType &BulkMatrix,
469  const double Weight){};
470 
471  bool CalcMechanicsUpdated(ElementalVariables &rElementalVariables,
472  const ProcessInfo &rCurrentProcessInfo,
473  const ShapeFunctionDerivativesType &rDN_DX);
474 
475  bool CalcStrainRate(ElementalVariables &rElementalVariables,
476  const ProcessInfo &rCurrentProcessInfo,
477  const ShapeFunctionDerivativesType &rDN_DX,
478  const double theta);
479 
480  bool CalcCompleteStrainRate(ElementalVariables &rElementalVariables,
481  const ProcessInfo &rCurrentProcessInfo,
482  const ShapeFunctionDerivativesType &rDN_DX,
483  const double theta);
484 
485  void CalcVelDefGrad(const ShapeFunctionDerivativesType &rDN_DX,
486  MatrixType &FgradVel,
487  const double theta);
488 
490  MatrixType &FgradVel,
491  MatrixType &invFgradVel,
492  double &FVelJacobian,
493  const double theta);
494 
495  void CalcFGrad(const ShapeFunctionDerivativesType &rDN_DX,
496  MatrixType &Fgrad,
497  MatrixType &invFgrad,
498  double &FJacobian,
499  const ProcessInfo &rCurrentProcessInfo,
500  const double theta);
501 
503  double &volumetricDefRate,
504  MatrixType &invGradDef,
505  const double theta);
506 
507  void CalcVolDefRateFromSpatialVelGrad(double &volumetricDefRate,
508  MatrixType &SpatialVelocityGrad);
509 
510  void CalcSpatialVelocityGrad(MatrixType &invFgrad,
511  MatrixType &VelDefgrad,
512  MatrixType &SpatialVelocityGrad);
513 
515  MatrixType &VelDefgrad,
516  VectorType &MDGreenLagrangeMaterial);
517 
518  void CalcSpatialDefRate(VectorType &MDGreenLagrangeMaterial,
519  MatrixType &invFgrad,
520  VectorType &SpatialDefRate);
521 
522  void CalcDeviatoricInvariant(VectorType &SpatialDefRate,
523  double &DeviatoricInvariant);
524 
525  void CalcEquivalentStrainRate(VectorType &SpatialDefRate,
526  double &EquivalentStrainRate);
527 
528  double CalcNormalProjectionDefRate(const VectorType &SpatialDefRate,
529  const array_1d<double, 3> NormalVector);
530 
531  double CalcNormalProjectionDefRate(VectorType &SpatialDefRate);
532 
533  void CheckStrain1(double &VolumetricDefRate,
534  MatrixType &SpatialVelocityGrad);
535 
536  void CheckStrain2(MatrixType &SpatialVelocityGrad,
537  MatrixType &Fgrad,
538  MatrixType &VelDefgrad);
539 
540  bool CheckStrain3(VectorType &SpatialDefRate,
541  MatrixType &SpatialVelocityGrad);
542 
544  ElementalVariables &rElementalVariables,
545  const unsigned int g,
546  const Vector& rN,
547  const ProcessInfo &rCurrentProcessInfo,
548  double &Density,
549  double &DeviatoricCoeff,
550  double &VolumetricCoeff)
551  {};
552 
554 
556 
564  template <class TVariableType>
565  void EvaluateInPoint(TVariableType &rResult,
567  const ShapeFunctionsType &rShapeFunc)
568  {
569  GeometryType &rGeom = this->GetGeometry();
570  const SizeType NumNodes = rGeom.PointsNumber();
571 
572  rResult = rShapeFunc[0] * rGeom[0].FastGetSolutionStepValue(Var);
573 
574  for (SizeType i = 1; i < NumNodes; i++)
575  {
576  rResult += rShapeFunc[i] * rGeom[i].FastGetSolutionStepValue(Var);
577  }
578  }
579 
580  template <class TVariableType>
581  void EvaluatePropertyFromANotRigidNode(TVariableType &rResult,
583  {
584  GeometryType &rGeom = this->GetGeometry();
585  const SizeType NumNodes = rGeom.PointsNumber();
586  bool found = false;
587  for (SizeType i = 0; i < NumNodes; i++)
588  {
589  if (rGeom[i].IsNot(RIGID))
590  {
591  rResult = rGeom[i].FastGetSolutionStepValue(Var);
592  found = true;
593  break;
594  }
595  }
596  if (found == false)
597  std::cout << "ATTENTION! NO PROPERTIES HAVE BEEN FOUNDED FOR THIS ELEMENT! X,Y " << rGeom[1].X() << "," << rGeom[1].Y() << std::endl;
598  }
599 
601 
610  template <class TVariableType>
611  void EvaluateInPoint(TVariableType &rResult,
613  const ShapeFunctionsType &rShapeFunc,
614  const IndexType Step)
615  {
616  GeometryType &rGeom = this->GetGeometry();
617  const SizeType NumNodes = rGeom.PointsNumber();
618 
619  rResult = rShapeFunc[0] * rGeom[0].FastGetSolutionStepValue(Var, Step);
620 
621  for (SizeType i = 1; i < NumNodes; i++)
622  {
623  rResult += rShapeFunc[i] * rGeom[i].FastGetSolutionStepValue(Var, Step);
624  }
625  }
626 
627  template <class TVariableType>
628  void EvaluateDifferenceInPoint(TVariableType &rResult,
630  const ShapeFunctionsType &rShapeFunc)
631  {
632  GeometryType &rGeom = this->GetGeometry();
633  const SizeType NumNodes = rGeom.PointsNumber();
634 
635  rResult = rShapeFunc[0] * (rGeom[0].FastGetSolutionStepValue(Var, 0) - rGeom[0].FastGetSolutionStepValue(Var, 1));
636 
637  for (SizeType i = 1; i < NumNodes; i++)
638  {
639  rResult += rShapeFunc[i] * (rGeom[i].FastGetSolutionStepValue(Var, 0) - rGeom[i].FastGetSolutionStepValue(Var, 1));
640  }
641  }
642 
644  const Kratos::Variable<double> &Var,
645  const ShapeFunctionDerivativesType &rDN_DX)
646  {
647  GeometryType &rGeom = this->GetGeometry();
648  const SizeType NumNodes = rGeom.PointsNumber();
649 
650  const double &var = rGeom[0].FastGetSolutionStepValue(Var);
651  for (SizeType d = 0; d < TDim; ++d)
652  rResult[d] = rDN_DX(0, d) * var;
653 
654  for (SizeType i = 1; i < NumNodes; i++)
655  {
656  const double &var = rGeom[i].FastGetSolutionStepValue(Var);
657  for (SizeType d = 0; d < TDim; ++d)
658  rResult[d] += rDN_DX(i, d) * var;
659  }
660  }
661 
663  const Kratos::Variable<double> &Var,
664  const ShapeFunctionDerivativesType &rDN_DX,
665  const IndexType Step)
666  {
667  GeometryType &rGeom = this->GetGeometry();
668  const SizeType NumNodes = rGeom.PointsNumber();
669 
670  const double &var = rGeom[0].FastGetSolutionStepValue(Var, Step);
671  for (SizeType d = 0; d < TDim; ++d)
672  rResult[d] = rDN_DX(0, d) * var;
673 
674  for (SizeType i = 1; i < NumNodes; i++)
675  {
676  const double &var = rGeom[i].FastGetSolutionStepValue(Var, Step);
677  for (SizeType d = 0; d < TDim; ++d)
678  rResult[d] += rDN_DX(i, d) * var;
679  }
680  }
681 
683  const Kratos::Variable<double> &Var,
684  const ShapeFunctionDerivativesType &rDN_DX)
685  {
686  GeometryType &rGeom = this->GetGeometry();
687  const SizeType NumNodes = rGeom.PointsNumber();
688 
689  const double &var = rGeom[0].FastGetSolutionStepValue(Var, 0) - rGeom[0].FastGetSolutionStepValue(Var, 1);
690  for (SizeType d = 0; d < TDim; ++d)
691  rResult[d] = rDN_DX(0, d) * var;
692 
693  for (SizeType i = 1; i < NumNodes; i++)
694  {
695  const double &var = rGeom[i].FastGetSolutionStepValue(Var, 0) - rGeom[i].FastGetSolutionStepValue(Var, 1);
696  for (SizeType d = 0; d < TDim; ++d)
697  rResult[d] += rDN_DX(i, d) * var;
698  }
699  }
700 
702  const Kratos::Variable<double> &Var,
703  const ShapeFunctionDerivativesType &rDN_DX,
704  const double weight)
705  {
706  GeometryType &rGeom = this->GetGeometry();
707  const SizeType NumNodes = rGeom.PointsNumber();
708 
709  const double &var = (1.0 + weight) * rGeom[0].FastGetSolutionStepValue(Var, 0) - rGeom[0].FastGetSolutionStepValue(Var, 1);
710  for (SizeType d = 0; d < TDim; ++d)
711  rResult[d] = rDN_DX(0, d) * var;
712 
713  for (SizeType i = 1; i < NumNodes; i++)
714  {
715  const double &var = (1.0 + weight) * rGeom[i].FastGetSolutionStepValue(Var, 0) - rGeom[i].FastGetSolutionStepValue(Var, 1);
716  for (SizeType d = 0; d < TDim; ++d)
717  rResult[d] += rDN_DX(i, d) * var;
718  }
719  }
720 
721  void EvaluateDivergenceInPoint(double &rResult,
723  const ShapeFunctionDerivativesType &rDN_DX)
724  {
725  GeometryType &rGeom = this->GetGeometry();
726  const SizeType NumNodes = rGeom.PointsNumber();
727 
728  rResult = 0.0;
729  for (SizeType i = 0; i < NumNodes; i++)
730  {
731  const array_1d<double, 3> &var = rGeom[i].FastGetSolutionStepValue(Var);
732  for (SizeType d = 0; d < TDim; ++d)
733  {
734  rResult += rDN_DX(i, d) * var[d];
735  }
736  }
737  }
738 
740 
744  template <class TValueType>
746  std::vector<TValueType> &rOutput)
747  {
749  /* unsigned int NumValues = this->GetGeometry().IntegrationPointsNumber(GeometryData::IntegrationMethod::GI_GAUSS_4); */
750  rOutput.resize(NumValues, false);
751  /*
752  The cast is done to avoid modification of the element's data. Data modification
753  would happen if rVariable is not stored now (would initialize a pointer to &rVariable
754  with associated value of 0.0). This is catastrophic if the variable referenced
755  goes out of scope.
756  */
757  const UpdatedLagrangianElement<TDim> *const_this = static_cast<const UpdatedLagrangianElement<TDim> *>(this);
758  const TValueType &Val = const_this->GetValue(rVariable);
759 
760  for (unsigned int i = 0; i < NumValues; i++)
761  {
762  rOutput[i] = Val;
763  }
764  }
765 
767  unsigned int idA,
768  unsigned int idB,
769  unsigned int otherId)
770  {
771  GeometryType &rGeom = this->GetGeometry();
772  double deltaX = rGeom[idB].X() - rGeom[idA].X();
773  double deltaY = rGeom[idB].Y() - rGeom[idA].Y();
774  double elementSize = sqrt(deltaX * deltaX + deltaY * deltaY);
775  if (fabs(deltaX) > fabs(deltaY))
776  { //to avoid division by zero or small numbers
777  NormalVector[0] = -deltaY / deltaX;
778  NormalVector[1] = 1.0;
779  double normNormal = NormalVector[0] * NormalVector[0] + NormalVector[1] * NormalVector[1];
780  NormalVector *= 1.0 / sqrt(normNormal);
781  }
782  else
783  {
784  NormalVector[0] = 1.0;
785  NormalVector[1] = -deltaX / deltaY;
786  double normNormal = NormalVector[0] * NormalVector[0] + NormalVector[1] * NormalVector[1];
787  NormalVector *= 1.0 / sqrt(normNormal);
788  }
789  //to determine if the computed normal outwards or inwards
790  const array_1d<double, 3> MeanPoint = (rGeom[idB].Coordinates() + rGeom[idA].Coordinates()) * 0.5;
791  const array_1d<double, 3> DistanceA = rGeom[otherId].Coordinates() - (MeanPoint + NormalVector * elementSize);
792  const array_1d<double, 3> DistanceB = rGeom[otherId].Coordinates() - (MeanPoint - NormalVector * elementSize);
793  const double normA = DistanceA[0] * DistanceA[0] + DistanceA[1] * DistanceA[1];
794  const double normB = DistanceB[0] * DistanceB[0] + DistanceB[1] * DistanceB[1];
795  if (normB > normA)
796  {
797  NormalVector *= -1.0;
798  }
799  }
800 
802  unsigned int idA,
803  unsigned int idB,
804  unsigned int otherId,
805  double &edgeLength)
806  {
807  GeometryType &rGeom = this->GetGeometry();
808  double deltaX = rGeom[idB].X() - rGeom[idA].X();
809  double deltaY = rGeom[idB].Y() - rGeom[idA].Y();
810  edgeLength = sqrt(deltaX * deltaX + deltaY * deltaY);
811  if (fabs(deltaX) > fabs(deltaY))
812  { //to avoid division by zero or small numbers
813  NormalVector[0] = -deltaY / deltaX;
814  NormalVector[1] = 1.0;
815  double normNormal = NormalVector[0] * NormalVector[0] + NormalVector[1] * NormalVector[1];
816  NormalVector *= 1.0 / sqrt(normNormal);
817  }
818  else
819  {
820  NormalVector[0] = 1.0;
821  NormalVector[1] = -deltaX / deltaY;
822  double normNormal = NormalVector[0] * NormalVector[0] + NormalVector[1] * NormalVector[1];
823  NormalVector *= 1.0 / sqrt(normNormal);
824  }
825  //to determine if the computed normal outwards or inwards
826  const array_1d<double, 3> MeanPoint = (rGeom[idB].Coordinates() + rGeom[idA].Coordinates()) * 0.5;
827  const array_1d<double, 3> DistanceA = rGeom[otherId].Coordinates() - (MeanPoint + NormalVector * edgeLength);
828  const array_1d<double, 3> DistanceB = rGeom[otherId].Coordinates() - (MeanPoint - NormalVector * edgeLength);
829  const double normA = DistanceA[0] * DistanceA[0] + DistanceA[1] * DistanceA[1];
830  const double normB = DistanceB[0] * DistanceB[0] + DistanceB[1] * DistanceB[1];
831  if (normB > normA)
832  {
833  NormalVector *= -1.0;
834  }
835  }
836 
838  unsigned int idA,
839  unsigned int idB,
840  unsigned int idC,
841  unsigned int otherId)
842  {
843  GeometryType &rGeom = this->GetGeometry();
844  const array_1d<double, 3> TangentXi = rGeom[idB].Coordinates() - rGeom[idA].Coordinates();
845  const array_1d<double, 3> TangentEta = rGeom[idC].Coordinates() - rGeom[idA].Coordinates();
846 
847  MathUtils<double>::CrossProduct(NormalVector, TangentXi, TangentEta);
848  double normNormal = NormalVector[0] * NormalVector[0] + NormalVector[1] * NormalVector[1] + NormalVector[2] * NormalVector[2];
849  NormalVector *= 1.0 / sqrt(normNormal);
850 
851  //to determine if the computed normal outwards or inwards
852  double deltaX = rGeom[idB].X() - rGeom[idA].X();
853  double deltaY = rGeom[idB].Y() - rGeom[idA].Y();
854  double deltaZ = rGeom[idB].Z() - rGeom[idA].Z();
855  double elementSize = sqrt(deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ); // this is just to have an idea of the size of the element
856  const array_1d<double, 3> MeanPoint = (rGeom[idC].Coordinates() + rGeom[idB].Coordinates() + rGeom[idA].Coordinates()) / 3.0;
857  const array_1d<double, 3> DistanceA = rGeom[otherId].Coordinates() - (MeanPoint + NormalVector * elementSize);
858  const array_1d<double, 3> DistanceB = rGeom[otherId].Coordinates() - (MeanPoint - NormalVector * elementSize);
859  const double normA = DistanceA[0] * DistanceA[0] + DistanceA[1] * DistanceA[1] + DistanceA[2] * DistanceA[2];
860  const double normB = DistanceB[0] * DistanceB[0] + DistanceB[1] * DistanceB[1] + DistanceB[2] * DistanceB[2];
861  if (normB > normA)
862  {
863  NormalVector *= -1.0;
864  }
865  }
866 
868  unsigned int idA,
869  unsigned int idB,
870  unsigned int idC,
871  unsigned int otherId,
872  double &surfaceArea)
873  {
874  GeometryType &rGeom = this->GetGeometry();
875  const array_1d<double, 3> TangentXi = rGeom[idB].Coordinates() - rGeom[idA].Coordinates();
876  const array_1d<double, 3> TangentEta = rGeom[idC].Coordinates() - rGeom[idA].Coordinates();
877 
878  MathUtils<double>::CrossProduct(NormalVector, TangentXi, TangentEta);
879  double normNormal = NormalVector[0] * NormalVector[0] + NormalVector[1] * NormalVector[1] + NormalVector[2] * NormalVector[2];
880  NormalVector *= 1.0 / sqrt(normNormal);
881 
882  //to determine if the computed normal outwards or inwards
883  double deltaX = rGeom[idB].X() - rGeom[idA].X();
884  double deltaY = rGeom[idB].Y() - rGeom[idA].Y();
885  double deltaZ = rGeom[idB].Z() - rGeom[idA].Z();
886 
887  const double a = MathUtils<double>::Norm3(rGeom.GetPoint(idA) - rGeom.GetPoint(idB));
888  const double b = MathUtils<double>::Norm3(rGeom.GetPoint(idB) - rGeom.GetPoint(idC));
889  const double c = MathUtils<double>::Norm3(rGeom.GetPoint(idC) - rGeom.GetPoint(idA));
890 
891  const double s = (a + b + c) / 2.0;
892 
893  surfaceArea= std::sqrt(s * (s - a) * (s - b) * (s - c));
894 
895  double elementSize = sqrt(deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ); // this is just to have an idea of the size of the element
896  const array_1d<double, 3> MeanPoint = (rGeom[idC].Coordinates() + rGeom[idB].Coordinates() + rGeom[idA].Coordinates()) / 3.0;
897  const array_1d<double, 3> DistanceA = rGeom[otherId].Coordinates() - (MeanPoint + NormalVector * elementSize);
898  const array_1d<double, 3> DistanceB = rGeom[otherId].Coordinates() - (MeanPoint - NormalVector * elementSize);
899  const double normA = DistanceA[0] * DistanceA[0] + DistanceA[1] * DistanceA[1] + DistanceA[2] * DistanceA[2];
900  const double normB = DistanceB[0] * DistanceB[0] + DistanceB[1] * DistanceB[1] + DistanceB[2] * DistanceB[2];
901  if (normB > normA)
902  {
903  NormalVector *= -1.0;
904  }
905  }
906 
910 
914 
918 
920 
921  private:
924 
928 
932 
933  friend class Serializer;
934 
935  void save(Serializer &rSerializer) const override
936  {
938  }
939 
940  void load(Serializer &rSerializer) override
941  {
943  }
944 
948 
952 
956 
960 
964 
967 
968  /* /// Copy constructor. */
969  /* UpdatedLagrangianElement(UpdatedLagrangianElement const& rOther); */
970 
972 
973  }; // Class UpdatedLagrangianElement
974 
976 
979 
983 
985  template <unsigned int TDim>
986  inline std::istream &operator>>(std::istream &rIStream,
988  {
989  return rIStream;
990  }
991 
993  template <unsigned int TDim>
994  inline std::ostream &operator<<(std::ostream &rOStream,
995  const UpdatedLagrangianElement<TDim> &rThis)
996  {
997  rThis.PrintInfo(rOStream);
998  rOStream << std::endl;
999  rThis.PrintData(rOStream);
1000 
1001  return rOStream;
1002  }
1003 
1004 } // namespace Kratos.
1005 
1006 #endif // KRATOS_UPDATED_LAGRANGIAN_ELEMENT defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Definition: constitutive_law.h:47
Base class for all Elements.
Definition: element.h:60
std::size_t SizeType
Definition: element.h:94
std::vector< DofType::Pointer > DofsVectorType
Definition: element.h:100
std::vector< std::size_t > EquationIdVectorType
Definition: element.h:98
std::size_t IndexType
Definition: flags.h:74
bool IsNot(Flags const &rOther) const
Definition: flags.h:291
TVariableType::Type & GetValue(const TVariableType &rThisVariable)
Definition: geometrical_object.h:248
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
IntegrationMethod
Definition: geometry_data.h:76
Geometry base class.
Definition: geometry.h:71
SizeType PointsNumber() const
Definition: geometry.h:528
TPointType const & GetPoint(const int Index) const
Definition: geometry.h:1816
SizeType IntegrationPointsNumber() const
Definition: geometry.h:2257
This object defines an indexed object.
Definition: indexed_object.h:54
IndexType Id() const
Definition: indexed_object.h:107
static double Norm3(const TVectorType &a)
Calculates the norm of vector "a" which is assumed to be of size 3.
Definition: math_utils.h:691
static T CrossProduct(const T &a, const T &b)
Performs the vector product of the two input vectors a,b.
Definition: math_utils.h:762
This class defines the node.
Definition: node.h:65
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
A stabilized element for the incompressible Navier-Stokes equations.
Definition: updated_lagrangian_element.h:64
UpdatedLagrangianElement()
Definition: updated_lagrangian_element.hpp:207
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#define KRATOS_THROW_ERROR(ExceptionType, ErrorMessage, MoreInfo)
Definition: define.h:77
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
void ComputeMechanicalDissipation(ElementalVariables &rElementalVariables)
VectorType CurrentTotalCauchyStress
Definition: updated_lagrangian_element.h:92
void CalcSpatialVelocityGrad(MatrixType &invFgrad, MatrixType &VelDefgrad, MatrixType &SpatialVelocityGrad)
Definition: updated_lagrangian_element.cpp:774
void CalcVelDefGrad(const ShapeFunctionDerivativesType &rDN_DX, MatrixType &FgradVel, const double theta)
Definition: updated_lagrangian_element.cpp:662
void GetPositions(Vector &rValues, const ProcessInfo &rCurrentProcessInfo, const double theta)
Node NodeType
Node type (default is: Node)
Definition: updated_lagrangian_element.h:107
void GetOutwardsUnitNormalForThreePoints(array_1d< double, 3 > &NormalVector, unsigned int idA, unsigned int idB, unsigned int idC, unsigned int otherId, double &surfaceArea)
Definition: updated_lagrangian_element.h:867
MatrixType FgradVel
Definition: updated_lagrangian_element.h:86
void CalcMDGreenLagrangeMaterial(MatrixType &Fgrad, MatrixType &VelDefgrad, VectorType &MDGreenLagrangeMaterial)
double EquivalentStrainRate(const ShapeFunctionDerivativesType &rDN_DX) const
EquivalentStrainRate Calculate the second invariant of the strain rate tensor GammaDot = (2SijSij)^0....
Definition: updated_lagrangian_element.cpp:1597
VectorType UpdatedTotalCauchyStress
Definition: updated_lagrangian_element.h:93
void CalcVolDefRateFromSpatialVelGrad(double &volumetricDefRate, MatrixType &SpatialVelocityGrad)
Definition: updated_lagrangian_element.cpp:789
void CheckStrain1(double &VolumetricDefRate, MatrixType &SpatialVelocityGrad)
virtual void Initialize(const ProcessInfo &rCurrentProcessInfo) override
Definition: updated_lagrangian_element.h:225
std::string Info() const override
Turn back information as a string.
Definition: updated_lagrangian_element.h:309
void EvaluateGradientDifferenceInPoint(array_1d< double, TDim > &rResult, const Kratos::Variable< double > &Var, const ShapeFunctionDerivativesType &rDN_DX)
Definition: updated_lagrangian_element.h:682
void CalcSpatialDefRate(VectorType &MDGreenLagrangeMaterial, MatrixType &invFgrad, VectorType &SpatialDefRate)
void CalcMeanPressure(double &meanPressure, const int Step)
Kratos::Vector ShapeFunctionsType
Type for shape function values container.
Definition: updated_lagrangian_element.h:132
void GetVelocityValues(Vector &rValues, const int Step=0)
virtual void CalculateLocalContinuityEqForPressure(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
Definition: updated_lagrangian_element.h:351
void GetOutwardsUnitNormalForThreePoints(array_1d< double, 3 > &NormalVector, unsigned int idA, unsigned int idB, unsigned int idC, unsigned int otherId)
Definition: updated_lagrangian_element.h:837
void GetFluidFractionRateValues(Vector &rValues)
Definition: updated_lagrangian_element.cpp:204
virtual void CalculateExplicitContinuityEquation(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
Definition: updated_lagrangian_element.h:355
bool CalcStrainRate(ElementalVariables &rElementalVariables, const ProcessInfo &rCurrentProcessInfo, const ShapeFunctionDerivativesType &rDN_DX, const double theta)
Definition: updated_lagrangian_element.cpp:1379
virtual void ComputeBulkMatrixRHS(MatrixType &BulkMatrix, const double Weight)
Definition: updated_lagrangian_element.h:468
double CalcNormalProjectionDefRate(VectorType &SpatialDefRate)
double VolumetricDefRate
Definition: updated_lagrangian_element.h:81
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Create a new element of this type.
Definition: updated_lagrangian_element.h:217
void GetDensityValues(Vector &rValues, const int Step=0)
Definition: updated_lagrangian_element.cpp:219
bool CalcMechanicsUpdated(ElementalVariables &rElementalVariables, const ProcessInfo &rCurrentProcessInfo, const ShapeFunctionDerivativesType &rDN_DX)
Definition: updated_lagrangian_element.cpp:1106
void GetOutwardsUnitNormalForTwoPoints(array_1d< double, 3 > &NormalVector, unsigned int idA, unsigned int idB, unsigned int otherId, double &edgeLength)
Definition: updated_lagrangian_element.h:801
void EvaluateInPoint(TVariableType &rResult, const Kratos::Variable< TVariableType > &Var, const ShapeFunctionsType &rShapeFunc)
Write the value of a variable at a point inside the element to a double.
Definition: updated_lagrangian_element.h:565
MatrixType SpatialVelocityGrad
Definition: updated_lagrangian_element.h:88
bool CheckStrain3(VectorType &SpatialDefRate, MatrixType &SpatialVelocityGrad)
virtual void CalculateMassMatrix(Matrix &rMassMatrix, const ProcessInfo &rCurrentProcessInfo) override
Add integration point contribution to the mass matrix.
Definition: updated_lagrangian_element.h:443
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(UpdatedLagrangianElement)
Pointer definition of UpdatedLagrangianElement.
void CalcMeanVelocityNorm(double &meanVelocity, const int Step)
void GetDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const override
Returns a list of the element's Dofs.
Definition: updated_lagrangian_element.h:268
virtual double GetThetaContinuity()
Definition: updated_lagrangian_element.h:365
unsigned int voigtsize
Definition: updated_lagrangian_element.h:75
void GetPressureDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const
Definition: updated_lagrangian_element.cpp:171
void CheckStrain2(MatrixType &SpatialVelocityGrad, MatrixType &Fgrad, MatrixType &VelDefgrad)
virtual ~UpdatedLagrangianElement()
Destructor.
Definition: updated_lagrangian_element.h:197
GeometryType::ShapeFunctionsGradientsType ShapeFunctionDerivativesArrayType
Type for an array of shape function gradient matrices.
Definition: updated_lagrangian_element.h:138
virtual void CalcElasticPlasticCauchySplitted(ElementalVariables &rElementalVariables, const unsigned int g, const Vector &rN, const ProcessInfo &rCurrentProcessInfo, double &Density, double &DeviatoricCoeff, double &VolumetricCoeff)
Definition: updated_lagrangian_element.h:543
double DetFgrad
Definition: updated_lagrangian_element.h:77
ConstitutiveLaw ConstitutiveLawType
Reference type definition for constitutive laws.
Definition: updated_lagrangian_element.h:145
double DetFgradVel
Definition: updated_lagrangian_element.h:78
void GetElementalValueForOutput(const Kratos::Variable< TValueType > &rVariable, std::vector< TValueType > &rOutput)
Helper function to print results on gauss points.
Definition: updated_lagrangian_element.h:745
void EvaluatePropertyFromANotRigidNode(TVariableType &rResult, const Kratos::Variable< TVariableType > &Var)
Definition: updated_lagrangian_element.h:581
void GetAccelerationValues(Vector &rValues, const int Step=0)
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: updated_lagrangian_element.h:317
bool CalcCompleteStrainRate(ElementalVariables &rElementalVariables, const ProcessInfo &rCurrentProcessInfo, const ShapeFunctionDerivativesType &rDN_DX, const double theta)
void EvaluateInPoint(TVariableType &rResult, const Kratos::Variable< TVariableType > &Var, const ShapeFunctionsType &rShapeFunc, const IndexType Step)
Write the value of a variable at a point inside the element to a double.
Definition: updated_lagrangian_element.h:611
double EquivalentStrainRate
Definition: updated_lagrangian_element.h:80
void CalcEquivalentStrainRate(VectorType &SpatialDefRate, double &EquivalentStrainRate)
void CalculateDeltaPosition(Matrix &rDeltaPosition)
Definition: updated_lagrangian_element.cpp:283
double MeanPressure
Definition: updated_lagrangian_element.h:91
virtual void InitializeSolutionStep(const ProcessInfo &rCurrentProcessInfo) override
Initializes the element and all geometric information required for the problem.
Definition: updated_lagrangian_element.h:228
void GetElementalAcceleration(Vector &rValues, const int Step, const double TimeStep)
Definition: updated_lagrangian_element.cpp:389
void GetPressureVelocityValues(Vector &rValues, const int Step)
Definition: updated_lagrangian_element.cpp:1090
virtual void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Calculate the element's local contribution to the system for the current step.
Definition: updated_lagrangian_element.h:235
std::size_t SizeType
Definition: updated_lagrangian_element.h:123
MatrixType InvFgrad
Definition: updated_lagrangian_element.h:85
MatrixType Fgrad
Definition: updated_lagrangian_element.h:84
void EvaluateGradientDifferenceInPoint(array_1d< double, TDim > &rResult, const Kratos::Variable< double > &Var, const ShapeFunctionDerivativesType &rDN_DX, const double weight)
Definition: updated_lagrangian_element.h:701
Geometry< NodeType >::PointsArrayType NodesArrayType
Definition of nodes container type, redefined from GeometryType.
Definition: updated_lagrangian_element.h:113
GeometryData::IntegrationMethod GetIntegrationMethod() const override
Definition: updated_lagrangian_element.cpp:63
double CalcNormalProjectionDefRate(const VectorType &SpatialDefRate, const array_1d< double, 3 > NormalVector)
VectorType UpdatedDeviatoricCauchyStress
Definition: updated_lagrangian_element.h:95
double ElementSize()
Definition: updated_lagrangian_element.cpp:534
void CalculateLeftHandSide(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
Definition: updated_lagrangian_element.h:239
virtual void ComputeMassMatrix(Matrix &rMassMatrix, const ShapeFunctionsType &rN, const double Weight, double &MeanValue)
Definition: updated_lagrangian_element.h:446
UpdatedLagrangianElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constuctor using geometry and properties.
Definition: updated_lagrangian_element.h:188
void EvaluateDifferenceInPoint(TVariableType &rResult, const Kratos::Variable< TVariableType > &Var, const ShapeFunctionsType &rShapeFunc)
Definition: updated_lagrangian_element.h:628
double mMaterialDensity
Definition: updated_lagrangian_element.h:332
UpdatedLagrangianElement(IndexType NewId=0)
Default constuctor.
Definition: updated_lagrangian_element.h:160
double DeviatoricInvariant
Definition: updated_lagrangian_element.h:79
virtual void InitializeElementalVariables(ElementalVariables &rElementalVariables)
Definition: updated_lagrangian_element.h:277
VectorType CurrentDeviatoricCauchyStress
Definition: updated_lagrangian_element.h:94
double mMaterialDeviatoricCoefficient
Definition: updated_lagrangian_element.h:330
MatrixType ConstitutiveMatrix
Definition: updated_lagrangian_element.h:89
void GetPressureValues(Vector &rValues, const int Step=0)
Definition: updated_lagrangian_element.cpp:188
virtual void AddInternalForces(Vector &rRHSVector, const ShapeFunctionDerivativesType &rDN_DX, ElementalVariables &rElementalVariables, const double Weight)
Definition: updated_lagrangian_element.h:460
VectorType SpatialDefRate
Definition: updated_lagrangian_element.h:82
void CalcFGrad(const ShapeFunctionDerivativesType &rDN_DX, MatrixType &Fgrad, MatrixType &invFgrad, double &FJacobian, const ProcessInfo &rCurrentProcessInfo, const double theta)
Definition: updated_lagrangian_element.cpp:588
UpdatedLagrangianElement(IndexType NewId, const NodesArrayType &ThisNodes)
Constructor using an array of nodes.
Definition: updated_lagrangian_element.h:169
void EvaluateDivergenceInPoint(double &rResult, const Kratos::Variable< array_1d< double, 3 >> &Var, const ShapeFunctionDerivativesType &rDN_DX)
Definition: updated_lagrangian_element.h:721
Vector VectorType
Vector type for local contributions to the linear system.
Definition: updated_lagrangian_element.h:116
void EvaluateGradientInPoint(array_1d< double, TDim > &rResult, const Kratos::Variable< double > &Var, const ShapeFunctionDerivativesType &rDN_DX)
Definition: updated_lagrangian_element.h:643
virtual void AddExternalForces(Vector &rRHSVector, const double Density, const ShapeFunctionsType &rN, const double Weight)
Definition: updated_lagrangian_element.h:455
Matrix MatrixType
Matrix type for local contributions to the linear system.
Definition: updated_lagrangian_element.h:119
void GetVelocityDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const
ConstitutiveLawType::Pointer ConstitutiveLawPointerType
Pointer type for constitutive laws.
Definition: updated_lagrangian_element.h:148
void VelocityEquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const
PointerVectorSet< Dof< double >, IndexedObject > DofsArrayType
Definition: updated_lagrangian_element.h:129
Element::PropertiesType PropertiesType
Definition: updated_lagrangian_element.h:142
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Provides the global indices for each one of this element's local rows.
Definition: updated_lagrangian_element.h:258
ConstitutiveLaw::Pointer mpConstitutiveLaw
Definition: updated_lagrangian_element.h:337
VectorType MDGreenLagrangeMaterial
Definition: updated_lagrangian_element.h:83
virtual void ComputeBulkMatrixLump(MatrixType &BulkMatrix, const double Weight)
Definition: updated_lagrangian_element.h:465
std::vector< std::size_t > EquationIdVectorType
Definition: updated_lagrangian_element.h:125
void GetOutwardsUnitNormalForTwoPoints(array_1d< double, 3 > &NormalVector, unsigned int idA, unsigned int idB, unsigned int otherId)
Definition: updated_lagrangian_element.h:766
virtual void Calculate(const Variable< array_1d< double, 3 >> &rVariable, array_1d< double, 3 > &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Definition: updated_lagrangian_element.h:232
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: updated_lagrangian_element.h:247
virtual void UpdateCauchyStress(unsigned int g, const ProcessInfo &rCurrentProcessInfo)
Definition: updated_lagrangian_element.h:275
void EvaluateGradientInPoint(array_1d< double, TDim > &rResult, const Kratos::Variable< double > &Var, const ShapeFunctionDerivativesType &rDN_DX, const IndexType Step)
Definition: updated_lagrangian_element.h:662
UpdatedLagrangianElement(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using a geometry object.
Definition: updated_lagrangian_element.h:178
Kratos::Matrix ShapeFunctionDerivativesType
Type for a matrix containing the shape function gradients.
Definition: updated_lagrangian_element.h:135
void CalcDeviatoricInvariant(VectorType &SpatialDefRate, double &DeviatoricInvariant)
virtual void InitializeNonLinearIteration(const ProcessInfo &rCurrentProcessInfo) override
Definition: updated_lagrangian_element.h:230
MatrixType InvFgradVel
Definition: updated_lagrangian_element.h:87
Geometry< NodeType > GeometryType
Geometry type (using with given NodeType)
Definition: updated_lagrangian_element.h:110
void CalcVolumetricDefRate(const ShapeFunctionDerivativesType &rDN_DX, double &volumetricDefRate, MatrixType &invGradDef, const double theta)
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: updated_lagrangian_element.h:127
void GetDisplacementValues(Vector &rValues, const int Step=0)
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: updated_lagrangian_element.hpp:177
virtual void CalculateGeometryData(ShapeFunctionDerivativesArrayType &rDN_DX, Matrix &rNContainer, Vector &rGaussWeights)
Determine integration point weights and shape funcition derivatives from the element's geometry.
Definition: updated_lagrangian_element.cpp:492
Element::Pointer Clone(IndexType NewId, NodesArrayType const &ThisNodes) const override
It creates a new element pointer and clones the previous element data.
Definition: updated_lagrangian_element.cpp:33
double mMaterialVolumetricCoefficient
Definition: updated_lagrangian_element.h:331
virtual void ComputeLumpedMassMatrix(Matrix &rMassMatrix, const double Weight, double &MeanValue)
Definition: updated_lagrangian_element.h:451
void CalcVelDefGradAndInverse(const ShapeFunctionDerivativesType &rDN_DX, MatrixType &FgradVel, MatrixType &invFgradVel, double &FVelJacobian, const double theta)
Definition: updated_lagrangian_element.cpp:692
virtual void CalculateLocalMomentumEquations(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
Definition: updated_lagrangian_element.h:347
virtual double GetThetaMomentum()
Definition: updated_lagrangian_element.h:359
void PressureEquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const
Definition: updated_lagrangian_element.cpp:114
std::size_t IndexType
Definition: updated_lagrangian_element.h:121
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Checks the input and that all required Kratos variables have been registered.
Definition: updated_lagrangian_element.h:298
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
ModelPart::NodesContainerType NodesArrayType
Definition: gid_gauss_point_container.h:42
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
a
Definition: generate_stokes_twofluid_element.py:77
b
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:31
c
Definition: generate_weakly_compressible_navier_stokes_element.py:108
def load(f)
Definition: ode_solve.py:307
int d
Definition: ode_solve.py:397
integer i
Definition: TensorModule.f:17
Definition: updated_lagrangian_element.h:74