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.
divide_triangle_2d_3.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: Ruben Zorrilla
11 //
12 
13 #if !defined(KRATOS_DIVIDE_TRIANGLE_2D_3_UTILS)
14 #define KRATOS_DIVIDE_TRIANGLE_2D_3_UTILS
15 
16 // System includes
17 #include <bitset>
18 
19 // External includes
20 
21 // Project includes
22 
23 #include "geometries/line_2d_2.h"
26 
27 namespace Kratos
28 {
31 
35 
39 
43 
44 template<class TPointType>
45 class KRATOS_API(KRATOS_CORE) DivideTriangle2D3 : public DivideGeometry<TPointType>
46 {
47 public:
50 
60 
63 
64  const std::vector<int> mEdgeNodeI = {0, 1, 2};
65  const std::vector<int> mEdgeNodeJ = {1, 2, 0};
66  std::vector<int> mSplitEdges = {0, 1, 2, -1, -1, -1};
67 
71 
73  DivideTriangle2D3(const GeometryType& rInputGeometry, const Vector& rNodalDistances);
74 
77 
81 
85 
89 
91  std::string Info() const override;
92 
94  void PrintInfo(std::ostream& rOStream) const override;
95 
97  void PrintData(std::ostream& rOStream) const override;
98 
102 
106 
110  const std::vector<int>& GetEdgeIdsI() const override;
111 
115  const std::vector<int>& GetEdgeIdsJ() const override;
116 
120  std::vector<int>& GetSplitEdges() override;
121 
125  void GenerateDivision() override;
126 
130  void GenerateIntersectionsSkin() override;
131 
138  void GenerateExteriorFaces(
139  std::vector < IndexedPointGeometryPointerType > &rExteriorFacesVector,
140  std::vector < unsigned int > &rExteriorFacesParentSubdivisionsIdsVector,
141  const std::vector < IndexedPointGeometryPointerType > &rSubdivisionsContainer) override;
142 
151  void GenerateExteriorFaces(
152  std::vector < IndexedPointGeometryPointerType > &rExteriorFacesVector,
153  std::vector < unsigned int > &rExteriorFacesParentSubdivisionsIdsVector,
154  const std::vector < IndexedPointGeometryPointerType > &rSubdivisionsContainer,
155  const unsigned int FatherFaceId) override;
156 
158 
159  virtual IndexedPointGeometryPointerType GenerateAuxiliaryPartitionTriangle(
160  const int I0,
161  const int I1,
162  const int I2);
163 
164  virtual IndexedPointGeometryPointerType GenerateIntersectionLine(
165  const int I0,
166  const int I1);
167 
168 private:
171 
175 
176  std::bitset<3> mNodeIsCut{0x0}; // If the cut passes through a node, store this information here
177 
181 
185 
189 
193 
197 
198  bool NodeIsInterface(int NodeKey) const;
199 
203 
205  DivideTriangle2D3& operator=(DivideTriangle2D3 const& rOther);
206 
208  DivideTriangle2D3(DivideTriangle2D3 const& rOther)
209  : DivideGeometry<TPointType>(rOther.GetInputGeometry(), rOther.GetNodalDistances()) {};
210 
212 
213 };// class DivideTriangle2D3
214 
215 }
216 #endif /* KRATOS_DIVIDE_TRIANGLE_2D_3_UTILS defined */
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
Definition: divide_geometry.h:167
IndexedPoint::Pointer IndexedPointPointerType
Definition: divide_geometry.h:179
Geometry< IndexedPoint >::Pointer IndexedPointGeometryPointerType
Definition: divide_geometry.h:181
Definition: divide_triangle_2d_3.h:46
BaseType::IndexedPointType IndexedPointType
Definition: divide_triangle_2d_3.h:53
BaseType::IndexedPointGeometryType IndexedPointGeometryType
Definition: divide_triangle_2d_3.h:55
DivideGeometry< TPointType > BaseType
Definition: divide_triangle_2d_3.h:51
Line2D2< IndexedPointType > IndexedPointLineType
Definition: divide_triangle_2d_3.h:58
BaseType::GeometryType GeometryType
Definition: divide_triangle_2d_3.h:52
Triangle2D3< IndexedPointType > IndexedPointTriangleType
Definition: divide_triangle_2d_3.h:59
BaseType::IndexedPointPointerType IndexedPointPointerType
Definition: divide_triangle_2d_3.h:54
KRATOS_CLASS_POINTER_DEFINITION(DivideTriangle2D3)
Pointer definition of DivideTriangle2D3.
BaseType::IndexedPointGeometryPointerType IndexedPointGeometryPointerType
Definition: divide_triangle_2d_3.h:57
BaseType::IndexedPointGeometryType::GeometriesArrayType IndexedGeometriesArrayType
Definition: divide_triangle_2d_3.h:56
Geometry base class.
Definition: geometry.h:71
Definition: divide_geometry.h:46
An two node 2D line geometry with linear shape functions.
Definition: line_2d_2.h:65
A three node 2D triangle geometry with linear shape functions.
Definition: triangle_2d_3.h:74
typename GeometryType::GeometriesArrayType GeometriesArrayType
Definition: add_geometries_to_python.cpp:62
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
I1
Definition: isotropic_damage_automatic_differentiation.py:230
tuple I2
Definition: isotropic_damage_automatic_differentiation.py:231