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.
check_same_modelpart_using_skin_distance_process.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: Vicente Mataix Ferrandiz
11 //
12 //
13 
14 #pragma once
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
21 #include "includes/define.h"
22 #include "processes/process.h"
23 #include "containers/model.h"
25 
26 namespace Kratos
27 {
28 
31 
35 
39 
43 
47 
55 template<std::size_t TDim>
56 class KRATOS_API(KRATOS_CORE) CheckSameModelPartUsingSkinDistanceProcess
57  : public Process
58 {
59 public:
62 
65 
69 
72  Model& rModel,
73  Parameters ThisParameters = Parameters(R"({})")
74  )
75  : mrSkinModelPart1(rModel.GetModelPart(ThisParameters["skin_model_part_1_name"].GetString())),
76  mrSkinModelPart2(rModel.GetModelPart(ThisParameters["skin_model_part_2_name"].GetString())),
77  mThisParameters(ThisParameters)
78  {
80 
81  Parameters default_parameters = GetDefaultParameters();
82  mThisParameters.RecursivelyValidateAndAssignDefaults(default_parameters);
83 
84  KRATOS_CATCH("");
85  }
86 
89 
93 
94 
98 
99  void Execute() override;
100 
108  Process::Pointer Create(
109  Model& rModel,
110  Parameters ThisParameters
111  ) override
112  {
113  return Kratos::make_shared<CheckSameModelPartUsingSkinDistanceProcess<TDim>>(rModel, ThisParameters);
114  }
115 
119  const Parameters GetDefaultParameters() const override;
120 
124 
128 
132 
134  std::string Info() const override
135  {
136  return "CheckSameModelPartUsingSkinDistanceProcess" + std::to_string(TDim) + "D";
137  }
138 
140  void PrintInfo(std::ostream& rOStream) const override
141  {
142  rOStream << "CheckSameModelPartUsingSkinDistanceProcess" << TDim << "D";
143  }
144 
146  void PrintData(std::ostream& rOStream) const override
147  {
148  }
149 
153 
155 private:
158 
162 
163  ModelPart& mrSkinModelPart1;
164  ModelPart& mrSkinModelPart2;
165  Parameters mThisParameters;
166 
170 
174 
178 
182 
186 
189 
191  //CheckSameModelPartUsingSkinDistanceProcess(CheckSameModelPartUsingSkinDistanceProcess const& rOther);
192 
194 }; // Class CheckSameModelPartUsingSkinDistanceProcess
195 
199 
203 
204 
206 template<std::size_t TDim>
207 inline std::istream& operator >> (std::istream& rIStream,
209 
211 template<std::size_t TDim>
212 inline std::ostream& operator << (std::ostream& rOStream,
214 {
215  rThis.PrintInfo(rOStream);
216  rOStream << std::endl;
217  rThis.PrintData(rOStream);
218 
219  return rOStream;
220 }
222 
223 } // namespace Kratos.
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Checks that the model part is the same using the skin distance.
Definition: check_same_modelpart_using_skin_distance_process.h:58
std::string Info() const override
Turn back information as a string.
Definition: check_same_modelpart_using_skin_distance_process.h:134
KRATOS_CLASS_POINTER_DEFINITION(CheckSameModelPartUsingSkinDistanceProcess)
Pointer definition of CheckSameModelPartUsingSkinDistanceProcess.
~CheckSameModelPartUsingSkinDistanceProcess() override=default
Destructor.
Process::Pointer Create(Model &rModel, Parameters ThisParameters) override
This method creates an pointer of the process.
Definition: check_same_modelpart_using_skin_distance_process.h:108
CheckSameModelPartUsingSkinDistanceProcess(Model &rModel, Parameters ThisParameters=Parameters(R"({})"))
Default constructor.
Definition: check_same_modelpart_using_skin_distance_process.h:71
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: check_same_modelpart_using_skin_distance_process.h:140
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: check_same_modelpart_using_skin_distance_process.h:146
This class aims to manage different model parts across multi-physics simulations.
Definition: model.h:60
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
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
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