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.
serial_model_part_combinator_modeler.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 #if !defined(KRATOS_SERIAL_MODEL_PART_COMBINATOR_MODELER_INCLUDED_H)
14 #define KRATOS_SERIAL_MODEL_PART_COMBINATOR_MODELER_INCLUDED_H
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
21 #include "modeler/modeler.h"
22 #include "containers/model.h"
24 
25 namespace Kratos
26 {
29 
33 
37 
41 
45 
53 class KRATOS_API(KRATOS_CORE) SerialModelPartCombinatorModeler
54  : public Modeler {
55 public:
58 
61 
65 
68  {
69  }
70 
77  Model& rModel,
78  Parameters ModelerParameters = Parameters()
79  ) : Modeler(rModel, ModelerParameters),
80  mpModel(&rModel),
81  mParameters(ModelerParameters)
82  {
83  }
84 
86  virtual ~SerialModelPartCombinatorModeler() = default;
87 
91 
95 
103  Modeler::Pointer Create(
104  Model& rModel,
105  const Parameters ModelParameters
106  ) const override;
107 
111  void SetupModelPart() override;
112 
116 
118  std::string Info() const override
119  {
120  return "SerialModelPartCombinatorModeler";
121  }
122 
124  void PrintInfo(std::ostream& rOStream) const override
125  {
126  rOStream << Info();
127  }
128 
130  void PrintData(std::ostream& rOStream) const override
131  {
132  }
133 
135 protected:
136 
139 
143 
147 
151 
155 
159 
164 
165 private:
171 
172  Model* mpModel = nullptr;
173 
174  Parameters mParameters;
175 
179 
183 
188 
192 
193  friend class Serializer;
194 
195  void save(Serializer& rSerializer) const
196  {
197  }
198 
199  void load(Serializer& rSerializer)
200  {
201  }
202 
206 
210 
211 }; // Class SerialModelPartCombinatorModeler
212 
216 
218 inline std::istream& operator>>(std::istream& rIStream,
220 {
221  return rIStream;
222 }
223 
225 inline std::ostream& operator<<(std::ostream& rOStream, const SerialModelPartCombinatorModeler& rThis)
226 {
227  rThis.PrintInfo(rOStream);
228  rOStream << std::endl;
229  rThis.PrintData(rOStream);
230 
231  return rOStream;
232 }
233 
235 
236 } // namespace Kratos.
237 
238 #endif // KRATOS_SERIAL_MODEL_PART_COMBINATOR_MODELER_INCLUDED_H 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
Modeler to interact with ModelParts.
Definition: modeler.h:39
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
This modeler combines several model parts in serial, reading its respective *.mdpa files (maybe other...
Definition: serial_model_part_combinator_modeler.h:54
virtual ~SerialModelPartCombinatorModeler()=default
Destructor.
std::string Info() const override
Turn back information as a string.
Definition: serial_model_part_combinator_modeler.h:118
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: serial_model_part_combinator_modeler.h:130
SerialModelPartCombinatorModeler(Model &rModel, Parameters ModelerParameters=Parameters())
Constructor using a Model and Parameters.
Definition: serial_model_part_combinator_modeler.h:76
SerialModelPartCombinatorModeler()
Default constructor.
Definition: serial_model_part_combinator_modeler.h:67
KRATOS_CLASS_POINTER_DEFINITION(SerialModelPartCombinatorModeler)
Pointer definition of SerialModelPartCombinatorModeler.
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: serial_model_part_combinator_modeler.h:124
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
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