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_U_J_element.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosPfemSolidMechanicsApplication $
3 // Created by: $Author: LMonforte $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: July 2015 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_UPDATED_LAGRANGIAN_U_J_ELEMENT_H_INCLUDED )
11 #define KRATOS_UPDATED_LAGRANGIAN_U_J_ELEMENT_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
19 
21 
22 namespace Kratos
23 {
38 
40 
41 
42  class KRATOS_API(PFEM_SOLID_MECHANICS_APPLICATION) UpdatedLagrangianUJElement
44  {
45  public:
46 
52  typedef ConstitutiveLawType::Pointer ConstitutiveLawPointerType;
61 
65 
68 
71 
73  UpdatedLagrangianUJElement(IndexType NewId, GeometryType::Pointer pGeometry);
74 
75  UpdatedLagrangianUJElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
76 
79 
80 
82  virtual ~UpdatedLagrangianUJElement();
83 
87 
90 
91 
95 
106  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override;
107 
115  Element::Pointer Clone(IndexType NewId, NodesArrayType const& ThisNodes) const override;
116 
117  //************* GETTING METHODS
118 
119  //SET
120 
124  void SetValuesOnIntegrationPoints(const Variable<double>& rVariable, std::vector<double>& rValues, const ProcessInfo& rCurrentProcessInfo) override;
125 
126 
127  //GET:
128 
132  void GetValueOnIntegrationPoints(const Variable<double>& rVariable, std::vector<double>& rValues, const ProcessInfo& rCurrentProcessInfo) override;
133 
134  void GetValueOnIntegrationPoints(const Variable<Vector>& rVariable, std::vector<Vector>& rValues, const ProcessInfo& rCurrentProcessInfo) override;
135 
136  void GetValueOnIntegrationPoints( const Variable<Matrix>& rVariable, std::vector<Matrix>& rValue, const ProcessInfo& rCurrentProcessInfo) override;
137 
138  //************* STARTING - ENDING METHODS
139 
144  void Initialize() override;
145 
146  /*
147  * Called at the beginning of each solution step
148  */
149 
150  void InitializeSolutionStep( ProcessInfo& rCurrentProcessInfo) override;
151 
155  void GetDofList(DofsVectorType& rElementalDofList, ProcessInfo& rCurrentProcessInfo) override;
156 
160  void EquationIdVector(EquationIdVectorType& rResult, ProcessInfo& rCurrentProcessInfo) override;
161 
165  void GetValuesVector(Vector& rValues, int Step = 0) const override;
166 
170  void GetFirstDerivativesVector(Vector& rValues, int Step = 0) const override;
171 
175  void GetSecondDerivativesVector(Vector& rValues, int Step = 0) const override;
176 
180  void FinalizeSolutionStep(ProcessInfo& rCurrentProcessInfo) override;
181 
182  //************* COMPUTING METHODS
183 
190  void CalculateMassMatrix(MatrixType& rMassMatrix, ProcessInfo& rCurrentProcessInfo) override;
191 
198  void CalculateDampingMatrix(MatrixType& rDampingMatrix, ProcessInfo& rCurrentProcessInfo) override;
199 
200 
201  //************************************************************************************
202  //************************************************************************************
210  int Check(const ProcessInfo& rCurrentProcessInfo) override;
211 
215  void CalculateKinematics(ElementDataType& rVariables,
216  const double& rPointNumber) override;
217 
218 
222  void CalculateDeformationGradient(const Matrix& rDN_DX,
223  Matrix& rF,
224  Matrix& rDeltaPosition);
225 
229  void CalculateDeformationMatrix(Matrix& rB,
230  Matrix& rF,
231  Matrix& rDN_DX);
232 
236 
247  protected:
253 
254 
258  std::vector< Matrix > mDeformationGradientF0;
259 
260 
265 
266  /****
267  * Some double member variable
268  ****/
270 
271 
275 
279  virtual SizeType GetDofsSize() const override;
280 
286  void CalculateElementalSystem(LocalSystemComponents& rLocalSystem,
287  ProcessInfo& rCurrentProcessInfo) override;
288 
292 
297  void CalculateAndAddLHS(LocalSystemComponents& rLocalSystem,
298  ElementDataType& rVariables,
299  double& rIntegrationWeight) override;
300 
305  void CalculateAndAddRHS(LocalSystemComponents& rLocalSystem,
306  ElementDataType& rVariables,
307  Vector& rVolumeForce,
308  double& rIntegrationWeight) override;
309 
313  void InitializeElementData(ElementDataType & rVariables, const ProcessInfo& rCurrentProcessInfo) override;
314 
318  void FinalizeStepVariables(ElementDataType & rVariables, const double& rPointNumber) override;
319 
320 
321 
325  void CalculateAndAddKuum(MatrixType& rK,
326  ElementDataType & rVariables,
327  double& rIntegrationWeight
328  ) override;
329 
333  void CalculateAndAddKuug(MatrixType& rK,
334  ElementDataType & rVariables,
335  double& rIntegrationWeight
336  ) override;
337 
341  virtual void CalculateAndAddKuJ (MatrixType& rK,
342  ElementDataType & rVariables,
343  double& rIntegrationWeight
344  );
345 
349  virtual void CalculateAndAddKJu(MatrixType& rK,
350  ElementDataType & rVariables,
351  double& rIntegrationWeight
352  );
353 
354 
358  virtual void CalculateAndAddKJJ(MatrixType& rK,
359  ElementDataType & rVariables,
360  double& rIntegrationWeight
361  );
362 
363 
367  virtual void CalculateAndAddKJJStab(MatrixType& rK, ElementDataType & rVariables,
368  double& rIntegrationWeight
369  );
373  void CalculateAndAddExternalForces(VectorType& rRightHandSideVector,
374  ElementDataType& rVariables,
375  Vector& rVolumeForce,
376  double& rIntegrationWeight
377  ) override;
378 
379 
383  virtual void CalculateAndAddJacobianForces(VectorType& rRightHandSideVector,
384  ElementDataType & rVariables,
385  double& rIntegrationWeight
386  );
387 
388 
392  virtual void CalculateAndAddStabilizedJacobian(VectorType& rRightHandSideVector,
393  ElementDataType & rVariables,
394  double& rIntegrationWeight
395  );
396 
400  void CalculateAndAddInternalForces(VectorType& rRightHandSideVector,
401  ElementDataType & rVariables,
402  double& rIntegrationWeight
403  ) override;
404 
405 
406  //on integration points:
410  void CalculateOnIntegrationPoints(const Variable<double>& rVariable, std::vector<double>& rOutput, const ProcessInfo& rCurrentProcessInfo) override;
411 
412  void CalculateOnIntegrationPoints(const Variable<Vector>& rVariable, std::vector<Vector>& rOutput, const ProcessInfo& rCurrentProcessInfo) override;
413 
414  void CalculateOnIntegrationPoints(const Variable<Matrix>& rVariable, std::vector<Matrix>& rOutput, const ProcessInfo& rCurrentProcessInfo) override;
415 
416 
420  void GetHistoricalVariables( ElementDataType& rVariables,
421  const double& rPointNumber ) override;
422 
426  double& CalculateVolumeChange(double& rVolumeChange, ElementDataType& rVariables) override;
427 
428  /*
429  * Function to modify the deformation gradient to the constitutitve equation
430  */
431  virtual void ComputeConstitutiveVariables( ElementDataType& rVariables, Matrix& rFT, double& rdetFT);
432 
443 
444  private:
445 
451 
452 
456 
457 
461 
462 
467 
471  friend class Serializer;
472 
473  // A private default constructor necessary for serialization
474 
475  void save(Serializer& rSerializer) const override;
476 
477  void load(Serializer& rSerializer) override;
478 
479 
486 
487 
488 }; // Class UpdatedLagrangianUJElement
489 
490 
491 
492 } // namespace Kratos
493 #endif // KRATOS_UPDATED_LAGRANGIAN_U_J_ELEMENT_H_INCLUDED
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Definition: constitutive_law.h:47
StressMeasure
Definition: constitutive_law.h:69
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
IntegrationMethod
Definition: geometry_data.h:76
std::size_t SizeType
Definition: geometry_data.h:173
Large Displacement Lagrangian Element for 3D and 2D geometries. (base class)
Definition: large_displacement_element.hpp:46
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
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Updated Lagrangian Large Displacement Lagrangian U-wP Element for 3D and 2D geometries....
Definition: updated_lagrangian_U_J_element.hpp:44
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(UpdatedLagrangianUJElement)
Counted pointer of LargeDisplacementUPElement.
double mElementStabilizationNumber
Definition: updated_lagrangian_U_J_element.hpp:269
Vector mDeterminantF0
Definition: updated_lagrangian_U_J_element.hpp:264
ConstitutiveLawType::StressMeasure StressMeasureType
StressMeasure from constitutive laws.
Definition: updated_lagrangian_U_J_element.hpp:54
GeometryData::IntegrationMethod IntegrationMethod
Type definition for integration methods.
Definition: updated_lagrangian_U_J_element.hpp:56
GeometryData::SizeType SizeType
Type for size.
Definition: updated_lagrangian_U_J_element.hpp:58
ConstitutiveLawType::Pointer ConstitutiveLawPointerType
Pointer type for constitutive laws.
Definition: updated_lagrangian_U_J_element.hpp:52
ConstitutiveLaw ConstitutiveLawType
Definition: updated_lagrangian_U_J_element.hpp:50
LargeDisplacementElement::ElementDataType ElementDataType
Type for element variables.
Definition: updated_lagrangian_U_J_element.hpp:60
std::vector< Matrix > mDeformationGradientF0
Definition: updated_lagrangian_U_J_element.hpp:258
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
void SetValuesOnIntegrationPoints(TObject &dummy, const Variable< TDataType > &rVariable, const std::vector< TDataType > &values, const ProcessInfo &rCurrentProcessInfo)
Definition: add_mesh_to_python.cpp:185
pybind11::list CalculateOnIntegrationPoints(TObject &dummy, const Variable< TDataType > &rVariable, const ProcessInfo &rProcessInfo)
Definition: add_mesh_to_python.cpp:142
void InitializeSolutionStep(ConstructionUtility &rThisUtil, std::string ThermalSubModelPartName, std::string MechanicalSubModelPartName, std::string HeatFluxSubModelPartName, std::string HydraulicPressureSubModelPartName, bool thermal_conditions, bool mechanical_conditions, int phase)
Definition: add_custom_utilities_to_python.cpp:45
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307
Definition: solid_element.hpp:83
Definition: solid_element.hpp:233