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.
base_solid_element.h
Go to the documentation of this file.
1 // KRATOS ___| | | |
2 // \___ \ __| __| | | __| __| | | __| _` | |
3 // | | | | | ( | | | | ( | |
4 // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS
5 //
6 // License: BSD License
7 // license: StructuralMechanicsApplication/license.txt
8 //
9 // Main authors: Riccardo Rossi
10 // Vicente Mataix Ferrandiz
11 // Alejandro Cornejo Velazquez
12 //
13 
14 #pragma once
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
21 #include "includes/define.h"
22 #include "includes/element.h"
26 #include "custom_utilities/structural_mechanics_element_utilities.h"
27 
28 namespace Kratos
29 {
30 
33 
37 
39  typedef std::size_t IndexType;
40 
42  typedef std::size_t SizeType;
43 
47 
51 
55 
64 class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) BaseSolidElement
65  : public Element
66 {
67 protected:
71  struct KinematicVariables
72  {
73  Vector N;
74  Matrix B;
75  double detF;
76  Matrix F;
77  double detJ0;
78  Matrix J0;
79  Matrix InvJ0;
80  Matrix DN_DX;
81  Vector Displacements;
82 
90  const SizeType StrainSize,
91  const SizeType Dimension,
92  const SizeType NumberOfNodes
93  )
94  {
95  detF = 1.0;
96  detJ0 = 1.0;
97  N = ZeroVector(NumberOfNodes);
98  B = ZeroMatrix(StrainSize, Dimension * NumberOfNodes);
99  F = IdentityMatrix(Dimension);
100  DN_DX = ZeroMatrix(NumberOfNodes, Dimension);
101  J0 = ZeroMatrix(Dimension, Dimension);
102  InvJ0 = ZeroMatrix(Dimension, Dimension);
103  Displacements = ZeroVector(Dimension * NumberOfNodes);
104  }
105  };
106 
110  struct ConstitutiveVariables
111  {
115 
120  ConstitutiveVariables(const SizeType StrainSize)
121  {
122  if (StrainVector.size() != StrainSize)
123  StrainVector.resize(StrainSize);
124 
125  if (StressVector.size() != StrainSize)
126  StressVector.resize(StrainSize);
127 
128  if (D.size1() != StrainSize || D.size2() != StrainSize)
129  D.resize(StrainSize, StrainSize);
130 
131  noalias(StrainVector) = ZeroVector(StrainSize);
132  noalias(StressVector) = ZeroVector(StrainSize);
133  noalias(D) = ZeroMatrix(StrainSize, StrainSize);
134  }
135  };
136 public:
137 
140 
143 
145  typedef ConstitutiveLawType::Pointer ConstitutiveLawPointerType;
146 
149 
152 
154  typedef Node NodeType;
155 
157  typedef Element BaseType;
158 
159  // Counted pointer of BaseSolidElement
161 
163 
167 
168  // Constructor void
170  {};
171 
172  // Constructor using an array of nodes
173  BaseSolidElement( IndexType NewId, GeometryType::Pointer pGeometry ):Element(NewId,pGeometry)
174  {};
175 
176  // Constructor using an array of nodes with properties
177  BaseSolidElement( IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties ):Element(NewId,pGeometry,pProperties)
178  {
179  // This is needed to prevent uninitialised integration method in inactive elements
180  mThisIntegrationMethod = GetGeometry().GetDefaultIntegrationMethod();
181  };
182 
183  // Copy constructor
185  :BaseType(rOther)
186  ,mThisIntegrationMethod(rOther.mThisIntegrationMethod)
187  {};
188 
189  // Destructor
190  ~BaseSolidElement() override
191  {};
192 
196 
200 
205  void Initialize(const ProcessInfo& rCurrentProcessInfo) override;
206 
210  void ResetConstitutiveLaw() override;
211 
216  void InitializeSolutionStep(const ProcessInfo& rCurrentProcessInfo) override;
217 
222  void InitializeNonLinearIteration(const ProcessInfo& rCurrentProcessInfo) override;
223 
228  void FinalizeNonLinearIteration(const ProcessInfo& rCurrentProcessInfo) override;
229 
234  void FinalizeSolutionStep(const ProcessInfo& rCurrentProcessInfo) override;
235 
243  Element::Pointer Clone (
244  IndexType NewId,
245  NodesArrayType const& rThisNodes
246  ) const override;
247 
254  EquationIdVectorType& rResult,
255  const ProcessInfo& rCurrentProcessInfo
256  ) const override;
257 
264  DofsVectorType& rElementalDofList,
265  const ProcessInfo& rCurrentProcessInfo
266  ) const override;
267 
273  {
274  return mThisIntegrationMethod;
275  }
276 
282  bool virtual UseGeometryIntegrationMethod() const
283  {
284  return true;
285  }
286 
288  {
289  return GetGeometry().IntegrationPoints();
290  }
291 
293  {
294  return GetGeometry().IntegrationPoints(ThisMethod);
295  }
296 
297  const virtual Matrix& ShapeFunctionsValues(IntegrationMethod ThisMethod) const
298  {
299  return GetGeometry().ShapeFunctionsValues(ThisMethod);
300  }
301 
302 
309  Vector& rValues,
310  int Step = 0
311  ) const override;
312 
319  Vector& rValues,
320  int Step = 0
321  ) const override;
322 
329  Vector& rValues,
330  int Step = 0
331  ) const override;
332 
341  MatrixType& rLeftHandSideMatrix,
342  VectorType& rRightHandSideVector,
343  const ProcessInfo& rCurrentProcessInfo
344  ) override;
345 
352  MatrixType& rLeftHandSideMatrix,
353  const ProcessInfo& rCurrentProcessInfo
354  ) override;
355 
362  VectorType& rRightHandSideVector,
363  const ProcessInfo& rCurrentProcessInfo
364  ) override;
365 
376  const VectorType& rRHSVector,
377  const Variable<VectorType>& rRHSVariable,
378  const Variable<double >& rDestinationVariable,
379  const ProcessInfo& rCurrentProcessInfo
380  ) override;
381 
391  void AddExplicitContribution(const VectorType& rRHSVector,
392  const Variable<VectorType>& rRHSVariable,
393  const Variable<array_1d<double, 3> >& rDestinationVariable,
394  const ProcessInfo& rCurrentProcessInfo
395  ) override;
396 
403  MatrixType& rMassMatrix,
404  const ProcessInfo& rCurrentProcessInfo
405  ) override;
406 
413  MatrixType& rDampingMatrix,
414  const ProcessInfo& rCurrentProcessInfo
415  ) override;
416 
424  const Variable<bool>& rVariable,
425  std::vector<bool>& rOutput,
426  const ProcessInfo& rCurrentProcessInfo
427  ) override;
428 
436  const Variable<int>& rVariable,
437  std::vector<int>& rOutput,
438  const ProcessInfo& rCurrentProcessInfo
439  ) override;
440 
448  const Variable<double>& rVariable,
449  std::vector<double>& rOutput,
450  const ProcessInfo& rCurrentProcessInfo
451  ) override;
452 
460  const Variable<array_1d<double, 3>>& rVariable,
461  std::vector<array_1d<double, 3>>& rOutput,
462  const ProcessInfo& rCurrentProcessInfo
463  ) override;
464 
472  const Variable<array_1d<double, 6>>& rVariable,
473  std::vector<array_1d<double, 6>>& rOutput,
474  const ProcessInfo& rCurrentProcessInfo
475  ) override;
476 
484  const Variable<Vector>& rVariable,
485  std::vector<Vector>& rOutput,
486  const ProcessInfo& rCurrentProcessInfo
487  ) override;
488 
496  const Variable<Matrix>& rVariable,
497  std::vector<Matrix>& rOutput,
498  const ProcessInfo& rCurrentProcessInfo
499  ) override;
500 
508  const Variable<ConstitutiveLaw::Pointer>& rVariable,
509  std::vector<ConstitutiveLaw::Pointer>& rValues,
510  const ProcessInfo& rCurrentProcessInfo
511  ) override;
512 
520  const Variable<bool>& rVariable,
521  const std::vector<bool>& rValues,
522  const ProcessInfo& rCurrentProcessInfo
523  ) override;
524 
532  const Variable<int>& rVariable,
533  const std::vector<int>& rValues,
534  const ProcessInfo& rCurrentProcessInfo
535  ) override;
536 
544  const Variable<double>& rVariable,
545  const std::vector<double>& rValues,
546  const ProcessInfo& rCurrentProcessInfo
547  ) override;
548 
556  const Variable<Vector>& rVariable,
557  const std::vector<Vector>& rValues,
558  const ProcessInfo& rCurrentProcessInfo
559  ) override;
560 
568  const Variable<Matrix>& rVariable,
569  const std::vector<Matrix>& rValues,
570  const ProcessInfo& rCurrentProcessInfo
571  ) override;
572 
580  const Variable<ConstitutiveLaw::Pointer>& rVariable,
581  const std::vector<ConstitutiveLaw::Pointer>& rValues,
582  const ProcessInfo& rCurrentProcessInfo
583  ) override;
584 
592  const Variable<array_1d<double, 3>>& rVariable,
593  const std::vector<array_1d<double, 3>>& rValues,
594  const ProcessInfo& rCurrentProcessInfo
595  ) override;
596 
604  const Variable<array_1d<double, 6>>& rVariable,
605  const std::vector<array_1d<double, 6>>& rValues,
606  const ProcessInfo& rCurrentProcessInfo
607  ) override;
608 
616  int Check( const ProcessInfo& rCurrentProcessInfo ) const override;
617 
621 
622 
626 
627 
631 
637  const Parameters GetSpecifications() const override;
638 
640  std::string Info() const override
641  {
642  std::stringstream buffer;
643  buffer << "Base Solid Element #" << Id() << "\nConstitutive law: " << mConstitutiveLawVector[0]->Info();
644  return buffer.str();
645  }
646 
648  void PrintInfo(std::ostream& rOStream) const override
649  {
650  rOStream << "Base Solid Element #" << Id() << "\nConstitutive law: " << mConstitutiveLawVector[0]->Info();
651  }
652 
654  void PrintData(std::ostream& rOStream) const override
655  {
656  pGetGeometry()->PrintData(rOStream);
657  }
658 
662 
663 protected:
664 
667 
671 
672  IntegrationMethod mThisIntegrationMethod;
673 
674  std::vector<ConstitutiveLaw::Pointer> mConstitutiveLawVector;
675 
679 
683 
688  void SetIntegrationMethod(const IntegrationMethod& ThisIntegrationMethod)
689  {
690  mThisIntegrationMethod = ThisIntegrationMethod;
691  }
692 
697  void SetConstitutiveLawVector(const std::vector<ConstitutiveLaw::Pointer>& ThisConstitutiveLawVector)
698  {
699  mConstitutiveLawVector = ThisConstitutiveLawVector;
700  }
701 
705  virtual void InitializeMaterial();
706 
711 
715  virtual bool UseElementProvidedStrain() const;
716 
725  virtual void CalculateAll(
726  MatrixType& rLeftHandSideMatrix,
727  VectorType& rRightHandSideVector,
728  const ProcessInfo& rCurrentProcessInfo,
729  const bool CalculateStiffnessMatrixFlag,
730  const bool CalculateResidualVectorFlag
731  );
732 
740  KinematicVariables& rThisKinematicVariables,
741  const IndexType PointNumber,
742  const GeometryType::IntegrationMethod& rIntegrationMethod
743  );
744 
754  KinematicVariables& rThisKinematicVariables,
755  ConstitutiveVariables& rThisConstitutiveVariables,
757  const IndexType PointNumber,
758  const GeometryType::IntegrationPointsArrayType& IntegrationPoints
759  );
760 
770  virtual void CalculateConstitutiveVariables(
771  KinematicVariables& rThisKinematicVariables,
772  ConstitutiveVariables& rThisConstitutiveVariables,
774  const IndexType PointNumber,
775  const GeometryType::IntegrationPointsArrayType& IntegrationPoints,
777  const bool IsElementRotated = true
778  );
779 
785  Matrix& CalculateDeltaDisplacement(Matrix& DeltaDisplacement) const;
786 
797  Matrix& rJ0,
798  Matrix& rInvJ0,
799  Matrix& rDN_DX,
800  const IndexType PointNumber,
801  IntegrationMethod ThisIntegrationMethod
802  ) const;
803 
814  Matrix& rJ,
815  Matrix& rInvJ,
816  Matrix& rDN_DX,
817  const IndexType PointNumber,
818  IntegrationMethod ThisIntegrationMethod
819  ) const;
820 
828  const GeometryType::IntegrationPointsArrayType& IntegrationPoints,
829  const IndexType PointNumber
830  ) const;
831 
839  virtual void CalculateAndAddKm(
840  MatrixType& rLeftHandSideMatrix,
841  const Matrix& B,
842  const Matrix& D,
843  const double IntegrationWeight
844  ) const;
845 
854  MatrixType& rLeftHandSideMatrix,
855  const Matrix& DN_DX,
856  const Vector& rStressVector,
857  const double IntegrationWeight
858  ) const;
859 
870  VectorType& rRightHandSideVector,
871  const KinematicVariables& rThisKinematicVariables,
872  const ProcessInfo& rCurrentProcessInfo,
873  const array_1d<double, 3>& rBodyForce,
874  const Vector& rStressVector,
875  const double IntegrationWeight
876  ) const;
877 
887  const Vector& rN,
888  const ProcessInfo& rCurrentProcessInfo,
889  const array_1d<double, 3>& rBodyForce,
890  VectorType& rRightHandSideVector,
891  const double IntegrationWeight
892  ) const;
893 
900  virtual double GetIntegrationWeight(
901  const GeometryType::IntegrationPointsArrayType& rThisIntegrationPoints,
902  const IndexType PointNumber,
903  const double detJ
904  ) const;
905 
912 
917  virtual bool IsElementRotated() const;
918 
925  void RotateToLocalAxes(
927  KinematicVariables& rThisKinematicVariables);
928 
935  void RotateToGlobalAxes(
937  KinematicVariables& rThisKinematicVariables);
938 
942 
946 
950 
951 private:
954 
958 
962 
966 
972  void CalculateLumpedMassVector(
973  VectorType& rLumpedMassVector,
974  const ProcessInfo& rCurrentProcessInfo
975  ) const override;
976 
982  void CalculateDampingMatrixWithLumpedMass(
983  MatrixType& rDampingMatrix,
984  const ProcessInfo& rCurrentProcessInfo
985  );
986 
994  template<class TType>
995  void GetValueOnConstitutiveLaw(
996  const Variable<TType>& rVariable,
997  std::vector<TType>& rOutput
998  )
999  {
1000  const GeometryType::IntegrationPointsArrayType& integration_points = GetGeometry().IntegrationPoints( this->GetIntegrationMethod() );
1001 
1002  for ( IndexType point_number = 0; point_number <integration_points.size(); ++point_number ) {
1003  mConstitutiveLawVector[point_number]->GetValue( rVariable,rOutput[point_number]);
1004  }
1005  }
1006 
1010  void BuildRotationSystem(
1011  BoundedMatrix<double, 3, 3> &rRotationMatrix,
1012  const SizeType StrainSize);
1013 
1022  template<class TType>
1023  void CalculateOnConstitutiveLaw(
1024  const Variable<TType>& rVariable,
1025  std::vector<TType>& rOutput,
1026  const ProcessInfo& rCurrentProcessInfo
1027  )
1028  {
1029  const bool is_rotated = IsElementRotated();
1030  const GeometryType::IntegrationPointsArrayType& integration_points = GetGeometry().IntegrationPoints( this->GetIntegrationMethod() );
1031 
1032  const SizeType number_of_nodes = GetGeometry().size();
1033  const SizeType dimension = GetGeometry().WorkingSpaceDimension();
1034  const SizeType strain_size = mConstitutiveLawVector[0]->GetStrainSize();
1035 
1036  KinematicVariables this_kinematic_variables(strain_size, dimension, number_of_nodes);
1037  ConstitutiveVariables this_constitutive_variables(strain_size);
1038 
1039  // Create constitutive law parameters:
1040  ConstitutiveLaw::Parameters Values(GetGeometry(),GetProperties(),rCurrentProcessInfo);
1041 
1042  // Set constitutive law flags:
1043  Flags& ConstitutiveLawOptions=Values.GetOptions();
1044  ConstitutiveLawOptions.Set(ConstitutiveLaw::USE_ELEMENT_PROVIDED_STRAIN, UseElementProvidedStrain());
1045  ConstitutiveLawOptions.Set(ConstitutiveLaw::COMPUTE_STRESS, true);
1046  ConstitutiveLawOptions.Set(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR, false);
1047 
1048  Values.SetStrainVector(this_constitutive_variables.StrainVector);
1049 
1050  for (IndexType point_number = 0; point_number < integration_points.size(); ++point_number) {
1051  // Compute element kinematics B, F, DN_DX ...
1052  this->CalculateKinematicVariables(this_kinematic_variables, point_number, this->GetIntegrationMethod());
1053 
1054  // Compute material reponse
1055  this->SetConstitutiveVariables(this_kinematic_variables, this_constitutive_variables, Values, point_number, integration_points);
1056 
1057  // rotate to local axes strain/F
1058  if (is_rotated)
1059  RotateToLocalAxes(Values, this_kinematic_variables);
1060 
1061  rOutput[point_number] = mConstitutiveLawVector[point_number]->CalculateValue( Values, rVariable, rOutput[point_number] );
1062  }
1063  }
1064 
1068 
1072 
1076 
1077  friend class Serializer;
1078 
1079  void save( Serializer& rSerializer ) const override;
1080 
1081  void load( Serializer& rSerializer ) override;
1082 
1083 }; // class BaseSolidElement.
1084 
1088 
1089 
1093 
1094 } // namespace Kratos.
This is base class used to define the solid elements.
Definition: base_solid_element.h:67
void SetValuesOnIntegrationPoints(const Variable< Vector > &rVariable, const std::vector< Vector > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Set a Vector Value on the Element Constitutive Law.
virtual double GetIntegrationWeight(const GeometryType::IntegrationPointsArrayType &rThisIntegrationPoints, const IndexType PointNumber, const double detJ) const
This functions computes the integration weight to consider.
ConstitutiveLaw ConstitutiveLawType
Reference type definition for constitutive laws.
Definition: base_solid_element.h:142
virtual const GeometryType::IntegrationPointsArrayType IntegrationPoints(IntegrationMethod ThisMethod) const
Definition: base_solid_element.h:292
virtual void SetConstitutiveVariables(KinematicVariables &rThisKinematicVariables, ConstitutiveVariables &rThisConstitutiveVariables, ConstitutiveLaw::Parameters &rValues, const IndexType PointNumber, const GeometryType::IntegrationPointsArrayType &IntegrationPoints)
This functions updates the data structure passed to the CL.
Element::Pointer Clone(IndexType NewId, NodesArrayType const &rThisNodes) const override
It creates a new element pointer and clones the previous element data.
void SetValuesOnIntegrationPoints(const Variable< double > &rVariable, const std::vector< double > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Set a double Value on the Element Constitutive Law.
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(BaseSolidElement)
BaseSolidElement(BaseSolidElement const &rOther)
Definition: base_solid_element.h:184
void CalculateOnIntegrationPoints(const Variable< Vector > &rVariable, std::vector< Vector > &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Calculate a Vector Variable on the Element Constitutive Law.
ConstitutiveLawType::StressMeasure StressMeasureType
StressMeasure from constitutive laws.
Definition: base_solid_element.h:148
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: base_solid_element.h:648
void AddExplicitContribution(const VectorType &rRHSVector, const Variable< VectorType > &rRHSVariable, const Variable< double > &rDestinationVariable, const ProcessInfo &rCurrentProcessInfo) override
This function is designed to make the element to assemble an rRHS vector identified by a variable rRH...
void CalculateMassMatrix(MatrixType &rMassMatrix, const ProcessInfo &rCurrentProcessInfo) override
This is called during the assembling process in order to calculate the elemental mass matrix.
void ResetConstitutiveLaw() override
This resets the constitutive law.
std::string Info() const override
Turn back information as a string.
Definition: base_solid_element.h:640
void CalculateOnIntegrationPoints(const Variable< Matrix > &rVariable, std::vector< Matrix > &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Calculate a Matrix Variable on the Element Constitutive Law.
void InitializeSolutionStep(const ProcessInfo &rCurrentProcessInfo) override
Called at the beginning of each solution step.
virtual void CalculateKinematicVariables(KinematicVariables &rThisKinematicVariables, const IndexType PointNumber, const GeometryType::IntegrationMethod &rIntegrationMethod)
This functions updates the kinematics variables.
void CalculateShapeGradientOfMassMatrix(MatrixType &rMassMatrix, ShapeParameter Deriv) const
This function computes the shape gradient of mass matrix.
void SetValuesOnIntegrationPoints(const Variable< int > &rVariable, const std::vector< int > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Set a int Value on the Element Constitutive Law.
Matrix & CalculateDeltaDisplacement(Matrix &DeltaDisplacement) const
This methods gives us a matrix with the increment of displacement.
virtual void CalculateAndAddResidualVector(VectorType &rRightHandSideVector, const KinematicVariables &rThisKinematicVariables, const ProcessInfo &rCurrentProcessInfo, const array_1d< double, 3 > &rBodyForce, const Vector &rStressVector, const double IntegrationWeight) const
Calculation of the RHS.
~BaseSolidElement() override
Definition: base_solid_element.h:190
void SetValuesOnIntegrationPoints(const Variable< ConstitutiveLaw::Pointer > &rVariable, const std::vector< ConstitutiveLaw::Pointer > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Set a Constitutive Law Value on the Element.
Element BaseType
The base element type.
Definition: base_solid_element.h:157
Node NodeType
This is the definition of the node.
Definition: base_solid_element.h:154
virtual ConstitutiveLaw::StressMeasure GetStressMeasure() const
Gives the StressMeasure used.
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Sets on rResult the ID's of the element degrees of freedom.
void CalculateOnIntegrationPoints(const Variable< double > &rVariable, std::vector< double > &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Calculate a double Variable on the Element Constitutive Law.
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
This is called during the assembling process in order to calculate the elemental right hand side vect...
void CalculateOnIntegrationPoints(const Variable< bool > &rVariable, std::vector< bool > &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Calculate a boolean Variable on the Element Constitutive Law.
virtual bool UseElementProvidedStrain() const
This method returns if the element provides the strain.
double CalculateDerivativesOnCurrentConfiguration(Matrix &rJ, Matrix &rInvJ, Matrix &rDN_DX, const IndexType PointNumber, IntegrationMethod ThisIntegrationMethod) const
This functions calculate the derivatives in the current frame.
BaseSolidElement(IndexType NewId, GeometryType::Pointer pGeometry)
Definition: base_solid_element.h:173
virtual bool UseGeometryIntegrationMethod() const
Definition: base_solid_element.h:282
void GetSecondDerivativesVector(Vector &rValues, int Step=0) const override
Sets on rValues the nodal accelerations.
BaseSolidElement()
Definition: base_solid_element.h:169
void SetValuesOnIntegrationPoints(const Variable< array_1d< double, 3 >> &rVariable, const std::vector< array_1d< double, 3 >> &rValues, const ProcessInfo &rCurrentProcessInfo) override
Set a array of 3 compoenents Value on the Element.
void CalculateOnIntegrationPoints(const Variable< array_1d< double, 6 >> &rVariable, std::vector< array_1d< double, 6 >> &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Calculate a 6 components array_1d on the Element Constitutive Law.
virtual void InitializeMaterial()
It initializes the material.
ConstitutiveLawType::Pointer ConstitutiveLawPointerType
Pointer type for constitutive laws.
Definition: base_solid_element.h:145
void Initialize(const ProcessInfo &rCurrentProcessInfo) override
Called to initialize the element.
void GetDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const override
Sets on rElementalDofList the degrees of freedom of the considered element geometry.
void AddExplicitContribution(const VectorType &rRHSVector, const Variable< VectorType > &rRHSVariable, const Variable< array_1d< double, 3 > > &rDestinationVariable, const ProcessInfo &rCurrentProcessInfo) override
This function is designed to make the element to assemble an rRHS vector identified by a variable rRH...
BaseSolidElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Definition: base_solid_element.h:177
void InitializeNonLinearIteration(const ProcessInfo &rCurrentProcessInfo) override
This is called for non-linear analysis at the beginning of the iteration process.
void CalculateOnIntegrationPoints(const Variable< ConstitutiveLaw::Pointer > &rVariable, std::vector< ConstitutiveLaw::Pointer > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Get on rVariable Constitutive Law from the element.
GeometryData::IntegrationMethod IntegrationMethod
Type definition for integration methods.
Definition: base_solid_element.h:151
void CalculateAndAddExtForceContribution(const Vector &rN, const ProcessInfo &rCurrentProcessInfo, const array_1d< double, 3 > &rBodyForce, VectorType &rRightHandSideVector, const double IntegrationWeight) const
This function add the external force contribution.
void SetValuesOnIntegrationPoints(const Variable< Matrix > &rVariable, const std::vector< Matrix > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Set a Matrix Value on the Element Constitutive Law.
void CalculateLeftHandSide(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
This is called during the assembling process in order to calculate the elemental left hand side matri...
int Check(const ProcessInfo &rCurrentProcessInfo) const override
This function provides the place to perform checks on the completeness of the input.
void SetConstitutiveLawVector(const std::vector< ConstitutiveLaw::Pointer > &ThisConstitutiveLawVector)
Sets the used constitutive laws.
Definition: base_solid_element.h:697
void FinalizeNonLinearIteration(const ProcessInfo &rCurrentProcessInfo) override
This is called for non-linear analysis at the beginning of the iteration process.
void SetValuesOnIntegrationPoints(const Variable< bool > &rVariable, const std::vector< bool > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Set a bool Value on the Element Constitutive Law.
void FinalizeSolutionStep(const ProcessInfo &rCurrentProcessInfo) override
Called at the end of eahc solution step.
virtual const GeometryType::IntegrationPointsArrayType IntegrationPoints() const
Definition: base_solid_element.h:287
IntegrationMethod GetIntegrationMethod() const override
Returns the used integration method.
Definition: base_solid_element.h:272
virtual void CalculateAndAddKm(MatrixType &rLeftHandSideMatrix, const Matrix &B, const Matrix &D, const double IntegrationWeight) const
Calculation of the Material Stiffness Matrix. Km = B^T * D *B.
virtual double CalculateDerivativesOnReferenceConfiguration(Matrix &rJ0, Matrix &rInvJ0, Matrix &rDN_DX, const IndexType PointNumber, IntegrationMethod ThisIntegrationMethod) const
This functions calculate the derivatives in the reference frame.
void CalculateOnIntegrationPoints(const Variable< array_1d< double, 3 >> &rVariable, std::vector< array_1d< double, 3 >> &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Calculate a 3 components array_1d on the Element Constitutive Law.
virtual array_1d< double, 3 > GetBodyForce(const GeometryType::IntegrationPointsArrayType &IntegrationPoints, const IndexType PointNumber) const
This function computes the body force.
void GetValuesVector(Vector &rValues, int Step=0) const override
Sets on rValues the nodal displacements.
void GetFirstDerivativesVector(Vector &rValues, int Step=0) const override
Sets on rValues the nodal velocities.
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: base_solid_element.h:654
virtual void CalculateAll(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo, const bool CalculateStiffnessMatrixFlag, const bool CalculateResidualVectorFlag)
This functions calculates both the RHS and the LHS.
void CalculateOnIntegrationPoints(const Variable< int > &rVariable, std::vector< int > &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Calculate a integer Variable on the Element Constitutive Law.
void CalculateDampingMatrix(MatrixType &rDampingMatrix, const ProcessInfo &rCurrentProcessInfo) override
This is called during the assembling process in order to calculate the elemental damping matrix.
void CalculateAndAddKg(MatrixType &rLeftHandSideMatrix, const Matrix &DN_DX, const Vector &rStressVector, const double IntegrationWeight) const
Calculation of the Geometric Stiffness Matrix. Kg = dB * S.
void SetIntegrationMethod(const IntegrationMethod &ThisIntegrationMethod)
Sets the used integration method.
Definition: base_solid_element.h:688
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
This function provides a more general interface to the element.
virtual const Matrix & ShapeFunctionsValues(IntegrationMethod ThisMethod) const
Definition: base_solid_element.h:297
Definition: constitutive_law.h:47
StressMeasure
Definition: constitutive_law.h:69
@ StressMeasure_PK2
Definition: constitutive_law.h:71
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
This defines the geometrical object, base definition of the element and condition entities.
Definition: geometrical_object.h:58
IntegrationMethod
Definition: geometry_data.h:76
std::vector< IntegrationPointType > IntegrationPointsArrayType
Definition: geometry.h:161
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
This class defines the node.
Definition: node.h:65
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
void SetValuesOnIntegrationPoints(TObject &dummy, const Variable< TDataType > &rVariable, const std::vector< TDataType > &values, const ProcessInfo &rCurrentProcessInfo)
Definition: add_mesh_to_python.cpp:185
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
Internals::Matrix< double, AMatrix::dynamic, 1 > Vector
Definition: amatrix_interface.h:472
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
Internals::Matrix< double, AMatrix::dynamic, AMatrix::dynamic > Matrix
Definition: amatrix_interface.h:470
std::size_t SizeType
The definition of the size type.
Definition: mortar_classes.h:43
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
int strain_size
Definition: generate_hyper_elastic_simo_taylor_neo_hookean.py:16
F
Definition: hinsberg_optimization.py:144
int dimension
Definition: isotropic_damage_automatic_differentiation.py:123
def load(f)
Definition: ode_solve.py:307
N
Definition: sensitivityMatrix.py:29
B
Definition: sensitivityMatrix.py:76
Definition: base_solid_element.h:112
ConstitutiveLaw::VoigtSizeMatrixType D
Definition: base_solid_element.h:114
ConstitutiveVariables(const SizeType StrainSize)
Definition: base_solid_element.h:120
ConstitutiveLaw::StressVectorType StressVector
Definition: base_solid_element.h:113
ConstitutiveLaw::StrainVectorType StrainVector
Definition: base_solid_element.h:112
Definition: base_solid_element.h:73
KinematicVariables(const SizeType StrainSize, const SizeType Dimension, const SizeType NumberOfNodes)
Definition: base_solid_element.h:89
Definition: constitutive_law.h:189
Definition: geometrical_sensitivity_utility.h:33