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.
tetrahedra_edge_shell.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: Pooyan Dadvand
11 //
12 //
13 
14 
15 #if !defined(KRATOS_TETRAHEDRA_EDGE_SHELL_H_INCLUDED )
16 #define KRATOS_TETRAHEDRA_EDGE_SHELL_H_INCLUDED
17 
18 // System includes
19 #include <string>
20 #include <iostream>
21 
22 
23 // External includes
24 
25 
26 // Project includes
27 #include "includes/define.h"
28 #include "includes/node.h"
29 #include "geometries/geometry.h"
30 
31 
32 namespace Kratos
33 {
36 
39 
43 
47 
51 
55 
57 
62  {
63  public:
66 
69 
70  using PointType = Node;
72 
76 
78  TetrahedraEdgeShell() = delete;
79 
81  TetrahedraEdgeShell(PointType& EdgePoint1, PointType& EdgePoint2);
82 
84  : mrPoint1(rOther.mrPoint1) , mrPoint2(rOther.mrPoint2), mShellPoints(rOther.mShellPoints), mTetrahedra(rOther.mTetrahedra)
85  {
86  }
87 
89  virtual ~TetrahedraEdgeShell();
90 
91 
95 
96 
100 
101  void AddTetrahedron(GeomertyType* TheTetrahedron);
102 
103  void AddShellPoints(PointType* pPoint1, PointType* pPoint2);
104 
105 
109 
110  std::size_t GetNumberOfShellPoints() const {
111  return mShellPoints.size();
112  }
113 
114  std::size_t GetNumberOfTetrahedra() const {
115  return mTetrahedra.size();
116  }
117 
118 
122 
123 
127 
129  virtual std::string Info() const;
130 
132  virtual void PrintInfo(std::ostream& rOStream) const;
133 
135  virtual void PrintData(std::ostream& rOStream) const;
136 
137 
141 
142 
144 
145  private:
148 
149 
153 
154  PointType const& mrPoint1;
155  PointType const& mrPoint2;
156 
157  std::vector<std::pair<PointType*,PointType*> > mShellPoints;
158  std::vector<GeomertyType*> mTetrahedra;
159 
160 
164 
165 
169 
170 
174 
175 
179 
180 
184 
186  TetrahedraEdgeShell& operator=(TetrahedraEdgeShell const& rOther);
187 
190 
191 
193 
194  }; // Class TetrahedraEdgeShell
195 
197 
200 
201 
205 
206 
208  inline std::istream& operator >> (std::istream& rIStream,
209  TetrahedraEdgeShell& rThis);
210 
212  inline std::ostream& operator << (std::ostream& rOStream,
213  const TetrahedraEdgeShell& rThis)
214  {
215  rThis.PrintInfo(rOStream);
216  rOStream << std::endl;
217  rThis.PrintData(rOStream);
218 
219  return rOStream;
220  }
222 
224 
225 } // namespace Kratos.
226 
227 #endif // KRATOS_TETRAHEDRA_EDGE_SHELL_H_INCLUDED defined
Geometry base class.
Definition: geometry.h:71
This class defines the node.
Definition: node.h:65
Point class.
Definition: point.h:59
This class defines an edge shell for a mesh of tetrahedra.
Definition: tetrahedra_edge_shell.h:62
std::size_t GetNumberOfShellPoints() const
Definition: tetrahedra_edge_shell.h:110
std::size_t GetNumberOfTetrahedra() const
Definition: tetrahedra_edge_shell.h:114
TetrahedraEdgeShell()=delete
Default constructor is deleted.
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: tetrahedra_edge_shell.cpp:66
void AddShellPoints(PointType *pPoint1, PointType *pPoint2)
Definition: tetrahedra_edge_shell.cpp:57
virtual std::string Info() const
Turn back information as a string.
Definition: tetrahedra_edge_shell.cpp:61
TetrahedraEdgeShell(TetrahedraEdgeShell &&rOther) noexcept
Definition: tetrahedra_edge_shell.h:83
void AddTetrahedron(GeomertyType *TheTetrahedron)
Definition: tetrahedra_edge_shell.cpp:38
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: tetrahedra_edge_shell.cpp:71
KRATOS_CLASS_POINTER_DEFINITION(TetrahedraEdgeShell)
Pointer definition of TetrahedraEdgeShell.
Geometry< PointType > GeomertyType
Definition: tetrahedra_edge_shell.h:71
virtual ~TetrahedraEdgeShell()
Destructor.
Definition: tetrahedra_edge_shell.cpp:34
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