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_P_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_P_ELEMENT_H_INCLUDED )
11 #define KRATOS_UPDATED_LAGRANGIAN_U_J_P_ELEMENT_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
19 
21 
22 namespace Kratos
23 {
38 
41 
42 
43  class KRATOS_API(PFEM_SOLID_MECHANICS_APPLICATION) UpdatedLagrangianUJPElement
45  {
46 
47  protected:
48  typedef struct
49  {
50  unsigned int voigtsize;
51 
52  double Alpha;
53  double Beta;
54 
57 
58  double NodalJacobian;
59 
62 
64 
65  public:
66 
72  typedef ConstitutiveLawType::Pointer ConstitutiveLawPointerType;
77 
81 
84 
87 
89  UpdatedLagrangianUJPElement(IndexType NewId, GeometryType::Pointer pGeometry);
90 
91  UpdatedLagrangianUJPElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
92 
95 
96 
98  virtual ~UpdatedLagrangianUJPElement();
99 
103 
106 
107 
111 
122  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override;
123 
131  Element::Pointer Clone(IndexType NewId, NodesArrayType const& ThisNodes) const override;
132 
133  //************* GETTING METHODS
134 
135  //SET:
136 
137  //GET:
138 
142  void GetValueOnIntegrationPoints(const Variable<double>& rVariable, std::vector<double>& rValues, const ProcessInfo& rCurrentProcessInfo) override;
143 
144  void GetValueOnIntegrationPoints(const Variable<Vector>& rVariable, std::vector<Vector>& rValues, const ProcessInfo& rCurrentProcessInfo) override;
145 
146  void GetValueOnIntegrationPoints( const Variable<Matrix>& rVariable, std::vector<Matrix>& rValue, const ProcessInfo& rCurrentProcessInfo) override;
147 
148  //************* STARTING - ENDING METHODS
149 
150 
154  void GetDofList(DofsVectorType& rElementalDofList, ProcessInfo& rCurrentProcessInfo) override;
155 
159  void EquationIdVector(EquationIdVectorType& rResult, ProcessInfo& rCurrentProcessInfo) override;
160 
164  void GetValuesVector(Vector& rValues, int Step = 0) const override;
165 
169  void GetFirstDerivativesVector(Vector& rValues, int Step = 0) const override;
170 
174  void GetSecondDerivativesVector(Vector& rValues, int Step = 0) const override;
175 
176 
177  //************************************************************************************
178  //************************************************************************************
186  int Check(const ProcessInfo& rCurrentProcessInfo) override;
187 
188 
192 
203  protected:
209 
215 
219  //std::vector< Matrix > mDeformationGradientF0; // LMV: Crec que no cal
220 
224  //Vector mDeterminantF0; // LMV: Crec que no cal
225 
226 
230 
234 
239  void CalculateAndAddLHS(LocalSystemComponents& rLocalSystem,
240  ElementDataType& rVariables,
241  double& rIntegrationWeight) override;
242 
246  void InitializeElementData(ElementDataType & rVariables, const ProcessInfo& rCurrentProcessInfo) override;
247 
252  void CalculateAndAddRHS(LocalSystemComponents& rLocalSystem,
253  ElementDataType& rVariables,
254  Vector& rVolumeForce,
255  double& rIntegrationWeight) override;
256 
257 
261  void CalculateAndAddKuumElemUJP(MatrixType& rK,
262  ElementDataType & rVariables,
263  UJPElementData& rElementVariables,
264  double& rIntegrationWeight
265  );
266 
270  void CalculateAndAddKuugElemUJP(MatrixType& rK,
271  ElementDataType & rVariables,
272  UJPElementData& rElementVariables,
273  double& rIntegrationWeight
274  );
275 
279  void CalculateAndAddKuJElemUJP (MatrixType& rK,
280  ElementDataType & rVariables,
281  UJPElementData& rElementVariables,
282  double& rIntegrationWeight
283  );
287  void CalculateAndAddKup (MatrixType& rK,
288  ElementDataType & rVariables,
289  UJPElementData& rElementVariables,
290  double& rIntegrationWeight
291  );
295  void CalculateAndAddKJuElemUJP(MatrixType& rK,
296  ElementDataType & rVariables,
297  UJPElementData& rElementVariables,
298  double& rIntegrationWeight
299  );
303  void CalculateAndAddKJJElemUJP(MatrixType& rK,
304  ElementDataType & rVariables,
305  UJPElementData& rElementVariables,
306  double& rIntegrationWeight
307  );
311  void CalculateAndAddKJp(MatrixType& rK,
312  ElementDataType & rVariables,
313  UJPElementData& rElementVariables,
314  double& rIntegrationWeight
315  );
316 
320  void CalculateAndAddKpu(MatrixType& rK,
321  ElementDataType & rVariables,
322  UJPElementData& rElementVariables,
323  double& rIntegrationWeight
324  );
325 
329  void CalculateAndAddKpJ(MatrixType& rK,
330  ElementDataType & rVariables,
331  UJPElementData& rElementVariables,
332  double& rIntegrationWeight
333  );
334 
338  void CalculateAndAddKpp(MatrixType& rK,
339  ElementDataType & rVariables,
340  UJPElementData& rElementVariables,
341  double& rIntegrationWeight
342  );
343 
344 
348  void CalculateAndAddKppStab(MatrixType& rK,
349  ElementDataType & rVariables,
350  UJPElementData& rElementVariables,
351  double& rIntegrationWeight
352  );
356  void CalculateAndAddKJJStabElemUJP(MatrixType& rK,
357  ElementDataType & rVariables,
358  UJPElementData& rElementVariables,
359  double& rIntegrationWeight
360  );
361 
362 
366  void CalculateAndAddJacobianForcesElemUJP( VectorType& rRightHandSideVector,
367  ElementDataType & rVariables,
368  UJPElementData& rElementVariables,
369  double& rIntegrationWeight
370  );
371 
372 
373 
377  void CalculateAndAddPressureForces(VectorType& rRightHandSideVector,
378  ElementDataType & rVariables,
379  UJPElementData& rElementVariables,
380  double& rIntegrationWeight
381  );
382 
383 
387  void CalculateAndAddStabilizedPressure(VectorType& rRightHandSideVector,
388  ElementDataType & rVariables,
389  UJPElementData& rElementVariables,
390  double& rIntegrationWeight
391  );
392 
393 
397  void CalculateAndAddStabilizedJacobianElemUJP( VectorType& rRightHandSideVector,
398  ElementDataType & rVariables,
399  UJPElementData& rElementVariables,
400  double& rIntegrationWeight
401  );
402 
406  void CalculateAndAddInternalForcesElemUJP(VectorType& rRightHandSideVector,
407  ElementDataType & rVariables,
408  UJPElementData& rElementVariables,
409  double& rIntegrationWeight
410  );
411 
415  void InitializeSystemMatrices(MatrixType& rLeftHandSideMatrix,
416  VectorType& rRightHandSideVector,
417  Flags& rCalculationFlags) override;
418 
419  //on integration points:
423  void CalculateOnIntegrationPoints(const Variable<double>& rVariable, std::vector<double>& rOutput, const ProcessInfo& rCurrentProcessInfo) override;
424 
425  void CalculateOnIntegrationPoints(const Variable<Vector>& rVariable, std::vector<Vector>& rOutput, const ProcessInfo& rCurrentProcessInfo) override;
426 
427  void CalculateOnIntegrationPoints(const Variable<Matrix>& rVariable, std::vector<Matrix>& rOutput, const ProcessInfo& rCurrentProcessInfo) override;
428 
429 
430  /*
431  * Compute Some integration point variables only once
432  */
433  void CalculateThisElementData( UJPElementData& rElementVariables, const ElementDataType& rVariables);
444 
445  private:
446 
452 
453 
457 
458 
462 
463 
468 
472  friend class Serializer;
473 
474  // A private default constructor necessary for serialization
475 
476  void save(Serializer& rSerializer) const override;
477 
478  void load(Serializer& rSerializer) override;
479 
480 
487 
488 
489 }; // Class UpdatedLagrangianUJPElement
490 
491 
492 
493 } // namespace Kratos
494 #endif // KRATOS_UPDATED_LAGRANGIAN_U_J_P_ELEMENT_H_INCLUDED
495 
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Definition: constitutive_law.h:47
StressMeasure
Definition: constitutive_law.h:69
std::vector< DofType::Pointer > DofsVectorType
Definition: element.h:100
std::vector< std::size_t > EquationIdVectorType
Definition: element.h:98
Definition: flags.h:58
std::size_t IndexType
Definition: flags.h:74
IntegrationMethod
Definition: geometry_data.h:76
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
Definition: updated_lagrangian_U_J_P_element.hpp:45
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(UpdatedLagrangianUJPElement)
Counted pointer of LargeDisplacementUPElement.
double ScalingConstant2
Definition: updated_lagrangian_U_J_P_element.hpp:214
ConstitutiveLaw ConstitutiveLawType
Definition: updated_lagrangian_U_J_P_element.hpp:70
GeometryData::IntegrationMethod IntegrationMethod
Type definition for integration methods.
Definition: updated_lagrangian_U_J_P_element.hpp:76
double ScalingConstant1
Definition: updated_lagrangian_U_J_P_element.hpp:213
ConstitutiveLawType::StressMeasure StressMeasureType
StressMeasure from constitutive laws.
Definition: updated_lagrangian_U_J_P_element.hpp:74
ConstitutiveLawType::Pointer ConstitutiveLawPointerType
Pointer type for constitutive laws.
Definition: updated_lagrangian_U_J_P_element.hpp:72
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
pybind11::list CalculateOnIntegrationPoints(TObject &dummy, const Variable< TDataType > &rVariable, const ProcessInfo &rProcessInfo)
Definition: add_mesh_to_python.cpp:142
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
Definition: updated_lagrangian_U_J_P_element.hpp:49
double NodalMeanStress
Definition: updated_lagrangian_U_J_P_element.hpp:55
unsigned int voigtsize
Definition: updated_lagrangian_U_J_P_element.hpp:50
double Beta
Definition: updated_lagrangian_U_J_P_element.hpp:53
double Alpha
Definition: updated_lagrangian_U_J_P_element.hpp:52
Vector StressVectorEC
Definition: updated_lagrangian_U_J_P_element.hpp:61
Vector StressVector
Definition: updated_lagrangian_U_J_P_element.hpp:60
double ElementalMeanStress
Definition: updated_lagrangian_U_J_P_element.hpp:56
double NodalJacobian
Definition: updated_lagrangian_U_J_P_element.hpp:58