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_strain_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_SMALL_STRAIN_DIFFERENT_ORDER_AXISYMMETRIC_ELEMENT_H_INCLUDED)
14 #define KRATOS_GEO_U_PW_SMALL_STRAIN_DIFFERENT_ORDER_AXISYMMETRIC_ELEMENT_H_INCLUDED
15 
16 // Project includes
17 #include "includes/serializer.h"
18 
19 // Application includes
20 #include "custom_elements/small_strain_U_Pw_diff_order_element.hpp"
21 #include "custom_utilities/element_utilities.hpp"
24 
25 namespace Kratos
26 {
27 
28 class KRATOS_API(GEO_MECHANICS_APPLICATION) SmallStrainUPwDiffOrderAxisymmetricElement : public SmallStrainUPwDiffOrderElement
29 {
30 public:
32 
33  typedef std::size_t IndexType;
35  typedef Node NodeType;
38  typedef Vector VectorType;
39  typedef Matrix MatrixType;
41  typedef std::size_t SizeType;
43 
45 
48 
50  SmallStrainUPwDiffOrderAxisymmetricElement(IndexType NewId, GeometryType::Pointer pGeometry)
51  : SmallStrainUPwDiffOrderElement(NewId, pGeometry)
52  {
53  }
54 
57  GeometryType::Pointer pGeometry,
58  PropertiesType::Pointer pProperties)
59  : SmallStrainUPwDiffOrderElement(NewId, pGeometry, pProperties)
60  {
61  }
62 
65 
67 
68  Element::Pointer Create(IndexType NewId,
69  NodesArrayType const& ThisNodes,
70  PropertiesType::Pointer pProperties) const override;
71 
72  Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override;
73 
75 
76  // Turn back information as a string.
77  std::string Info() const override
78  {
79  std::stringstream buffer;
80  buffer << "Small strain axisymmetric U-Pw Element with different order "
81  "#"
82  << this->Id() << "\nConstitutive law: " << mConstitutiveLawVector[0]->Info();
83  return buffer.str();
84  }
85 
86  // Print information about this object.
87  void PrintInfo(std::ostream& rOStream) const override
88  {
89  rOStream << "Small strain axisymmetric U-Pw Element with different "
90  "order #"
91  << this->Id() << "\nConstitutive law: " << mConstitutiveLawVector[0]->Info();
92  }
93 
95 
96 protected:
98 
100 
101  void CalculateBMatrix(Matrix& rB, const Matrix& GradNpT, const Vector& Np) override;
102 
103  double CalculateIntegrationCoefficient(const GeometryType::IntegrationPointsArrayType& IntegrationPoints,
104  unsigned int PointNumber,
105  double detJ) override;
106 
108 
109 private:
111 
113 
115 
116  friend class Serializer;
117 
118  void save(Serializer& rSerializer) const override
119  {
121  }
122 
123  void load(Serializer& rSerializer) override{KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, Element)}
124 
125  // Assignment operator.
126  SmallStrainUPwDiffOrderAxisymmetricElement&
127  operator=(SmallStrainUPwDiffOrderAxisymmetricElement const& rOther);
128 
129  // Copy constructor.
130  SmallStrainUPwDiffOrderAxisymmetricElement(SmallStrainUPwDiffOrderAxisymmetricElement const& rOther);
131 
132  // Private Operations
133 
134  template <class TValueType>
135  inline void ThreadSafeNodeWrite(NodeType& rNode, const Variable<TValueType>& Var, const TValueType Value)
136  {
137  rNode.SetLock();
138  rNode.FastGetSolutionStepValue(Var) = Value;
139  rNode.UnSetLock();
140  }
141 
142 }; // Class SmallStrainUPwDiffOrderAxisymmetricElement
143 
144 } // namespace Kratos
145 
146 #endif // KRATOS_GEO_U_PW_SMALL_STRAIN_DIFFERENT_ORDER_AXISYMMETRIC_ELEMENT_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Base class for all Elements.
Definition: element.h:60
std::size_t IndexType
Definition: flags.h:74
Geometry base class.
Definition: geometry.h:71
std::vector< IntegrationPointType > IntegrationPointsArrayType
Definition: geometry.h:161
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: small_strain_U_Pw_diff_order_axisymmetric_element.hpp:29
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(SmallStrainUPwDiffOrderAxisymmetricElement)
SmallStrainUPwDiffOrderAxisymmetricElement(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using Geometry.
Definition: small_strain_U_Pw_diff_order_axisymmetric_element.hpp:50
Matrix MatrixType
Definition: small_strain_U_Pw_diff_order_axisymmetric_element.hpp:39
Properties PropertiesType
Definition: small_strain_U_Pw_diff_order_axisymmetric_element.hpp:34
SmallStrainUPwDiffOrderAxisymmetricElement()
Default Constructor.
Definition: small_strain_U_Pw_diff_order_axisymmetric_element.hpp:47
~SmallStrainUPwDiffOrderAxisymmetricElement() override
Destructor.
Definition: small_strain_U_Pw_diff_order_axisymmetric_element.hpp:64
Node NodeType
Definition: small_strain_U_Pw_diff_order_axisymmetric_element.hpp:35
std::string Info() const override
Definition: small_strain_U_Pw_diff_order_axisymmetric_element.hpp:77
Geometry< NodeType >::PointsArrayType NodesArrayType
Definition: small_strain_U_Pw_diff_order_axisymmetric_element.hpp:37
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: small_strain_U_Pw_diff_order_axisymmetric_element.hpp:87
std::size_t IndexType
Definition: small_strain_U_Pw_diff_order_axisymmetric_element.hpp:33
std::size_t SizeType
The definition of the sizetype.
Definition: small_strain_U_Pw_diff_order_axisymmetric_element.hpp:41
Vector VectorType
Definition: small_strain_U_Pw_diff_order_axisymmetric_element.hpp:38
Geometry< NodeType > GeometryType
Definition: small_strain_U_Pw_diff_order_axisymmetric_element.hpp:36
SmallStrainUPwDiffOrderAxisymmetricElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constructor using Properties.
Definition: small_strain_U_Pw_diff_order_axisymmetric_element.hpp:56
Definition: small_strain_U_Pw_diff_order_element.hpp:36
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
ModelPart::NodesContainerType NodesArrayType
Definition: gid_gauss_point_container.h:42
def load(f)
Definition: ode_solve.py:307