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.
undrained_U_Pw_small_strain_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_UNDRAINED_U_PW_SMALL_STRAIN_ELEMENT_H_INCLUDED)
14 #define KRATOS_GEO_UNDRAINED_U_PW_SMALL_STRAIN_ELEMENT_H_INCLUDED
15 
16 // Project includes
17 #include "includes/serializer.h"
18 
19 // Application includes
20 #include "custom_elements/U_Pw_small_strain_element.hpp"
21 #include "custom_utilities/element_utilities.hpp"
24 
25 namespace Kratos
26 {
27 
28 template <unsigned int TDim, unsigned int TNumNodes>
29 class KRATOS_API(GEO_MECHANICS_APPLICATION) UndrainedUPwSmallStrainElement
30  : public UPwSmallStrainElement<TDim, TNumNodes>
31 {
32 public:
34 
35  using IndexType = std::size_t;
37  using NodeType = Node;
40  using VectorType = Vector;
41  using MatrixType = Matrix;
43  using SizeType = std::size_t;
51 
53 
56  : UPwSmallStrainElement<TDim, TNumNodes>(NewId)
57  {
58  }
59 
62  : UPwSmallStrainElement<TDim, TNumNodes>(NewId, ThisNodes)
63  {
64  }
65 
67  UndrainedUPwSmallStrainElement(IndexType NewId, GeometryType::Pointer pGeometry)
68  : UPwSmallStrainElement<TDim, TNumNodes>(NewId, pGeometry)
69  {
70  }
71 
73  UndrainedUPwSmallStrainElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
74  : UPwSmallStrainElement<TDim, TNumNodes>(NewId, pGeometry, pProperties)
75  {
76  }
77 
80 
82  Element::Pointer Create(IndexType NewId,
83  NodesArrayType const& ThisNodes,
84  PropertiesType::Pointer pProperties) const override;
85 
86  Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override;
87 
88  int Check(const ProcessInfo& rCurrentProcessInfo) const override;
89 
90  // Turn back information as a string.
91  std::string Info() const override
92  {
93  std::stringstream buffer;
94  buffer << "undrained small strain Element #" << this->Id()
95  << "\nConstitutive law: " << mConstitutiveLawVector[0]->Info();
96  return buffer.str();
97  }
98 
99  // Print information about this object.
100  void PrintInfo(std::ostream& rOStream) const override
101  {
102  rOStream << "undrained small strain Element #" << this->Id()
103  << "\nConstitutive law: " << mConstitutiveLawVector[0]->Info();
104  }
105 
107 
108 protected:
110  void CalculateAndAddLHS(MatrixType& rLeftHandSideMatrix, ElementVariables& rVariables) override;
111 
112  void CalculateAndAddRHS(VectorType& rRightHandSideVector, ElementVariables& rVariables, unsigned int GPoint) override;
113 
115 
116 private:
118 
120 
121  friend class Serializer;
122 
125 
128 
129 }; // Class UndrainedUPwSmallStrainElement
130 
131 } // namespace Kratos
132 
133 #endif // KRATOS_GEO_UNDRAINED_U_PW_SMALL_STRAIN_ELEMENT_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
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
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: U_Pw_small_strain_element.hpp:30
Definition: undrained_U_Pw_small_strain_element.hpp:31
~UndrainedUPwSmallStrainElement() override
Destructor.
Definition: undrained_U_Pw_small_strain_element.hpp:79
UndrainedUPwSmallStrainElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constructor using Properties.
Definition: undrained_U_Pw_small_strain_element.hpp:73
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(UndrainedUPwSmallStrainElement)
std::string Info() const override
Turn back information as a string.
Definition: undrained_U_Pw_small_strain_element.hpp:91
typename UPwSmallStrainElement< TDim, TNumNodes >::ElementVariables ElementVariables
Definition: undrained_U_Pw_small_strain_element.hpp:48
UndrainedUPwSmallStrainElement(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using Geometry.
Definition: undrained_U_Pw_small_strain_element.hpp:67
UndrainedUPwSmallStrainElement(IndexType NewId=0)
Default Constructor.
Definition: undrained_U_Pw_small_strain_element.hpp:55
UndrainedUPwSmallStrainElement(IndexType NewId, const NodesArrayType &ThisNodes)
Constructor using an array of nodes.
Definition: undrained_U_Pw_small_strain_element.hpp:61
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: undrained_U_Pw_small_strain_element.hpp:100
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
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
Definition: U_Pw_small_strain_element.hpp:128