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_condition.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 //
11 // Main authors: Ignasi de Pouplana,
12 // Vahid Galavi
13 //
14 
15 
16 #if !defined(KRATOS_GEO_U_PW_CONDITION_H_INCLUDED )
17 #define KRATOS_GEO_U_PW_CONDITION_H_INCLUDED
18 
19 // System includes
20 #include <cmath>
21 
22 // Project includes
23 #include "includes/define.h"
24 #include "includes/condition.h"
25 #include "includes/serializer.h"
26 #include "includes/process_info.h"
27 
28 // Application includes
31 
32 namespace Kratos
33 {
34 
35 template< unsigned int TDim, unsigned int TNumNodes >
36 class KRATOS_API(GEO_MECHANICS_APPLICATION) UPwCondition : public Condition
37 {
38 
39 public:
40 
42 
43 //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
44 
45  UPwCondition() : UPwCondition(0, nullptr, nullptr){}
46 
48  GeometryType::Pointer pGeometry )
49  : UPwCondition(NewId, pGeometry, nullptr)
50  {}
51 
53  GeometryType::Pointer pGeometry,
54  PropertiesType::Pointer pProperties )
55  : Condition(NewId, pGeometry, pProperties)
56  {}
57 
58  ~UPwCondition() override = default;
59 
60 //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
61 
62  Condition::Pointer Create(IndexType NewId,
63  NodesArrayType const& ThisNodes,
64  PropertiesType::Pointer pProperties ) const override;
65 
66  void GetDofList(DofsVectorType& rConditionDofList,
67  const ProcessInfo& rCurrentProcessInfo) const override;
68 
70  {
71  return mThisIntegrationMethod;
72  }
73 
75  {
76  mThisIntegrationMethod = method;
77  }
78 
79 //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
80 
81  void CalculateLocalSystem(MatrixType& rLeftHandSideMatrix,
82  VectorType& rRightHandSideVector,
83  const ProcessInfo& rCurrentProcessInfo) override;
84 
85  void CalculateLeftHandSide(MatrixType& rLeftHandSideMatrix,
86  const ProcessInfo& rCurrentProcessInfo) override;
87 
88  void CalculateRightHandSide(VectorType& rRightHandSideVector,
89  const ProcessInfo& rCurrentProcessInfo) override;
90 
91  void EquationIdVector(EquationIdVectorType& rResult,
92  const ProcessInfo& rCurrentProcessInfo) const override;
93 
94 //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
95 
96 protected:
97  virtual void CalculateAll(MatrixType& rLeftHandSideMatrix,
98  VectorType& rRightHandSideVector,
99  const ProcessInfo& rCurrentProcessInfo);
100 
101  virtual void CalculateRHS(VectorType& rRightHandSideVector,
102  const ProcessInfo& rCurrentProcessInfo);
103 
104 //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
105 
106 private:
108 
109  // Serialization
110 
111  friend class Serializer;
112 
113  void save(Serializer& rSerializer) const override
114  {
116  }
117 
118  void load(Serializer& rSerializer) override
119  {
121  }
122 
123 }; // class UPwCondition.
124 
125 } // namespace Kratos.
126 
127 #endif // KRATOS_GEO_U_PW_CONDITION_H_INCLUDED defined
Base class for all Conditions.
Definition: condition.h:59
std::vector< DofType::Pointer > DofsVectorType
Definition: condition.h:100
virtual IntegrationMethod GetIntegrationMethod() const
Definition: condition.h:288
std::size_t IndexType
Definition: flags.h:74
IntegrationMethod
Definition: geometry_data.h:76
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
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_condition.hpp:37
IntegrationMethod GetIntegrationMethod() const override
Definition: U_Pw_condition.hpp:69
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(UPwCondition)
UPwCondition(IndexType NewId, GeometryType::Pointer pGeometry)
Definition: U_Pw_condition.hpp:47
UPwCondition()
Definition: U_Pw_condition.hpp:45
UPwCondition(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Definition: U_Pw_condition.hpp:52
void SetIntegrationMethod(IntegrationMethod method)
Definition: U_Pw_condition.hpp:74
~UPwCondition() override=default
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
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
def load(f)
Definition: ode_solve.py:307