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.
model_part_combination_utilities.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 #if !defined(KRATOS_MODEL_PART_COMBINATION_UTILITIES)
15 #define KRATOS_MODEL_PART_COMBINATION_UTILITIES
16 
17 // System includes
18 
19 // External includes
20 
21 // Project includes
22 #include "containers/model.h"
23 
24 namespace Kratos
25 {
28 
32 
36 
40 
47 class KRATOS_API(KRATOS_CORE) ModelPartCombinationUtilities
48 {
49 public:
52 
55 
59 
64  mrModel(rModel)
65  {
66  }
67 
68  virtual ~ModelPartCombinationUtilities()= default;
69 
73 
77 
81 
85 
89 
94  ModelPart& CombineModelParts(Parameters ThisParameters = Parameters(R"({})"));
95 
97  virtual std::string Info() const
98  {
99  return "ModelPartCombinationUtilities";
100  }
101 
103  virtual void PrintInfo(std::ostream& rOStream) const
104  {
105  rOStream << Info() << std::endl;
106  }
107 
109  virtual void PrintData(std::ostream& rOStream) const
110  {
111  rOStream << Info() << std::endl;
112  }
113 
117 
119 protected:
120 
123 
127 
131 
135 
139 
143 
148 
149 private:
155 
156  Model& mrModel;
157 
161 
165 
170  void CheckSubModelParts(const std::vector<std::string>& rModelPartsNames);
171 
176  void ReorderIds(const std::vector<std::string>& rModelPartsNames);
177 
183  void RecursiveAddOfModelPartsToList(
184  ModelPart& rModelPart,
185  std::unordered_map<std::string, std::size_t>& rListModelParts
186  );
187 
193  void RecursiveAddEntities(
194  ModelPart& rDestinationModelPart,
195  ModelPart& rOriginModelPart
196  );
197 
201  const Parameters GetDefaultParameters() const;
202 
207 
211 
212  friend class Serializer;
213 
214  void save(Serializer& rSerializer) const
215  {
216  }
217 
218  void load(Serializer& rSerializer)
219  {
220  }
221 
225 
229 };// class ModelPartCombinationUtilities
230 
234 
235 
239 
241 
242 } // namespace Kratos.
243 #endif /* KRATOS_MODEL_PART_COMBINATION_UTILITIES defined */
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
This class aims to manage different model parts across multi-physics simulations.
Definition: model.h:60
This utility helps combine different ModelParts into one single ModelPart, with the corresponding sub...
Definition: model_part_combination_utilities.h:48
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: model_part_combination_utilities.h:103
KRATOS_CLASS_POINTER_DEFINITION(ModelPartCombinationUtilities)
Counted pointer of ModelPartCombinationUtilities.
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: model_part_combination_utilities.h:109
virtual std::string Info() const
Turn back information as a string.
Definition: model_part_combination_utilities.h:97
virtual ~ModelPartCombinationUtilities()=default
ModelPartCombinationUtilities(Model &rModel)
Definition: model_part_combination_utilities.h:63
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 serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307