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.
U_Pw_small_strain_axisymmetric_FIC_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_AXISYMMETRIC_FIC_ELEMENT_H_INCLUDED)
14 #define KRATOS_GEO_U_PW_SMALL_STRAIN_AXISYMMETRIC_FIC_ELEMENT_H_INCLUDED
15 
16 // Project includes
17 #include "includes/serializer.h"
18 
19 // Application includes
20 #include "custom_elements/U_Pw_small_strain_FIC_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) UPwSmallStrainAxisymmetricFICElement
30  : public UPwSmallStrainFICElement<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;
45 
47 
50  : UPwSmallStrainFICElement<TDim, TNumNodes>(NewId)
51  {
52  }
53 
56  : UPwSmallStrainFICElement<TDim, TNumNodes>(NewId, ThisNodes)
57  {
58  }
59 
61  UPwSmallStrainAxisymmetricFICElement(IndexType NewId, GeometryType::Pointer pGeometry)
62  : UPwSmallStrainFICElement<TDim, TNumNodes>(NewId, pGeometry)
63  {
64  }
65 
67  UPwSmallStrainAxisymmetricFICElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
68  : UPwSmallStrainFICElement<TDim, TNumNodes>(NewId, pGeometry, pProperties)
69  {
70  }
71 
74 
76 
77  Element::Pointer Create(IndexType NewId,
78  NodesArrayType const& ThisNodes,
79  PropertiesType::Pointer pProperties) const override;
80 
81  Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override;
82 
84 
85  // Turn back information as a string.
86  std::string Info() const override
87  {
88  std::stringstream buffer;
89  buffer << "Small strain axisymmetric U-Pw Element #" << this->Id()
90  << "\nConstitutive law: " << mConstitutiveLawVector[0]->Info();
91  return buffer.str();
92  }
93 
94  // Print information about this object.
95  void PrintInfo(std::ostream& rOStream) const override
96  {
97  rOStream << "Small strain axisymmetric U-Pw Element #" << this->Id()
98  << "\nConstitutive law: " << mConstitutiveLawVector[0]->Info();
99  }
100 
102 
103 protected:
105 
107 
108  void CalculateBMatrix(Matrix& rB, const Matrix& GradNpT, const Vector& Np) override;
109 
110  double CalculateIntegrationCoefficient(const GeometryType::IntegrationPointsArrayType& IntegrationPoints,
111  unsigned int PointNumber,
112  double detJ) override;
113 
115 
116 private:
118 
120 
122 
123  friend class Serializer;
124 
125  void save(Serializer& rSerializer) const override
126  {
128  }
129 
130  void load(Serializer& rSerializer) override{KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, Element)}
131 
132  // Assignment operator.
133  UPwSmallStrainAxisymmetricFICElement&
134  operator=(UPwSmallStrainAxisymmetricFICElement const& rOther);
135 
136  // Copy constructor.
137  UPwSmallStrainAxisymmetricFICElement(UPwSmallStrainAxisymmetricFICElement const& rOther);
138 
139  // Private Operations
140 
141  template <class TValueType>
142  inline void ThreadSafeNodeWrite(NodeType& rNode, const Variable<TValueType>& Var, const TValueType Value)
143  {
144  rNode.SetLock();
145  rNode.FastGetSolutionStepValue(Var) = Value;
146  rNode.UnSetLock();
147  }
148 
149 }; // Class UPwSmallStrainAxisymmetricFICElement
150 
151 } // namespace Kratos
152 
153 #endif // KRATOS_GEO_U_PW_SMALL_STRAIN_AXISYMMETRIC_FIC_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: U_Pw_base_element.hpp:36
Definition: U_Pw_small_strain_axisymmetric_FIC_element.hpp:31
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(UPwSmallStrainAxisymmetricFICElement)
std::string Info() const override
Definition: U_Pw_small_strain_axisymmetric_FIC_element.hpp:86
~UPwSmallStrainAxisymmetricFICElement() override
Destructor.
Definition: U_Pw_small_strain_axisymmetric_FIC_element.hpp:73
UPwSmallStrainAxisymmetricFICElement(IndexType NewId, const NodesArrayType &ThisNodes)
Constructor using an array of nodes.
Definition: U_Pw_small_strain_axisymmetric_FIC_element.hpp:55
UPwSmallStrainAxisymmetricFICElement(IndexType NewId=0)
Default Constructor.
Definition: U_Pw_small_strain_axisymmetric_FIC_element.hpp:49
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: U_Pw_small_strain_axisymmetric_FIC_element.hpp:95
UPwSmallStrainAxisymmetricFICElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constructor using Properties.
Definition: U_Pw_small_strain_axisymmetric_FIC_element.hpp:67
UPwSmallStrainAxisymmetricFICElement(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using Geometry.
Definition: U_Pw_small_strain_axisymmetric_FIC_element.hpp:61
Definition: U_Pw_small_strain_FIC_element.hpp:34
#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