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.
duplicate_mesh_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: Riccardo Rossi
11 //
12 //
13 
14 #if !defined(KRATOS_COPY_MODELER_H_INCLUDED )
15 #define KRATOS_COPY_MODELER_H_INCLUDED
16 
17 
18 
19 // System includes
20 #include <string>
21 #include <iostream>
22 
23 
24 // External includes
25 
26 
27 // Project includes
28 #include "includes/define.h"
29 #include "modeler/modeler.h"
30 
31 namespace Kratos
32 {
33 
36 
40 
44 
48 
52 
54 
57 class KRATOS_API(KRATOS_CORE) DuplicateMeshModeler : public Modeler
58 {
59 public:
62 
65 
66  typedef Modeler BaseType;
67 
68  typedef Point PointType;
69 
70  typedef Node NodeType;
71 
73 
75 
76  typedef std::size_t SizeType;
77 
81 
83 
84  DuplicateMeshModeler(ModelPart& rSourceModelPart) :
85  mrModelPart(rSourceModelPart)
86  {
87  }
88 
90 
92  {
93  }
94 
95 
99 
100 
104 
105  void GenerateMesh(ModelPart& rThisModelPart, Element const& rReferenceElement, Condition const& rReferenceCondition) override;
106 
110 
111 
115 
116 
120 
122 
123  virtual std::string Info() const override
124  {
125  return "DuplicateMeshModeler";
126  }
127 
129 
130  virtual void PrintInfo(std::ostream& rOStream) const override
131  {
132  rOStream << Info();
133  }
134 
136 
137  virtual void PrintData(std::ostream& rOStream) const override
138  {
139  }
140 
141 
145 
146 
148 
149 protected:
152 
153 
157 
158 
162 
163 
167 
168 
172 
173 
177 
178 
182 
183 
185 
186 private:
189 
190 
194 
195  ModelPart& mrModelPart;
196 
200 
201 
205 
206 
210 
211 
215 
216 
220 
221 
223 
224 }; // Class DuplicateMeshModeler
225 
227 
230 
231 
235 
236 
238 inline std::istream & operator >>(std::istream& rIStream,
239  DuplicateMeshModeler& rThis);
240 
242 
243 inline std::ostream & operator <<(std::ostream& rOStream,
244  const DuplicateMeshModeler& rThis)
245 {
246  rThis.PrintInfo(rOStream);
247  rOStream << std::endl;
248  rThis.PrintData(rOStream);
249 
250  return rOStream;
251 }
253 
254 
255 } // namespace Kratos.
256 
257 #endif // KRATOS_COPY_MODELER_H_INCLUDED defined
258 
259 
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
Base class for all Conditions.
Definition: condition.h:59
Short class definition.
Definition: duplicate_mesh_modeler.h:58
Geometry< NodeType > GeometryType
Definition: duplicate_mesh_modeler.h:72
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: duplicate_mesh_modeler.h:137
virtual ~DuplicateMeshModeler()
Destructor.
Definition: duplicate_mesh_modeler.h:91
Modeler BaseType
Definition: duplicate_mesh_modeler.h:66
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: duplicate_mesh_modeler.h:130
DuplicateMeshModeler(ModelPart &rSourceModelPart)
constructor.
Definition: duplicate_mesh_modeler.h:84
Node NodeType
Definition: duplicate_mesh_modeler.h:70
KRATOS_CLASS_POINTER_DEFINITION(DuplicateMeshModeler)
Pointer definition of DuplicateMeshModeler.
PointerVector< NodeType > NodesVectorType
Definition: duplicate_mesh_modeler.h:74
std::size_t SizeType
Definition: duplicate_mesh_modeler.h:76
virtual std::string Info() const override
Turn back information as a string.
Definition: duplicate_mesh_modeler.h:123
Point PointType
Definition: duplicate_mesh_modeler.h:68
Base class for all Elements.
Definition: element.h:60
Geometry base class.
Definition: geometry.h:71
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
Modeler to interact with ModelParts.
Definition: modeler.h:39
This class defines the node.
Definition: node.h:65
Point class.
Definition: point.h:59
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
void GenerateMesh(Modeler &GM, ModelPart &model_part, const std::string &rElementName, const std::string &rConditionName)
Definition: add_modeler_to_python.cpp:35
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