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_axisymmetric_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_U_PW_UPDATED_LAGRANGIAN_DIFFERENT_ORDER_AXISYMMETRIC_ELEMENT_H_INCLUDED)
14 #define KRATOS_GEO_U_PW_UPDATED_LAGRANGIAN_DIFFERENT_ORDER_AXISYMMETRIC_ELEMENT_H_INCLUDED
15 
16 // Project includes
17 #include "includes/serializer.h"
18 
19 // Application includes
21 #include "custom_utilities/element_utilities.hpp"
24 
25 namespace Kratos
26 {
27 
28 class KRATOS_API(GEO_MECHANICS_APPLICATION) UpdatedLagrangianUPwDiffOrderAxisymmetricElement
30 {
31 public:
33 
34  using IndexType = std::size_t;
36  using NodeType = Node;
39  using VectorType = Vector;
40  using MatrixType = Matrix;
42  using SizeType = std::size_t;
44 
46 
49 
51  UpdatedLagrangianUPwDiffOrderAxisymmetricElement(IndexType NewId, GeometryType::Pointer pGeometry)
52  : UpdatedLagrangianUPwDiffOrderElement(NewId, pGeometry)
53  {
54  }
55 
58  GeometryType::Pointer pGeometry,
59  PropertiesType::Pointer pProperties)
60  : UpdatedLagrangianUPwDiffOrderElement(NewId, pGeometry, pProperties)
61  {
62  }
63 
66 
68 
69  Element::Pointer Create(IndexType NewId,
70  NodesArrayType const& ThisNodes,
71  PropertiesType::Pointer pProperties) const override;
72 
73  Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override;
74 
76 
77  // Turn back information as a string.
78  std::string Info() const override
79  {
80  std::stringstream buffer;
81  buffer << "Updated-Lagrangian axisymmetric U-Pw element with different "
82  "order #"
83  << this->Id() << "\nConstitutive law: " << mConstitutiveLawVector[0]->Info();
84  return buffer.str();
85  }
86 
87  // Print information about this object.
88  void PrintInfo(std::ostream& rOStream) const override
89  {
90  rOStream << "Updated-Lagrangian axisymmetric U-Pw element with "
91  "different order #"
92  << this->Id() << "\nConstitutive law: " << mConstitutiveLawVector[0]->Info();
93  }
94 
96 
97 protected:
99 
101 
102  void CalculateBMatrix(Matrix& rB, const Matrix& GradNpT, const Vector& Np) override;
103 
104  double CalculateIntegrationCoefficient(const GeometryType::IntegrationPointsArrayType& IntegrationPoints,
105  unsigned int PointNumber,
106  double detJ) override;
107 
109 
110 private:
112 
114 
116 
117  friend class Serializer;
118 
119  void save(Serializer& rSerializer) const override
120  {
122  }
123 
124  void load(Serializer& rSerializer) override{KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, Element)}
125 
126  // Assignment operator.
127  UpdatedLagrangianUPwDiffOrderAxisymmetricElement&
128  operator=(UpdatedLagrangianUPwDiffOrderAxisymmetricElement const& rOther);
129 
130  // Copy constructor.
131  UpdatedLagrangianUPwDiffOrderAxisymmetricElement(UpdatedLagrangianUPwDiffOrderAxisymmetricElement const& rOther);
132 
133  // Private Operations
134 
135  template <class TValueType>
136  inline void ThreadSafeNodeWrite(NodeType& rNode, const Variable<TValueType>& Var, const TValueType Value)
137  {
138  rNode.SetLock();
139  rNode.FastGetSolutionStepValue(Var) = Value;
140  rNode.UnSetLock();
141  }
142 
143 }; // Class UpdatedLagrangianUPwDiffOrderAxisymmetricElement
144 
145 } // namespace Kratos
146 
147 #endif // KRATOS_GEO_U_PW_UPDATED_LAGRANGIAN_DIFFERENT_ORDER_AXISYMMETRIC_ELEMENT_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Base class for all Elements.
Definition: element.h:60
std::size_t SizeType
Definition: element.h:94
std::size_t IndexType
Definition: flags.h:74
Geometry base class.
Definition: geometry.h:71
std::vector< IntegrationPointType > IntegrationPointsArrayType
Definition: geometry.h:161
PointerVector< TPointType > PointsArrayType
Definition: geometry.h:118
This class defines the node.
Definition: node.h:65
TVariableType::Type & FastGetSolutionStepValue(const TVariableType &rThisVariable)
Definition: node.h:435
void SetLock()
Definition: node.h:282
void UnSetLock()
Definition: node.h:287
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
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: updated_lagrangian_U_Pw_diff_order_axisymmetric_element.hpp:30
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: updated_lagrangian_U_Pw_diff_order_axisymmetric_element.hpp:88
std::string Info() const override
Definition: updated_lagrangian_U_Pw_diff_order_axisymmetric_element.hpp:78
~UpdatedLagrangianUPwDiffOrderAxisymmetricElement() override
Destructor.
Definition: updated_lagrangian_U_Pw_diff_order_axisymmetric_element.hpp:65
UpdatedLagrangianUPwDiffOrderAxisymmetricElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constructor using Properties.
Definition: updated_lagrangian_U_Pw_diff_order_axisymmetric_element.hpp:57
UpdatedLagrangianUPwDiffOrderAxisymmetricElement()
Default Constructor.
Definition: updated_lagrangian_U_Pw_diff_order_axisymmetric_element.hpp:48
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(UpdatedLagrangianUPwDiffOrderAxisymmetricElement)
UpdatedLagrangianUPwDiffOrderAxisymmetricElement(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using Geometry.
Definition: updated_lagrangian_U_Pw_diff_order_axisymmetric_element.hpp:51
Updated Lagrangian element for 2D and 3D geometries.
Definition: updated_lagrangian_U_Pw_diff_order_element.hpp:52
std::vector< ConstitutiveLaw::Pointer > mConstitutiveLawVector
Definition: small_strain_U_Pw_diff_order_element.hpp:214
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
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
def load(f)
Definition: ode_solve.py:307