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.
triangle_gauss_legendre_integration_points.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: Josep Maria Carbonell
11 //
12 //
13 
14 #if !defined(KRATOS_TRIANGLE_GAUSS_LEGENDRE_INTEGRATION_POINTS_H_INCLUDED )
15 #define KRATOS_TRIANGLE_GAUSS_LEGENDRE_INTEGRATION_POINTS_H_INCLUDED
16 
17 // System includes
18 
19 // External includes
20 
21 // Project includes
22 #include "integration/quadrature.h"
23 
24 namespace Kratos
25 {
26 
28 {
29 public:
31  typedef std::size_t SizeType;
32 
33  static const unsigned int Dimension = 2;
34 
36 
37  typedef std::array<IntegrationPointType, 1> IntegrationPointsArrayType;
38 
40 
42  {
43  return 1;
44  }
45 
47  {
48  static const IntegrationPointsArrayType s_integration_points{{
49  IntegrationPointType( 1.00 / 3.00 , 1.00 / 3.00 , 1.00 / 2.00 )
50  }};
51  return s_integration_points;
52  }
53 
54  std::string Info() const
55  {
56  std::stringstream buffer;
57  buffer << "Triangle Gauss-Legendre quadrature 1 ";
58  return buffer.str();
59  }
60 
61 
62 }; // Class TriangleGaussLegendreIntegrationPoints1
63 
64 
66 {
67 public:
69  typedef std::size_t SizeType;
70 
71  static const unsigned int Dimension = 2;
72 
74 
75  typedef std::array<IntegrationPointType, 3> IntegrationPointsArrayType;
76 
78 
80  {
81  return 3;
82  }
83 
85  {
86  static const IntegrationPointsArrayType s_integration_points{{
87  IntegrationPointType( 1.00 / 6.00 , 1.00 / 6.00 , 1.00 / 6.00 ),
88  IntegrationPointType( 2.00 / 3.00 , 1.00 / 6.00 , 1.00 / 6.00 ),
89  IntegrationPointType( 1.00 / 6.00 , 2.00 / 3.00 , 1.00 / 6.00 )
90  }};
91  return s_integration_points;
92  }
93 
94  std::string Info() const
95  {
96  std::stringstream buffer;
97  buffer << "Triangle Gauss-Legendre quadrature 2 ";
98  return buffer.str();
99  }
100 
101 
102 }; // Class TriangleGaussLegendreIntegrationPoints2
103 
104 
106 {
107 public:
109  typedef std::size_t SizeType;
110 
111  static const unsigned int Dimension = 2;
112 
114 
115  typedef std::array<IntegrationPointType, 4> IntegrationPointsArrayType;
116 
118 
120  {
121  return 4;
122  }
123 
125  {
126  static const IntegrationPointsArrayType s_integration_points{{
127  IntegrationPointType( 1.00 / 5.00 , 1.00 / 5.00 , 25.00 / 96.00 ),
128  IntegrationPointType( 3.00 / 5.00 , 1.00 / 5.00 , 25.00 / 96.00 ),
129  IntegrationPointType( 1.00 / 5.00 , 3.00 / 5.00 , 25.00 / 96.00 ),
130  IntegrationPointType( 1.00 / 3.00 , 1.00 / 3.00 , -27.00 / 96.00 )
131  }};
132  return s_integration_points;
133  }
134 
135  std::string Info() const
136  {
137  std::stringstream buffer;
138  buffer << "Triangle Gauss-Legendre quadrature 3 ";
139  return buffer.str();
140  }
141 
142 
143 }; // Class TriangleGaussLegendreIntegrationPoints2
144 
145 
147 {
148 public:
150  typedef std::size_t SizeType;
151 
152  static const unsigned int Dimension = 2;
153 
155 
156  typedef std::array<IntegrationPointType, 6> IntegrationPointsArrayType;
157 
159 
161  {
162  return 6;
163  }
164 
166  {
167  const double wa = 0.054975871827661;
168  const double wb = 0.1116907948390055;
169  const double Na1 = 0.816847572980459;
170  const double Nb1 = 0.108103018168070;
171  const double Na2 = 0.091576213509771;
172  const double Nb2 = 0.445948490915965;
173 
174  static const IntegrationPointsArrayType s_integration_points{{
175  IntegrationPointType( Na2, Na2, wa ),
176  IntegrationPointType( Na1, Na2, wa ),
177  IntegrationPointType( Na2, Na1, wa ),
178  IntegrationPointType( Nb2, Nb2, wb ),
179  IntegrationPointType( Nb1, Nb2, wb ),
180  IntegrationPointType( Nb2, Nb1, wb )
181  }};
182  return s_integration_points;
183  }
184 
185  std::string Info() const
186  {
187  std::stringstream buffer;
188  buffer << "Triangle Gauss-Legendre quadrature 4 ";
189  return buffer.str();
190  }
191 
192 
193 }; // Class TriangleGaussLegendreIntegrationPoints4
194 
196 {
197 public:
199  typedef std::size_t SizeType;
200 
201  static const unsigned int Dimension = 2;
202 
204 
205  typedef std::array<IntegrationPointType, 12> IntegrationPointsArrayType;
206 
208 
210  {
211  return 12;
212  }
213 
215  {
216  const double wa = 0.025422453185103408460;
217  const double wb = 0.058393137863189683013;
218  const double wc = 0.041425537809186787597;
219 
220  const double N1 = 0.87382197101699554332;
221  const double N2 = 0.063089014491502228340;
222  const double N3 = 0.50142650965817915742;
223  const double N4 = 0.24928674517091042129;
224  const double N5 = 0.053145049844816947353;
225  const double N6 = 0.31035245103378440542;
226  const double N7 = 0.63650249912139864723;
227 
228  static const IntegrationPointsArrayType s_integration_points{{
229  IntegrationPointType( N1, N2, wa ),
230  IntegrationPointType( N2, N1, wa ),
231  IntegrationPointType( N2, N2, wa ),
232  IntegrationPointType( N3, N4, wb ),
233  IntegrationPointType( N4, N3, wb ),
234  IntegrationPointType( N4, N4, wb ),
235  IntegrationPointType( N5, N6, wc ),
236  IntegrationPointType( N6, N5, wc ),
237  IntegrationPointType( N5, N7, wc ),
238  IntegrationPointType( N6, N7, wc ),
239  IntegrationPointType( N7, N5, wc ),
240  IntegrationPointType( N7, N6, wc )
241  }};
242  return s_integration_points;
243  }
244 
245  std::string Info() const
246  {
247  std::stringstream buffer;
248  buffer << "Triangle Gauss-Legendre quadrature 5 ";
249  return buffer.str();
250  }
251 
252 
253 }; // Class TriangleGaussLegendreIntegrationPoints5
254 
255 
258 
259 
263 
264 
266 
267 
268 } // namespace Kratos.
269 
270 #endif // KRATOS_TRIANGLE_GAUSS_LEGENDRE_INTEGRATION_POINTS_H_INCLUDED defined
271 
272 
Short class definition.
Definition: integration_point.h:52
Point class.
Definition: point.h:59
Definition: triangle_gauss_legendre_integration_points.h:28
IntegrationPoint< 2 > IntegrationPointType
Definition: triangle_gauss_legendre_integration_points.h:35
KRATOS_CLASS_POINTER_DEFINITION(TriangleGaussLegendreIntegrationPoints1)
static SizeType IntegrationPointsNumber()
Definition: triangle_gauss_legendre_integration_points.h:41
static const unsigned int Dimension
Definition: triangle_gauss_legendre_integration_points.h:33
std::size_t SizeType
Definition: triangle_gauss_legendre_integration_points.h:31
IntegrationPointType::PointType PointType
Definition: triangle_gauss_legendre_integration_points.h:39
std::string Info() const
Definition: triangle_gauss_legendre_integration_points.h:54
static const IntegrationPointsArrayType & IntegrationPoints()
Definition: triangle_gauss_legendre_integration_points.h:46
std::array< IntegrationPointType, 1 > IntegrationPointsArrayType
Definition: triangle_gauss_legendre_integration_points.h:37
Definition: triangle_gauss_legendre_integration_points.h:66
static const unsigned int Dimension
Definition: triangle_gauss_legendre_integration_points.h:71
static const IntegrationPointsArrayType & IntegrationPoints()
Definition: triangle_gauss_legendre_integration_points.h:84
std::array< IntegrationPointType, 3 > IntegrationPointsArrayType
Definition: triangle_gauss_legendre_integration_points.h:75
IntegrationPointType::PointType PointType
Definition: triangle_gauss_legendre_integration_points.h:77
std::size_t SizeType
Definition: triangle_gauss_legendre_integration_points.h:69
IntegrationPoint< 2 > IntegrationPointType
Definition: triangle_gauss_legendre_integration_points.h:73
static SizeType IntegrationPointsNumber()
Definition: triangle_gauss_legendre_integration_points.h:79
KRATOS_CLASS_POINTER_DEFINITION(TriangleGaussLegendreIntegrationPoints2)
std::string Info() const
Definition: triangle_gauss_legendre_integration_points.h:94
Definition: triangle_gauss_legendre_integration_points.h:106
IntegrationPoint< 2 > IntegrationPointType
Definition: triangle_gauss_legendre_integration_points.h:113
static const IntegrationPointsArrayType & IntegrationPoints()
Definition: triangle_gauss_legendre_integration_points.h:124
std::string Info() const
Definition: triangle_gauss_legendre_integration_points.h:135
std::size_t SizeType
Definition: triangle_gauss_legendre_integration_points.h:109
static SizeType IntegrationPointsNumber()
Definition: triangle_gauss_legendre_integration_points.h:119
std::array< IntegrationPointType, 4 > IntegrationPointsArrayType
Definition: triangle_gauss_legendre_integration_points.h:115
IntegrationPointType::PointType PointType
Definition: triangle_gauss_legendre_integration_points.h:117
KRATOS_CLASS_POINTER_DEFINITION(TriangleGaussLegendreIntegrationPoints3)
static const unsigned int Dimension
Definition: triangle_gauss_legendre_integration_points.h:111
Definition: triangle_gauss_legendre_integration_points.h:147
IntegrationPointType::PointType PointType
Definition: triangle_gauss_legendre_integration_points.h:158
static const IntegrationPointsArrayType & IntegrationPoints()
Definition: triangle_gauss_legendre_integration_points.h:165
KRATOS_CLASS_POINTER_DEFINITION(TriangleGaussLegendreIntegrationPoints4)
static SizeType IntegrationPointsNumber()
Definition: triangle_gauss_legendre_integration_points.h:160
static const unsigned int Dimension
Definition: triangle_gauss_legendre_integration_points.h:152
IntegrationPoint< 2 > IntegrationPointType
Definition: triangle_gauss_legendre_integration_points.h:154
std::string Info() const
Definition: triangle_gauss_legendre_integration_points.h:185
std::size_t SizeType
Definition: triangle_gauss_legendre_integration_points.h:150
std::array< IntegrationPointType, 6 > IntegrationPointsArrayType
Definition: triangle_gauss_legendre_integration_points.h:156
Definition: triangle_gauss_legendre_integration_points.h:196
IntegrationPoint< 2 > IntegrationPointType
Definition: triangle_gauss_legendre_integration_points.h:203
std::string Info() const
Definition: triangle_gauss_legendre_integration_points.h:245
IntegrationPointType::PointType PointType
Definition: triangle_gauss_legendre_integration_points.h:207
std::size_t SizeType
Definition: triangle_gauss_legendre_integration_points.h:199
static const unsigned int Dimension
Definition: triangle_gauss_legendre_integration_points.h:201
KRATOS_CLASS_POINTER_DEFINITION(TriangleGaussLegendreIntegrationPoints5)
std::array< IntegrationPointType, 12 > IntegrationPointsArrayType
Definition: triangle_gauss_legendre_integration_points.h:205
static const IntegrationPointsArrayType & IntegrationPoints()
Definition: triangle_gauss_legendre_integration_points.h:214
static SizeType IntegrationPointsNumber()
Definition: triangle_gauss_legendre_integration_points.h:209
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21