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_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_UPDATED_LAGRANGIAN_AXISYMMETRIC_FIC_ELEMENT_H_INCLUDED)
14 #define KRATOS_GEO_U_PW_UPDATED_LAGRANGIAN_AXISYMMETRIC_FIC_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 template <unsigned int TDim, unsigned int TNumNodes>
29 class KRATOS_API(GEO_MECHANICS_APPLICATION) UPwUpdatedLagrangianAxisymmetricFICElement
30  : public UPwUpdatedLagrangianFICElement<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  : UPwUpdatedLagrangianFICElement<TDim, TNumNodes>(NewId)
51  {
52  }
53 
56  : UPwUpdatedLagrangianFICElement<TDim, TNumNodes>(NewId, ThisNodes)
57  {
58  }
59 
61  UPwUpdatedLagrangianAxisymmetricFICElement(IndexType NewId, GeometryType::Pointer pGeometry)
62  : UPwUpdatedLagrangianFICElement<TDim, TNumNodes>(NewId, pGeometry)
63  {
64  }
65 
68  GeometryType::Pointer pGeometry,
69  PropertiesType::Pointer pProperties)
70  : UPwUpdatedLagrangianFICElement<TDim, TNumNodes>(NewId, pGeometry, pProperties)
71  {
72  }
73 
76 
78 
79  Element::Pointer Create(IndexType NewId,
80  NodesArrayType const& ThisNodes,
81  PropertiesType::Pointer pProperties) const override;
82 
83  Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override;
84 
86 
87  // Turn back information as a string.
88  std::string Info() const override
89  {
90  std::stringstream buffer;
91  buffer << "Small strain axisymmetric U-Pw Element #" << this->Id()
92  << "\nConstitutive law: " << mConstitutiveLawVector[0]->Info();
93  return buffer.str();
94  }
95 
96  // Print information about this object.
97  void PrintInfo(std::ostream& rOStream) const override
98  {
99  rOStream << "Small strain axisymmetric U-Pw Element #" << this->Id()
100  << "\nConstitutive law: " << mConstitutiveLawVector[0]->Info();
101  }
102 
104 
105 protected:
107 
109 
110  void CalculateBMatrix(Matrix& rB, const Matrix& GradNpT, const Vector& Np) override;
111 
112  double CalculateIntegrationCoefficient(const GeometryType::IntegrationPointsArrayType& IntegrationPoints,
113  unsigned int PointNumber,
114  double detJ) override;
115 
117 
118 private:
120 
122 
124 
125  friend class Serializer;
126 
127  void save(Serializer& rSerializer) const override
128  {
130  }
131 
132  void load(Serializer& rSerializer) override{KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, Element)}
133 
134  // Assignment operator.
135  UPwUpdatedLagrangianAxisymmetricFICElement&
136  operator=(UPwUpdatedLagrangianAxisymmetricFICElement const& rOther);
137 
138  // Copy constructor.
139  UPwUpdatedLagrangianAxisymmetricFICElement(UPwUpdatedLagrangianAxisymmetricFICElement const& rOther);
140 
141  // Private Operations
142 
143  template <class TValueType>
144  inline void ThreadSafeNodeWrite(NodeType& rNode, const Variable<TValueType>& Var, const TValueType Value)
145  {
146  rNode.SetLock();
147  rNode.FastGetSolutionStepValue(Var) = Value;
148  rNode.UnSetLock();
149  }
150 
151 }; // Class UPwUpdatedLagrangianAxisymmetricFICElement
152 
153 } // namespace Kratos
154 
155 #endif // KRATOS_GEO_U_PW_UPDATED_LAGRANGIAN_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: updated_lagrangian_U_Pw_axisymmetric_FIC_element.hpp:31
UPwUpdatedLagrangianAxisymmetricFICElement(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using Geometry.
Definition: updated_lagrangian_U_Pw_axisymmetric_FIC_element.hpp:61
UPwUpdatedLagrangianAxisymmetricFICElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constructor using Properties.
Definition: updated_lagrangian_U_Pw_axisymmetric_FIC_element.hpp:67
std::string Info() const override
Definition: updated_lagrangian_U_Pw_axisymmetric_FIC_element.hpp:88
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: updated_lagrangian_U_Pw_axisymmetric_FIC_element.hpp:97
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(UPwUpdatedLagrangianAxisymmetricFICElement)
~UPwUpdatedLagrangianAxisymmetricFICElement() override
Destructor.
Definition: updated_lagrangian_U_Pw_axisymmetric_FIC_element.hpp:75
UPwUpdatedLagrangianAxisymmetricFICElement(IndexType NewId, const NodesArrayType &ThisNodes)
Constructor using an array of nodes.
Definition: updated_lagrangian_U_Pw_axisymmetric_FIC_element.hpp:55
UPwUpdatedLagrangianAxisymmetricFICElement(IndexType NewId=0)
Default Constructor.
Definition: updated_lagrangian_U_Pw_axisymmetric_FIC_element.hpp:49
Updated Lagrangian element for 2D and 3D geometries.
Definition: U_Pw_updated_lagrangian_FIC_element.hpp:56
#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