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.
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 // Aron Noordam
14 //
15 
16 
17 #if !defined(KRATOS_GEO_PW_CONDITION_H_INCLUDED )
18 #define KRATOS_GEO_PW_CONDITION_H_INCLUDED
19 
20 // System includes
21 #include <cmath>
22 
23 // Project includes
24 #include "includes/define.h"
25 #include "includes/condition.h"
26 #include "includes/serializer.h"
27 #include "includes/process_info.h"
28 
29 // Application includes
32 
33 namespace Kratos
34 {
35 
36 template< unsigned int TDim, unsigned int TNumNodes >
37 class KRATOS_API(GEO_MECHANICS_APPLICATION) PwCondition : public Condition
38 {
39 
40 public:
41 
43 
44 //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
45 
46  PwCondition() : PwCondition(0, nullptr, nullptr) {}
47 
48  PwCondition( IndexType NewId, GeometryType::Pointer pGeometry )
49  : PwCondition(NewId, pGeometry, nullptr)
50  {}
51 
53  GeometryType::Pointer pGeometry,
54  PropertiesType::Pointer pProperties )
55  : Condition(NewId, pGeometry, pProperties)
56  {}
57 
58  ~PwCondition() 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 
69 //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
70 
71  void CalculateLocalSystem(MatrixType& rLeftHandSideMatrix,
72  VectorType& rRightHandSideVector,
73  const ProcessInfo& rCurrentProcessInfo) override;
74 
75  void CalculateLeftHandSide(MatrixType& rLeftHandSideMatrix,
76  const ProcessInfo& rCurrentProcessInfo) override;
77 
78  void CalculateRightHandSide(VectorType& rRightHandSideVector,
79  const ProcessInfo& rCurrentProcessInfo) override;
80 
81  void EquationIdVector(EquationIdVectorType& rResult,
82  const ProcessInfo& rCurrentProcessInfo) const override;
83 
84 //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
85 
86 protected:
87  virtual void CalculateAll(MatrixType& rLeftHandSideMatrix,
88  VectorType& rRightHandSideVector,
89  const ProcessInfo& rCurrentProcessInfo);
90 
91  virtual void CalculateRHS(VectorType& rRightHandSideVector,
92  const ProcessInfo& rCurrentProcessInfo);
93 
94 //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
95 
96 private:
97 
98  // Serialization
99 
100  friend class Serializer;
101 
102  void save(Serializer& rSerializer) const override
103  {
105  }
106 
107  void load(Serializer& rSerializer) override
108  {
110  }
111 
112 }; // class PwCondition.
113 
114 } // namespace Kratos.
115 
116 #endif // KRATOS_GEO_PW_CONDITION_H_INCLUDED defined
Base class for all Conditions.
Definition: condition.h:59
std::vector< std::size_t > EquationIdVectorType
Definition: condition.h:98
std::vector< DofType::Pointer > DofsVectorType
Definition: condition.h:100
std::size_t IndexType
Definition: flags.h:74
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
Definition: Pw_condition.hpp:38
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(PwCondition)
~PwCondition() override=default
PwCondition(IndexType NewId, GeometryType::Pointer pGeometry)
Definition: Pw_condition.hpp:48
PwCondition()
Definition: Pw_condition.hpp:46
PwCondition(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Definition: Pw_condition.hpp:52
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
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