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_Pw_diff_order_element.hpp
Go to the documentation of this file.
1 // KRATOS___
2 // // ) )
3 // // ___ ___
4 // // ____ //___) ) // ) )
5 // // / / // // / /
6 // ((____/ / ((____ ((___/ / MECHANICS
7 //
8 // License: geo_mechanics_application/license.txt
9 //
10 // Main authors: Vahid Galavi
11 //
12 
13 #if !defined(KRATOS_GEO_UPDATED_LAGRANGIAN_U_PW_DIFF_ORDER_ELEMENT_H_INCLUDED)
14 #define KRATOS_GEO_UPDATED_LAGRANGIAN_U_PW_DIFF_ORDER_ELEMENT_H_INCLUDED
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
21 #include "custom_elements/small_strain_U_Pw_diff_order_element.hpp"
22 #include "custom_utilities/element_utilities.hpp"
25 
26 namespace Kratos
27 {
36 
40 
44 
51 class KRATOS_API(GEO_MECHANICS_APPLICATION) UpdatedLagrangianUPwDiffOrderElement : public SmallStrainUPwDiffOrderElement
52 {
53 public:
56  using IndexType = std::size_t;
58  using NodeType = Node;
61  using VectorType = Vector;
62  using MatrixType = Matrix;
63 
66 
68  using SizeType = std::size_t;
77 
79 
82 
84 
87 
89  UpdatedLagrangianUPwDiffOrderElement(IndexType NewId, GeometryType::Pointer pGeometry)
90  : SmallStrainUPwDiffOrderElement(NewId, pGeometry)
91  {
92  }
93 
95  UpdatedLagrangianUPwDiffOrderElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
96  : SmallStrainUPwDiffOrderElement(NewId, pGeometry, pProperties)
97  {
98  }
99 
102 
110  Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override;
111 
119  Element::Pointer Create(IndexType NewId,
120  NodesArrayType const& ThisNodes,
121  PropertiesType::Pointer pProperties) const override;
122 
129  void CalculateOnIntegrationPoints(const Variable<double>& rVariable,
130  std::vector<double>& rOutput,
131  const ProcessInfo& rCurrentProcessInfo) override;
132 
139  void CalculateOnIntegrationPoints(const Variable<Matrix>& rVariable,
140  std::vector<Matrix>& rOutput,
141  const ProcessInfo& rCurrentProcessInfo) override;
142 
143  void CalculateOnIntegrationPoints(const Variable<Vector>& rVariable,
144  std::vector<Vector>& rOutput,
145  const ProcessInfo& rCurrentProcessInfo) override;
146 
150 
157 
159  std::string Info() const override
160  {
161  std::stringstream buffer;
162  buffer << "Updated Lagrangian U-Pw different order Element #" << this->Id()
163  << "\nConstitutive law: " << mConstitutiveLawVector[0]->Info();
164  return buffer.str();
165  }
166 
168  void PrintInfo(std::ostream& rOStream) const override
169  {
170  rOStream << "Updated Lagrangian U-Pw different order Element #" << this->Id()
171  << "\nConstitutive law: " << mConstitutiveLawVector[0]->Info();
172  }
173 
175  void PrintData(std::ostream& rOStream) const override
176  {
177  this->pGetGeometry()->PrintData(rOStream);
178  }
179 
184 
185 protected:
188 
192 
196 
205  void CalculateAll(MatrixType& rLeftHandSideMatrix,
206  VectorType& rRightHandSideVector,
207  const ProcessInfo& rCurrentProcessInfo,
208  const bool CalculateStiffnessMatrixFlag,
209  const bool CalculateResidualVectorFlag) override;
210 
211  void CalculateAndAddGeometricStiffnessMatrix(MatrixType& rLeftHandSideMatrix,
212  ElementVariables& rVariables,
213  unsigned int GPoint);
214 
228 
229 private:
232 
236 
240 
241  // Copy constructor
243 
247 
252 
256  friend class Serializer;
257 
258  // A private default constructor necessary for serialization
259 
260  void save(Serializer& rSerializer) const override;
261 
262  void load(Serializer& rSerializer) override;
263 
270  // UpdatedLagrangianUPwDiffOrderElement& operator=(const UpdatedLagrangianUPwDiffOrderElement& rOther);
272  // UpdatedLagrangianUPwDiffOrderElement(const UpdatedLagrangianUPwDiffOrderElement& rOther);
274 
275 }; // Class UpdatedLagrangianUPwDiffOrderElement
276 
284 
285 } // namespace Kratos.
286 #endif // KRATOS_GEO_UPDATED_LAGRANGIAN_U_PW_DIFF_ORDER_ELEMENT_H_INCLUDED defined
std::size_t SizeType
Definition: element.h:94
std::size_t IndexType
Definition: flags.h:74
IntegrationMethod
Definition: geometry_data.h:76
Geometry base class.
Definition: geometry.h:71
PointerVector< TPointType > PointsArrayType
Definition: geometry.h:118
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
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
Definition: small_strain_U_Pw_diff_order_element.hpp:36
virtual void CalculateCauchyGreenStrain(ElementVariables &rVariables)
Definition: small_strain_U_Pw_diff_order_element.cpp:2277
virtual void CalculateCauchyStrain(ElementVariables &rVariables)
Definition: small_strain_U_Pw_diff_order_element.cpp:2272
std::vector< Vector > mStateVariablesFinalized
Definition: small_strain_U_Pw_diff_order_element.hpp:219
void AssembleUBlockMatrix(Matrix &rLeftHandSideMatrix, const Matrix &StiffnessMatrix) const
Definition: small_strain_U_Pw_diff_order_element.cpp:1889
void CalculateDerivativesOnInitialConfiguration(double &detJ, Matrix &J0, Matrix &InvJ0, Matrix &DN_DX, unsigned int PointNumber) const
Definition: small_strain_U_Pw_diff_order_element.cpp:1779
std::vector< Vector > mStressVector
Definition: small_strain_U_Pw_diff_order_element.hpp:218
virtual void CalculateCauchyAlmansiStrain(ElementVariables &rVariables)
Definition: small_strain_U_Pw_diff_order_element.cpp:2336
std::vector< ConstitutiveLaw::Pointer > mConstitutiveLawVector
Definition: small_strain_U_Pw_diff_order_element.hpp:214
Updated Lagrangian element for 2D and 3D geometries.
Definition: updated_lagrangian_U_Pw_diff_order_element.hpp:52
UpdatedLagrangianUPwDiffOrderElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constructor using Properties.
Definition: updated_lagrangian_U_Pw_diff_order_element.hpp:95
typename SmallStrainUPwDiffOrderElement::ElementVariables ElementVariables
Definition: updated_lagrangian_U_Pw_diff_order_element.hpp:78
UpdatedLagrangianUPwDiffOrderElement(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using Geometry.
Definition: updated_lagrangian_U_Pw_diff_order_element.hpp:89
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(UpdatedLagrangianUPwDiffOrderElement)
Counted pointer of UpdatedLagrangianUPwDiffOrderElement.
UpdatedLagrangianUPwDiffOrderElement()
Default Constructor.
Definition: updated_lagrangian_U_Pw_diff_order_element.hpp:86
std::string Info() const override
Turn back information as a string.
Definition: updated_lagrangian_U_Pw_diff_order_element.hpp:159
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: updated_lagrangian_U_Pw_diff_order_element.hpp:168
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: updated_lagrangian_U_Pw_diff_order_element.hpp:175
~UpdatedLagrangianUPwDiffOrderElement() override
Destructor.
Definition: updated_lagrangian_U_Pw_diff_order_element.hpp:101
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
Matrix MatrixType
Definition: geometrical_transformation_utilities.h:55
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
Internals::Matrix< double, AMatrix::dynamic, 1 > Vector
Definition: amatrix_interface.h:472
Internals::Matrix< double, AMatrix::dynamic, AMatrix::dynamic > Matrix
Definition: amatrix_interface.h:470
ModelPart::NodesContainerType NodesArrayType
Definition: gid_gauss_point_container.h:42
def load(f)
Definition: ode_solve.py:307
Definition: small_strain_U_Pw_diff_order_element.hpp:151