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.
periodic_condition.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ \.
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Jordi Cotela
11 //
12 
13 #ifndef KRATOS_PERIODIC_CONDITION_H
14 #define KRATOS_PERIODIC_CONDITION_H
15 
16 // System includes
17 #include <string>
18 #include <iostream>
19 #include <sstream>
20 #include <cstddef>
21 
22 
23 // External includes
24 
25 
26 // Project includes
27 #include "includes/define.h"
28 #include "includes/node.h"
29 #include "geometries/geometry.h"
30 #include "includes/properties.h"
31 #include "includes/process_info.h"
33 #include "includes/condition.h"
34 #include "includes/serializer.h"
35 
36 // Application includes
37 #include "includes/variables.h"
39 
40 namespace Kratos
41 {
44 
47 
51 
55 
59 
63 
65 
79 class KRATOS_API(KRATOS_CORE) PeriodicCondition : public Condition
80 {
81 public:
84 
87 
89 
91 
92  typedef Node NodeType;
93 
95 
97 
99 
101 
103 
105 
107 
108  typedef BaseType::DofType DofType;
109 
110  typedef BaseType::EquationIdVectorType EquationIdVectorType;
111 
112  typedef BaseType::DofsVectorType DofsVectorType;
113 
114  typedef BaseType::DofsArrayType DofsArrayType;
115 
119 
121 
123  explicit PeriodicCondition(IndexType NewId = 0);
124 
126 
131  const NodesArrayType& ThisNodes);
132 
134 
139  GeometryType::Pointer pGeometry);
140 
142 
148  GeometryType::Pointer pGeometry,
149  PropertiesType::Pointer pProperties);
150 
152  PeriodicCondition(PeriodicCondition const& rOther);
153 
154 
156  ~PeriodicCondition() override;
157 
158 
162 
165 
169 
171  Condition::Pointer Create(IndexType NewId,
172  NodesArrayType const& ThisNodes,
173  PropertiesType::Pointer pProperties) const override;
174 
176  int Check(const ProcessInfo& rCurrentProcessInfo) const override;
177 
179 
187  void CalculateLocalSystem(MatrixType& rLeftHandSideMatrix,
188  VectorType& rRightHandSideVector,
189  const ProcessInfo& rCurrentProcessInfo) override;
190 
192 
196  void CalculateLeftHandSide(MatrixType& rLeftHandSideMatrix,
197  const ProcessInfo& rCurrentProcessInfo) override;
198 
200 
204  void CalculateRightHandSide(VectorType& rRightHandSideVector,
205  const ProcessInfo& rCurrentProcessInfo) override;
206 
208 
214  void EquationIdVector(EquationIdVectorType& rResult,
215  const ProcessInfo& rCurrentProcessInfo) const override;
216 
218 
222  void GetDofList(DofsVectorType& ElementalDofList,
223  const ProcessInfo& CurrentProcessInfo) const override;
224 
226  void GetValuesVector(Vector& Values, int Step = 0) const override;
227 
231 
232 
236 
240 
241 
245 
247  std::string Info() const override
248  {
249  std::stringstream buffer;
250  buffer << "PeriodicCondition #" << Id();
251  return buffer.str();
252  }
253 
255  void PrintInfo(std::ostream& rOStream) const override
256  {
257  rOStream << "PeriodicCondition #" << Id();
258  }
259 
261  void PrintData(std::ostream& rOStream) const override
262  {
263  Condition::PrintData(rOStream);
264  }
265 
266 
270 
271 
273 
274 protected:
277 
278 
282 
283 
287 
288 
292 
293 
297 
298 
302 
303 
307 
308 
310 
311 private:
314 
315 
319 
320 
324 
325  friend class Serializer;
326 
327  void save(Serializer& rSerializer) const override;
328 
329  void load(Serializer& rSerializer) override;
330 
331 
335 
336 
340 
341 
345 
346 
350 
351 
355 
356 
357 
359 
360 }; // Class PeriodicCondition
361 
363 
366 
367 
371 
372 
374 inline std::istream & operator >>(std::istream& rIStream,
375  PeriodicCondition& rThis)
376 {
377  return rIStream;
378 }
379 
381 inline std::ostream & operator <<(std::ostream& rOStream,
382  const PeriodicCondition& rThis)
383 {
384  rThis.PrintInfo(rOStream);
385  rOStream << " : " << std::endl;
386  rThis.PrintData(rOStream);
387 
388  return rOStream;
389 }
391 
393 
394 } // namespace Kratos.
395 
396 
397 #endif /* KRATOS_FLUID_PERTIODIC_CONDITION_H */
398 
399 
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Base class for all Conditions.
Definition: condition.h:59
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: condition.h:1085
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
std::size_t IndexType
Defines the index type.
Definition: geometrical_object.h:73
Geometry base class.
Definition: geometry.h:71
This object defines an indexed object.
Definition: indexed_object.h:54
This class defines the node.
Definition: node.h:65
Condition used to assign periodic boundary conditions.
Definition: periodic_condition.h:80
BaseType::EquationIdVectorType EquationIdVectorType
Definition: periodic_condition.h:110
IndexedObject IndexedObjectType
Definition: periodic_condition.h:88
Node NodeType
Definition: periodic_condition.h:92
BaseType::IndexType IndexType
Definition: periodic_condition.h:104
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: periodic_condition.h:261
BaseType::SizeType SizeType
Definition: periodic_condition.h:106
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: periodic_condition.h:255
BaseType::DofsVectorType DofsVectorType
Definition: periodic_condition.h:112
Matrix MatrixType
Definition: periodic_condition.h:102
Geometry< NodeType >::PointsArrayType NodesArrayType
Definition: periodic_condition.h:98
BaseType::DofsArrayType DofsArrayType
Definition: periodic_condition.h:114
Vector VectorType
Definition: periodic_condition.h:100
Properties PropertiesType
Definition: periodic_condition.h:94
std::string Info() const override
Turn back information as a string.
Definition: periodic_condition.h:247
BaseType::DofType DofType
Definition: periodic_condition.h:108
Geometry< NodeType > GeometryType
Definition: periodic_condition.h:96
Condition BaseType
Definition: periodic_condition.h:90
KRATOS_CLASS_POINTER_DEFINITION(PeriodicCondition)
Pointer definition of PeriodicCondition.
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
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
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
std::size_t SizeType
Definition: nurbs_utilities.h:41
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
def load(f)
Definition: ode_solve.py:307