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.
cad_io_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 //
11 
12 
13 #if !defined(KRATOS_IGA_IO_MODELER_H_INCLUDED )
14 #define KRATOS_IGA_IO_MODELER_H_INCLUDED
15 
16 
17 // System includes
18 
19 // External includes
20 
21 // Project includes
22 #include "modeler.h"
23 
24 
25 namespace Kratos
26 {
27 
30 
32 
34 class KRATOS_API(KRATOS_CORE) CadIoModeler
35  : public Modeler
36 {
37 public:
40 
43 
44  typedef std::size_t SizeType;
45  typedef std::size_t IndexType;
46 
50 
53  : Modeler()
54  {
55  }
56 
59  Model& rModel,
60  Parameters ModelerParameters = Parameters())
61  : Modeler(rModel, ModelerParameters)
62  , mpModel(&rModel)
63  {
64  }
65 
67  virtual ~CadIoModeler() = default;
68 
70  Modeler::Pointer Create(
71  Model& rModel, const Parameters ModelParameters) const override
72  {
73  return Kratos::make_shared<CadIoModeler>(rModel, ModelParameters);
74  }
75 
79 
80  void SetupGeometryModel() override;
81 
82  void SetupModelPart() override;
83 
87 
89  std::string Info() const override
90  {
91  return "CadIoModeler";
92  }
93 
95  void PrintInfo(std::ostream & rOStream) const override
96  {
97  rOStream << Info();
98  }
99 
101  void PrintData(std::ostream & rOStream) const override
102  {
103  }
104 
106 
107 private:
110 
111  Model* mpModel = nullptr;
112 
116 
117  friend class Serializer;
118 
120 }; // Class CadIoModeler
121 
125 
127 inline std::istream& operator >> (
128  std::istream& rIStream,
129  CadIoModeler& rThis);
130 
132 inline std::ostream& operator << (
133  std::ostream& rOStream,
134  const CadIoModeler& rThis)
135 {
136  rThis.PrintInfo(rOStream);
137  rOStream << std::endl;
138  rThis.PrintData(rOStream);
139 
140  return rOStream;
141 }
142 
144 
145 } // namespace Kratos.
146 
147 #endif // KRATOS_IGA_IO_MODELER_H_INCLUDED defined
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
Short class definition.
Definition: cad_io_modeler.h:36
CadIoModeler()
Default constructor.
Definition: cad_io_modeler.h:52
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: cad_io_modeler.h:95
std::size_t SizeType
Definition: cad_io_modeler.h:44
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: cad_io_modeler.h:101
std::string Info() const override
Turn back information as a string.
Definition: cad_io_modeler.h:89
Modeler::Pointer Create(Model &rModel, const Parameters ModelParameters) const override
Creates the Modeler Pointer.
Definition: cad_io_modeler.h:70
virtual ~CadIoModeler()=default
Destructor.
std::size_t IndexType
Definition: cad_io_modeler.h:45
KRATOS_CLASS_POINTER_DEFINITION(CadIoModeler)
Pointer definition of Modeler.
CadIoModeler(Model &rModel, Parameters ModelerParameters=Parameters())
Constructor.
Definition: cad_io_modeler.h:58
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
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
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