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_W_element.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosPfemSolidMechanicsApplication $
3 // Created by: $Author: PNavas $
4 // Last modified by: $Co-Author: LMonforte $
5 // Date: $Date: October 2017 $
6 // Revision: $Revision: -0.1 $
7 //
8 //
9 
10 #if !defined(KRATOS_UPDATED_LAGRANGIAN_U_W_ELEMENT_H_INCLUDED )
11 #define KRATOS_UPDATED_LAGRANGIAN_U_W_ELEMENT_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
19 
20 namespace Kratos
21 {
36 
38 
39 
40 class KRATOS_API(PFEM_SOLID_MECHANICS_APPLICATION) UpdatedLagrangianUWElement
42 {
43 public:
44 
50  typedef ConstitutiveLawType::Pointer ConstitutiveLawPointerType;
59 
63 
66 
69 
71  UpdatedLagrangianUWElement(IndexType NewId, GeometryType::Pointer pGeometry);
72 
73  UpdatedLagrangianUWElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
74 
77 
78 
80  virtual ~UpdatedLagrangianUWElement();
81 
85 
88 
89 
93 
104  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override;
105 
113  Element::Pointer Clone(IndexType NewId, NodesArrayType const& ThisNodes) const override;
114 
115  //************* GETTING METHODS
116 
117  //GET:
118 
122  void GetValueOnIntegrationPoints(const Variable<double>& rVariable, std::vector<double>& rValues, const ProcessInfo& rCurrentProcessInfo) override;
123 
124  void GetValueOnIntegrationPoints(const Variable<Vector>& rVariable, std::vector<Vector>& rValues, const ProcessInfo& rCurrentProcessInfo) override;
125 
126  void GetValueOnIntegrationPoints( const Variable<Matrix>& rVariable, std::vector<Matrix>& rValue, const ProcessInfo& rCurrentProcessInfo) override;
127 
128  //************* STARTING - ENDING METHODS
129 
130 
134  void GetDofList(DofsVectorType& rElementalDofList, ProcessInfo& rCurrentProcessInfo) override;
135 
139  void EquationIdVector(EquationIdVectorType& rResult, ProcessInfo& rCurrentProcessInfo) override;
140 
144  void GetValuesVector(Vector& rValues, int Step = 0) const override;
145 
149  void GetFirstDerivativesVector(Vector& rValues, int Step = 0) const override;
150 
154  void GetSecondDerivativesVector(Vector& rValues, int Step = 0) const override;
155 
156 
157  //************************************************************************************
158  //************************************************************************************
166  int Check(const ProcessInfo& rCurrentProcessInfo) override;
167 
168 
175  void CalculateMassMatrix(MatrixType& rMassMatrix,
176  ProcessInfo& rCurrentProcessInfo) override;
177 
184  void CalculateDampingMatrix(MatrixType& rDampingMatrix,
185  ProcessInfo& rCurrentProcessInfo) override;
186 
190 
201 protected:
207 
208 
209  /****
210  the time step (requiered). It shall be somewhere else.
211  ****/
212  double mTimeStep;
213 
217 
221 
222 
227  virtual void CalculateAndAddLHS(LocalSystemComponents& rLocalSystem,
228  ElementDataType& rVariables,
229  double& rIntegrationWeight) override;
230 
234  virtual void CalculateAndAddKuum(MatrixType& rK,
235  ElementDataType & rVariables,
236  double& rIntegrationWeight
237  ) override;
241  virtual void CalculateAndAddKww(MatrixType& rK,
242  ElementDataType & rVariables,
243  double& rIntegrationWeight
244  );
245 
250  virtual void CalculateAndAddRHS(LocalSystemComponents& rLocalSystem,
251  ElementDataType& rVariables,
252  Vector& rVolumeForce,
253  double& rIntegrationWeight) override;
254 
258  virtual void CalculateAndAddInternalForces(VectorType& rRightHandSideVector,
259  ElementDataType & rVariables,
260  double& rIntegrationWeight
261  ) override;
262 
266  virtual void CalculateAndAddExternalForces(VectorType& rRightHandSideVector,
267  ElementDataType & rVariables,
268  Vector & rVolumeForces,
269  double& rIntegrationWeight
270  ) override;
274  virtual void CalculateAndAddExternalWaterForces(VectorType& rRightHandSideVector,
275  ElementDataType & rVariables,
276  Vector & rVolumeForces,
277  double& rIntegrationWeight
278  );
282  void CalculateAndAddWaterPressureForces(VectorType& rRightHandSideVector,
283  ElementDataType & rVariables,
284  double& rIntegrationWeight
285  );
286 
287 
288 
292  virtual void InitializeElementData(ElementDataType & rVariables, const ProcessInfo& rCurrentProcessInfo) override;
293 
294 
295 
299  void InitializeSystemMatrices(MatrixType& rLeftHandSideMatrix,
300  VectorType& rRightHandSideVector,
301  Flags& rCalculationFlags) override;
302 
303  //on integration points:
307  void CalculateOnIntegrationPoints(const Variable<double>& rVariable, std::vector<double>& rOutput, const ProcessInfo& rCurrentProcessInfo) override;
308 
309  void CalculateOnIntegrationPoints(const Variable<Vector>& rVariable, std::vector<Vector>& rOutput, const ProcessInfo& rCurrentProcessInfo) override;
310 
311  void CalculateOnIntegrationPoints(const Variable<Matrix>& rVariable, std::vector<Matrix>& rOutput, const ProcessInfo& rCurrentProcessInfo) override;
312 
313  void CalculateB2Matrix( Matrix & rB2, const Matrix& rDN_DX);
314 
315 
316  double & CalculateGaussPointWaterPressure( ElementDataType & rVariables, double & rWaterPressure);
317 
328 
329 private:
330 
336 
337 
341 
342 
346 
347 
352 
356  friend class Serializer;
357 
358  // A private default constructor necessary for serialization
359 
360  virtual void save(Serializer& rSerializer) const override;
361 
362  virtual void load(Serializer& rSerializer) override;
363 
364 
371 
372 
373 }; // Class UpdatedLagrangianUWElement
374 
375 
376 
377 } // namespace Kratos
378 #endif // KRATOS_UPDATED_LAGRANGIAN_U_W_ELEMENT_H_INCLUDED
379 
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
std::size_t SizeType
Definition: geometry_data.h:173
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
A stabilized element for the incompressible Navier-Stokes equations.
Definition: updated_lagrangian_element.h:64
Updated Lagrangian Large Displacement Lagrangian U-W Element for 3D and 2D geometries....
Definition: updated_lagrangian_U_W_element.hpp:42
double mTimeStep
Definition: updated_lagrangian_U_W_element.hpp:212
GeometryData::IntegrationMethod IntegrationMethod
Type definition for integration methods.
Definition: updated_lagrangian_U_W_element.hpp:54
UpdatedLagrangianElement::ElementDataType ElementDataType
Type for element variables.
Definition: updated_lagrangian_U_W_element.hpp:58
ConstitutiveLaw ConstitutiveLawType
Definition: updated_lagrangian_U_W_element.hpp:48
GeometryData::SizeType SizeType
Type for size.
Definition: updated_lagrangian_U_W_element.hpp:56
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(UpdatedLagrangianUWElement)
Counted pointer of LargeDisplacementUPElement.
ConstitutiveLawType::Pointer ConstitutiveLawPointerType
Pointer type for constitutive laws.
Definition: updated_lagrangian_U_W_element.hpp:50
ConstitutiveLawType::StressMeasure StressMeasureType
StressMeasure from constitutive laws.
Definition: updated_lagrangian_U_W_element.hpp:52
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