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.
T_condition.h
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: Mohamed Nabi
12 // John van Esch
13 //
14 
15 #pragma once
16 
19 #include "includes/condition.h"
20 #include "includes/define.h"
21 #include "includes/process_info.h"
22 #include "includes/serializer.h"
23 
24 namespace Kratos {
25 
26 template <unsigned int TDim, unsigned int TNumNodes>
27 class KRATOS_API(GEO_MECHANICS_APPLICATION) GeoTCondition : public Condition {
28 public:
30 
31  GeoTCondition();
32 
33  GeoTCondition(IndexType NewId, GeometryType::Pointer pGeometry);
34 
35  GeoTCondition(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
36 
37  ~GeoTCondition() override;
38 
39  Condition::Pointer Create(IndexType NewId,
40  NodesArrayType const& rThisNodes,
41  PropertiesType::Pointer pProperties) const override
42  {
43  return Kratos::make_intrusive<GeoTCondition>(
44  NewId, GetGeometry().Create(rThisNodes), pProperties);
45  }
46 
47  using Condition::Create;
48 
49  void GetDofList(DofsVectorType& rConditionDofList,
50  const ProcessInfo& ) const override
51  {
53 
54  if (rConditionDofList.size() != TNumNodes) {
55  rConditionDofList.resize(TNumNodes);
56  }
57 
58  for (unsigned int i = 0; i < TNumNodes; ++i) {
59  rConditionDofList[i] = GetGeometry()[i].pGetDof(TEMPERATURE);
60  }
61 
62  KRATOS_CATCH("")
63  }
64 
65  void CalculateLocalSystem(MatrixType& rLeftHandSideMatrix,
66  VectorType& rRightHandSideVector,
67  const ProcessInfo& rCurrentProcessInfo) override;
68 
69  void EquationIdVector(EquationIdVectorType& rResult,
70  const ProcessInfo& rCurrentProcessInfo) const override;
71 
72 protected:
73  virtual void CalculateAll(MatrixType& rLeftHandSideMatrix,
74  VectorType& rRightHandSideVector,
75  const ProcessInfo& rCurrentProcessInfo);
76 
77  virtual void CalculateRHS(VectorType& rRightHandSideVector,
78  const ProcessInfo& rCurrentProcessInfo);
79 
80 private:
81  friend class Serializer;
82 
83  void save(Serializer& rSerializer) const override
84  {
86  }
87 
88  void load(Serializer& rSerializer) override
89  {
91  }
92 };
93 
94 } // namespace Kratos
Base class for all Conditions.
Definition: condition.h:59
virtual Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const
It creates a new condition pointer.
Definition: condition.h:205
std::vector< DofType::Pointer > DofsVectorType
Definition: condition.h:100
std::size_t IndexType
Definition: flags.h:74
Definition: T_condition.h:27
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(GeoTCondition)
Condition::Pointer Create(IndexType NewId, NodesArrayType const &rThisNodes, PropertiesType::Pointer pProperties) const override
It creates a new condition pointer.
Definition: T_condition.h:39
void GetDofList(DofsVectorType &rConditionDofList, const ProcessInfo &) const override
Definition: T_condition.h:49
~GeoTCondition() override
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
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#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
integer i
Definition: TensorModule.f:17