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.
master_slave_process.h
Go to the documentation of this file.
1 // KRATOS ______ __ __ _____ __ __ __
2 // / ____/___ ____ / /_____ ______/ /_/ ___// /________ _______/ /___ ___________ _/ /
3 // / / / __ \/ __ \/ __/ __ `/ ___/ __/\__ \/ __/ ___/ / / / ___/ __/ / / / ___/ __ `/ /
4 // / /___/ /_/ / / / / /_/ /_/ / /__/ /_ ___/ / /_/ / / /_/ / /__/ /_/ /_/ / / / /_/ / /
5 // \____/\____/_/ /_/\__/\__,_/\___/\__//____/\__/_/ \__,_/\___/\__/\__,_/_/ \__,_/_/ MECHANICS
6 //
7 // License: BSD License
8 // license: ContactStructuralMechanicsApplication/license.txt
9 //
10 // Main authors: Vicente Mataix Ferrandiz
11 //
12 
13 #pragma once
14 
15 // System includes
16 
17 // External includes
18 
19 // Project includes
21 #include "processes/process.h"
22 #include "includes/model_part.h"
23 
24 namespace Kratos
25 {
28 
32 
36 
40 
47 class KRATOS_API(CONTACT_STRUCTURAL_MECHANICS_APPLICATION) MasterSlaveProcess
48  : public Process
49 {
50 public:
53 
56 
58  using IndexType = std::size_t;
59 
64 
68 
70  MasterSlaveProcess( ModelPart& rThisModelPart)
71  :mrThisModelPart(rThisModelPart)
72  {
73  KRATOS_TRY;
74 
75  KRATOS_CATCH("");
76  }
77 
80  = default;
81 
85 
89 
93 
97 
101 
102  void operator()()
103  {
104  Execute();
105  }
106 
110 
111  void Execute() override;
112 
116 
117 
121 
122 
126 
128  std::string Info() const override
129  {
130  return "MasterSlaveProcess";
131  }
132 
134  void PrintInfo(std::ostream& rOStream) const override
135  {
136  rOStream << "MasterSlaveProcess";
137  }
138 
140  void PrintData(std::ostream& rOStream) const override
141  {
142  }
143 
147 
148 
150 
151 protected:
154 
155 
159 
160 
164 
165 
169 
170 
174 
175 
179 
180 
184 
185 
187 
188 private:
191 
192 
196 
197  ModelPart& mrThisModelPart;
198 
202 
206 
207 
211 
212 
216 
217 
221 
223  MasterSlaveProcess& operator=(MasterSlaveProcess const& rOther) = delete;
224 
226  //MasterSlaveProcess(MasterSlaveProcess const& rOther);
227 
228 
230 
231 }; // Class MasterSlaveProcess
232 
234 
237 
238 
242 
244 // inline std::istream& operator >> (std::istream& rIStream,
245 // MasterSlaveProcess& rThis);
246 //
247 // /// output stream function
248 // inline std::ostream& operator << (std::ostream& rOStream,
249 // const MasterSlaveProcess& rThis)
250 // {
251 // rThis.PrintInfo(rOStream);
252 // rOStream << std::endl;
253 // rThis.PrintData(rOStream);
254 //
255 // return rOStream;
256 // }
257 
258 }
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
std::size_t IndexType
Definition: flags.h:74
Geometry base class.
Definition: geometry.h:71
This process assigns as master/slave the conditions.
Definition: master_slave_process.h:49
~MasterSlaveProcess() override=default
Destructor.
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: master_slave_process.h:134
std::string Info() const override
Turn back information as a string.
Definition: master_slave_process.h:128
ModelPart::ConditionsContainerType ConditionsArrayType
Definition: master_slave_process.h:63
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: master_slave_process.h:140
KRATOS_CLASS_POINTER_DEFINITION(MasterSlaveProcess)
Pointer definition of MasterSlaveProcess.
ModelPart::NodesContainerType NodesArrayType
Definition: master_slave_process.h:62
MasterSlaveProcess(ModelPart &rThisModelPart)
Default constructor.
Definition: master_slave_process.h:70
void operator()()
Definition: master_slave_process.h:102
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
MeshType::ConditionsContainerType ConditionsContainerType
Condintions container. A vector set of Conditions with their Id's as key.
Definition: model_part.h:183
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
The base class for all processes in Kratos.
Definition: process.h:49
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21