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.
small_displacement.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 //
12 
13 #pragma once
14 
15 // System includes
16 
17 // External includes
18 
19 // Project includes
20 #include "includes/define.h"
21 #include "custom_elements/base_solid_element.h"
22 #include "includes/variables.h"
23 
24 namespace Kratos
25 {
34 
38 
42 
52 class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) SmallDisplacement
53  : public BaseSolidElement
54 {
55 public:
61  typedef ConstitutiveLawType::Pointer ConstitutiveLawPointerType;
64 
67 
69  typedef std::size_t IndexType;
70 
72  typedef std::size_t SizeType;
73 
76 
80 
82  SmallDisplacement(IndexType NewId, GeometryType::Pointer pGeometry);
83  SmallDisplacement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
84 
85  // Copy constructor
87  :BaseType(rOther)
88  {};
89 
91  ~SmallDisplacement() override;
92 
99 
107  Element::Pointer Create(
108  IndexType NewId,
109  GeometryType::Pointer pGeom,
110  PropertiesType::Pointer pProperties
111  ) const override;
112 
120  Element::Pointer Create(
121  IndexType NewId,
122  NodesArrayType const& ThisNodes,
123  PropertiesType::Pointer pProperties
124  ) const override;
125 
133  Element::Pointer Clone (
134  IndexType NewId,
135  NodesArrayType const& rThisNodes
136  ) const override;
137 
141 
148 
150  std::string Info() const override
151  {
152  std::stringstream buffer;
153  buffer << "Small Displacement Solid Element #" << Id() << "\nConstitutive law: " << BaseType::mConstitutiveLawVector[0]->Info();
154  return buffer.str();
155  }
156 
158  void PrintInfo(std::ostream& rOStream) const override
159  {
160  rOStream << "Small Displacement Solid Element #" << Id() << "\nConstitutive law: " << BaseType::mConstitutiveLawVector[0]->Info();
161  }
162 
164  void PrintData(std::ostream& rOStream) const override
165  {
166  pGetGeometry()->PrintData(rOStream);
167  }
168 
173 
174 protected:
180 
184 
186  {
187  }
188 
192  bool UseElementProvidedStrain() const override;
193 
202  void CalculateAll(
203  MatrixType& rLeftHandSideMatrix,
204  VectorType& rRightHandSideVector,
205  const ProcessInfo& rCurrentProcessInfo,
206  const bool CalculateStiffnessMatrixFlag,
207  const bool CalculateResidualVectorFlag
208  ) override;
209 
215  void CalculateKinematicVariables(
216  KinematicVariables& rThisKinematicVariables,
217  const IndexType PointNumber,
218  const GeometryType::IntegrationMethod& rIntegrationMethod
219  ) override;
220 
229  void SetConstitutiveVariables(
230  KinematicVariables& rThisKinematicVariables,
231  ConstitutiveVariables& rThisConstitutiveVariables,
233  const IndexType PointNumber,
234  const GeometryType::IntegrationPointsArrayType& IntegrationPoints
235  ) override;
236 
244  virtual void CalculateB(
245  Matrix& rB,
246  const Matrix& rDN_DX,
247  const GeometryType::IntegrationPointsArrayType& IntegrationPoints,
248  const IndexType PointNumber
249  ) const;
250 
256  virtual void ComputeEquivalentF(
257  Matrix& rF,
258  const Vector& StrainVector
259  ) const;
260 
274 
275 private:
278 
282 
283 
287 
291 
292 
297 
301  friend class Serializer;
302 
303  // A private default constructor necessary for serialization
304 
305  void save(Serializer& rSerializer) const override;
306 
307  void load(Serializer& rSerializer) override;
308 
315  //SmallDisplacement& operator=(const SmallDisplacement& rOther);
317  //SmallDisplacement(const SmallDisplacement& rOther);
319 
320 }; // Class SmallDisplacement
321 
329 
330 } // namespace Kratos.
This is base class used to define the solid elements.
Definition: base_solid_element.h:67
Definition: constitutive_law.h:47
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
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
Small displacement element for 2D and 3D geometries.
Definition: small_displacement.h:54
SmallDisplacement()
Definition: small_displacement.h:185
std::size_t SizeType
The definition of the sizetype.
Definition: small_displacement.h:72
ConstitutiveLaw ConstitutiveLawType
Definition: small_displacement.h:59
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: small_displacement.h:158
BaseSolidElement BaseType
The base element type.
Definition: small_displacement.h:66
ConstitutiveLawType::Pointer ConstitutiveLawPointerType
Pointer type for constitutive laws.
Definition: small_displacement.h:61
std::size_t IndexType
The definition of the index type.
Definition: small_displacement.h:69
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(SmallDisplacement)
Counted pointer of SmallDisplacement.
std::string Info() const override
Turn back information as a string.
Definition: small_displacement.h:150
SmallDisplacement(SmallDisplacement const &rOther)
Definition: small_displacement.h:86
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: small_displacement.h:164
GeometryData::IntegrationMethod IntegrationMethod
Type definition for integration methods.
Definition: small_displacement.h:63
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
void ComputeEquivalentF(const Element &rElement, const TVectorType &rStrainTensor, TMatrixType &rF)
This method computes the deformation gradient F (for small deformation solid elements)
Definition: structural_mechanics_element_utilities.h:69
void CalculateB(const GeometricalObject &rElement, const TMatrixType1 &rDN_DX, TMatrixType2 &rB)
This method computes the deformation tensor B (for small deformation solid elements)
Definition: structural_mechanics_element_utilities.h:105
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
ModelPart::NodesContainerType NodesArrayType
Definition: gid_gauss_point_container.h:42
def load(f)
Definition: ode_solve.py:307
Definition: constitutive_law.h:189