gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
GaussLegendre1D.h
Go to the documentation of this file.
1 // Gmsh - Copyright (C) 1997-2022 C. Geuzaine, J.-F. Remacle
2 //
3 // See the LICENSE.txt file in the Gmsh root directory for license information.
4 // Please report all issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
5 
6 /* 1 point rule points */
7 static double GL_pt1[1] = {0.000000000000000e+00};
8 
9 /* 1 point rule weights */
10 static double GL_wt1[1] = {2.000000000000000e+00};
11 
12 /* 2 point rule points */
13 static double GL_pt2[2] = {-5.773502691896257e-01, 5.773502691896257e-01};
14 
15 /* 2 point rule weights */
16 static double GL_wt2[2] = {1.000000000000000e+00, 1.000000000000000e+00};
17 
18 /* 3 point rule points */
19 static double GL_pt3[3] = {-7.745966692414834e-01, 0.000000000000000e+00,
20  7.745966692414834e-01};
21 
22 /* 3 point rule weights */
23 static double GL_wt3[3] = {5.555555555555552e-01, 8.888888888888888e-01,
24  5.555555555555552e-01};
25 
26 /* 4 point rule points */
27 static double GL_pt4[4] = {-8.611363115940526e-01, -3.399810435848563e-01,
28  3.399810435848563e-01, 8.611363115940526e-01};
29 
30 /* 4 point rule weights */
31 static double GL_wt4[4] = {3.478548451374537e-01, 6.521451548625464e-01,
32  6.521451548625464e-01, 3.478548451374537e-01};
33 
34 /* 5 point rule points */
35 static double GL_pt5[5] = {-9.061798459386640e-01, -5.384693101056831e-01,
36  0.000000000000000e+00, 5.384693101056831e-01,
37  9.061798459386640e-01};
38 
39 /* 5 point rule weights */
40 static double GL_wt5[5] = {2.369268850561890e-01, 4.786286704993665e-01,
41  5.688888888888889e-01, 4.786286704993665e-01,
42  2.369268850561890e-01};
43 
44 /* 6 point rule points */
45 static double GL_pt6[6] = {-9.324695142031521e-01, -6.612093864662646e-01,
46  -2.386191860831969e-01, 2.386191860831969e-01,
47  6.612093864662646e-01, 9.324695142031521e-01};
48 
49 /* 6 point rule weights */
50 static double GL_wt6[6] = {1.713244923791705e-01, 3.607615730481386e-01,
51  4.679139345726913e-01, 4.679139345726913e-01,
52  3.607615730481386e-01, 1.713244923791705e-01};
53 /* 7 point rule points */
54 static double GL_pt7[7] = {-9.491079123427585e-01, -7.415311855993945e-01,
55  -4.058451513773972e-01, 0.000000000000000e+00,
56  4.058451513773972e-01, 7.415311855993945e-01,
57  9.491079123427585e-01};
58 
59 /* 7 point rule weights */
60 static double GL_wt7[7] = {1.294849661688697e-01, 2.797053914892767e-01,
61  3.818300505051190e-01, 4.179591836734694e-01,
62  3.818300505051190e-01, 2.797053914892767e-01,
63  1.294849661688697e-01};
64 
65 /* 8 point rule points */
66 static double GL_pt8[8] = {-9.602898564975363e-01, -7.966664774136268e-01,
67  -5.255324099163290e-01, -1.834346424956498e-01,
68  1.834346424956498e-01, 5.255324099163290e-01,
69  7.966664774136268e-01, 9.602898564975363e-01};
70 
71 /* 8 point rule weights */
72 static double GL_wt8[8] = {1.012285362903768e-01, 2.223810344533745e-01,
73  3.137066458778874e-01, 3.626837833783620e-01,
74  3.626837833783620e-01, 3.137066458778874e-01,
75  2.223810344533745e-01, 1.012285362903768e-01};
76 
77 /* 9 point rule points */
78 static double GL_pt9[9] = {
79  -9.681602395076261e-01, -8.360311073266359e-01, -6.133714327005905e-01,
80  -3.242534234038089e-01, 0.000000000000000e+00, 3.242534234038089e-01,
81  6.133714327005905e-01, 8.360311073266359e-01, 9.681602395076261e-01};
82 
83 /* 9 point rule weights */
84 static double GL_wt9[9] = {
85  8.127438836157463e-02, 1.806481606948576e-01, 2.606106964029355e-01,
86  3.123470770400029e-01, 3.302393550012598e-01, 3.123470770400029e-01,
87  2.606106964029355e-01, 1.806481606948576e-01, 8.127438836157463e-02};
88 
89 /* 10 point rule points */
90 static double GL_pt10[10] = {-9.739065285171716e-01, -8.650633666889845e-01,
91  -6.794095682990244e-01, -4.333953941292472e-01,
92  -1.488743389816312e-01, 1.488743389816312e-01,
93  4.333953941292472e-01, 6.794095682990244e-01,
94  8.650633666889845e-01, 9.739065285171716e-01};
95 
96 /* 10 point rule weights */
97 static double GL_wt10[10] = {6.667134430868774e-02, 1.494513491505805e-01,
98  2.190863625159822e-01, 2.692667193099962e-01,
99  2.955242247147529e-01, 2.955242247147529e-01,
100  2.692667193099962e-01, 2.190863625159822e-01,
101  1.494513491505805e-01, 6.667134430868774e-02};
102 
103 /* 11 point rule points */
104 static double GL_pt11[11] = {
105  -9.782286581460570e-01, -8.870625997680953e-01, -7.301520055740494e-01,
106  -5.190961292068118e-01, -2.695431559523450e-01, 0.000000000000000e+00,
107  2.695431559523450e-01, 5.190961292068118e-01, 7.301520055740494e-01,
108  8.870625997680953e-01, 9.782286581460570e-01};
109 
110 /* 11 point rule weights */
111 static double GL_wt11[11] = {
112  5.566856711617354e-02, 1.255803694649047e-01, 1.862902109277343e-01,
113  2.331937645919903e-01, 2.628045445102466e-01, 2.729250867779006e-01,
114  2.628045445102466e-01, 2.331937645919903e-01, 1.862902109277343e-01,
115  1.255803694649047e-01, 5.566856711617354e-02};
116 
117 /* 12 point rule points */
118 static double GL_pt12[12] = {
119  -9.815606342467192e-01, -9.041172563704748e-01, -7.699026741943047e-01,
120  -5.873179542866175e-01, -3.678314989981802e-01, -1.252334085114689e-01,
121  1.252334085114689e-01, 3.678314989981802e-01, 5.873179542866175e-01,
122  7.699026741943047e-01, 9.041172563704748e-01, 9.815606342467192e-01};
123 
124 /* 12 point rule weights */
125 static double GL_wt12[12] = {
126  4.717533638651183e-02, 1.069393259953182e-01, 1.600783285433463e-01,
127  2.031674267230658e-01, 2.334925365383548e-01, 2.491470458134029e-01,
128  2.491470458134029e-01, 2.334925365383548e-01, 2.031674267230658e-01,
129  1.600783285433463e-01, 1.069393259953182e-01, 4.717533638651183e-02};
130 
131 /* 13 point rule points */
132 static double GL_pt13[13] = {
133  -9.841830547185881e-01, -9.175983992229780e-01, -8.015780907333099e-01,
134  -6.423493394403402e-01, -4.484927510364468e-01, -2.304583159551348e-01,
135  1.232595164407831e-32, 2.304583159551348e-01, 4.484927510364468e-01,
136  6.423493394403402e-01, 8.015780907333099e-01, 9.175983992229780e-01,
137  9.841830547185881e-01};
138 
139 /* 13 point rule weights */
140 static double GL_wt13[13] = {
141  4.048400476531581e-02, 9.212149983772838e-02, 1.388735102197872e-01,
142  1.781459807619457e-01, 2.078160475368884e-01, 2.262831802628971e-01,
143  2.325515532308739e-01, 2.262831802628971e-01, 2.078160475368884e-01,
144  1.781459807619457e-01, 1.388735102197872e-01, 9.212149983772838e-02,
145  4.048400476531581e-02};
146 
147 /* 14 point rule points */
148 static double GL_pt14[14] = {
149  -9.862838086968123e-01, -9.284348836635736e-01, -8.272013150697650e-01,
150  -6.872929048116855e-01, -5.152486363581541e-01, -3.191123689278897e-01,
151  -1.080549487073437e-01, 1.080549487073437e-01, 3.191123689278897e-01,
152  5.152486363581541e-01, 6.872929048116855e-01, 8.272013150697650e-01,
153  9.284348836635736e-01, 9.862838086968123e-01};
154 
155 /* 14 point rule weights */
156 static double GL_wt14[14] = {
157  3.511946033175199e-02, 8.015808715976037e-02, 1.215185706879031e-01,
158  1.572031671581936e-01, 1.855383974779378e-01, 2.051984637212955e-01,
159  2.152638534631578e-01, 2.152638534631578e-01, 2.051984637212955e-01,
160  1.855383974779378e-01, 1.572031671581936e-01, 1.215185706879031e-01,
161  8.015808715976037e-02, 3.511946033175199e-02};
162 
163 /* 15 point rule points */
164 static double GL_pt15[15] = {
165  -9.879925180204854e-01, -9.372733924007060e-01, -8.482065834104272e-01,
166  -7.244177313601701e-01, -5.709721726085388e-01, -3.941513470775634e-01,
167  -2.011940939974345e-01, 1.232595164407831e-32, 2.011940939974345e-01,
168  3.941513470775634e-01, 5.709721726085388e-01, 7.244177313601701e-01,
169  8.482065834104272e-01, 9.372733924007060e-01, 9.879925180204854e-01};
170 
171 /* 15 point rule weights */
172 static double GL_wt15[15] = {
173  3.075324199611663e-02, 7.036604748810814e-02, 1.071592204671720e-01,
174  1.395706779261543e-01, 1.662692058169940e-01, 1.861610000155622e-01,
175  1.984314853271116e-01, 2.025782419255613e-01, 1.984314853271116e-01,
176  1.861610000155622e-01, 1.662692058169940e-01, 1.395706779261543e-01,
177  1.071592204671720e-01, 7.036604748810814e-02, 3.075324199611663e-02};
178 
179 /* 16 point rule points */
180 static double GL_pt16[16] = {
181  -9.894009349916499e-01, -9.445750230732326e-01, -8.656312023878318e-01,
182  -7.554044083550030e-01, -6.178762444026438e-01, -4.580167776572274e-01,
183  -2.816035507792589e-01, -9.501250983763744e-02, 9.501250983763744e-02,
184  2.816035507792589e-01, 4.580167776572274e-01, 6.178762444026438e-01,
185  7.554044083550030e-01, 8.656312023878318e-01, 9.445750230732326e-01,
186  9.894009349916499e-01};
187 
188 /* 16 point rule weights */
189 static double GL_wt16[16] = {
190  2.715245941175406e-02, 6.225352393864778e-02, 9.515851168249290e-02,
191  1.246289712555339e-01, 1.495959888165768e-01, 1.691565193950026e-01,
192  1.826034150449236e-01, 1.894506104550685e-01, 1.894506104550685e-01,
193  1.826034150449236e-01, 1.691565193950026e-01, 1.495959888165768e-01,
194  1.246289712555339e-01, 9.515851168249290e-02, 6.225352393864778e-02,
195  2.715245941175406e-02};
196 
197 /* 20 point rule points */
198 static double GL_pt20[20] = {
199  -9.931285991850949e-01, -9.639719272779138e-01, -9.122344282513259e-01,
200  -8.391169718222188e-01, -7.463319064601508e-01, -6.360536807265150e-01,
201  -5.108670019508271e-01, -3.737060887154196e-01, -2.277858511416451e-01,
202  -7.652652113349733e-02, 7.652652113349733e-02, 2.277858511416451e-01,
203  3.737060887154196e-01, 5.108670019508271e-01, 6.360536807265150e-01,
204  7.463319064601508e-01, 8.391169718222188e-01, 9.122344282513259e-01,
205  9.639719272779138e-01, 9.931285991850949e-01};
206 
207 /* 20 point rule weights */
208 static double GL_wt20[20] = {
209  1.761400713915212e-02, 4.060142980038694e-02, 6.267204833410906e-02,
210  8.327674157670475e-02, 1.019301198172404e-01, 1.181945319615184e-01,
211  1.316886384491766e-01, 1.420961093183821e-01, 1.491729864726037e-01,
212  1.527533871307259e-01, 1.527533871307259e-01, 1.491729864726037e-01,
213  1.420961093183821e-01, 1.316886384491766e-01, 1.181945319615184e-01,
214  1.019301198172404e-01, 8.327674157670475e-02, 6.267204833410906e-02,
215  4.060142980038694e-02, 1.761400713915212e-02};
216 
217 inline void gmshGaussLegendre1D(int nbQuadPoints, double **t, double **w)
218 {
219  switch(nbQuadPoints) {
220  case 1:
221  *t = GL_pt1;
222  *w = GL_wt1;
223  break;
224  case 2:
225  *t = GL_pt2;
226  *w = GL_wt2;
227  break;
228  case 3:
229  *t = GL_pt3;
230  *w = GL_wt3;
231  break;
232  case 4:
233  *t = GL_pt4;
234  *w = GL_wt4;
235  break;
236  case 5:
237  *t = GL_pt5;
238  *w = GL_wt5;
239  break;
240  case 6:
241  *t = GL_pt6;
242  *w = GL_wt6;
243  break;
244  case 7:
245  *t = GL_pt7;
246  *w = GL_wt7;
247  break;
248  case 8:
249  *t = GL_pt8;
250  *w = GL_wt8;
251  break;
252  case 9:
253  *t = GL_pt9;
254  *w = GL_wt9;
255  break;
256  case 10:
257  *t = GL_pt10;
258  *w = GL_wt10;
259  break;
260  case 11:
261  *t = GL_pt11;
262  *w = GL_wt11;
263  break;
264  case 12:
265  *t = GL_pt12;
266  *w = GL_wt12;
267  break;
268  case 13:
269  *t = GL_pt13;
270  *w = GL_wt13;
271  break;
272  case 14:
273  *t = GL_pt14;
274  *w = GL_wt14;
275  break;
276  case 15:
277  *t = GL_pt15;
278  *w = GL_wt15;
279  break;
280  case 16:
281  *t = GL_pt16;
282  *w = GL_wt16;
283  break;
284  case 20:
285  *t = GL_pt20;
286  *w = GL_wt20;
287  break;
288  default:
289  *t = nullptr;
290  *w = nullptr;
291  break;
292  }
293 }
GL_pt14
static double GL_pt14[14]
Definition: GaussLegendre1D.h:148
GL_wt3
static double GL_wt3[3]
Definition: GaussLegendre1D.h:23
GL_wt7
static double GL_wt7[7]
Definition: GaussLegendre1D.h:60
GL_wt20
static double GL_wt20[20]
Definition: GaussLegendre1D.h:208
gmshGaussLegendre1D
void gmshGaussLegendre1D(int nbQuadPoints, double **t, double **w)
Definition: GaussLegendre1D.h:217
GL_wt1
static double GL_wt1[1]
Definition: GaussLegendre1D.h:10
GL_pt15
static double GL_pt15[15]
Definition: GaussLegendre1D.h:164
GL_pt5
static double GL_pt5[5]
Definition: GaussLegendre1D.h:35
GL_pt4
static double GL_pt4[4]
Definition: GaussLegendre1D.h:27
GL_wt15
static double GL_wt15[15]
Definition: GaussLegendre1D.h:172
GL_pt1
static double GL_pt1[1]
Definition: GaussLegendre1D.h:7
GL_pt7
static double GL_pt7[7]
Definition: GaussLegendre1D.h:54
GL_pt12
static double GL_pt12[12]
Definition: GaussLegendre1D.h:118
GL_wt11
static double GL_wt11[11]
Definition: GaussLegendre1D.h:111
GL_pt3
static double GL_pt3[3]
Definition: GaussLegendre1D.h:19
GL_wt10
static double GL_wt10[10]
Definition: GaussLegendre1D.h:97
GL_pt2
static double GL_pt2[2]
Definition: GaussLegendre1D.h:13
GL_pt16
static double GL_pt16[16]
Definition: GaussLegendre1D.h:180
GL_wt6
static double GL_wt6[6]
Definition: GaussLegendre1D.h:50
GL_wt13
static double GL_wt13[13]
Definition: GaussLegendre1D.h:140
GL_pt10
static double GL_pt10[10]
Definition: GaussLegendre1D.h:90
GL_pt8
static double GL_pt8[8]
Definition: GaussLegendre1D.h:66
GL_pt13
static double GL_pt13[13]
Definition: GaussLegendre1D.h:132
GL_wt14
static double GL_wt14[14]
Definition: GaussLegendre1D.h:156
GL_wt8
static double GL_wt8[8]
Definition: GaussLegendre1D.h:72
GL_pt6
static double GL_pt6[6]
Definition: GaussLegendre1D.h:45
GL_pt9
static double GL_pt9[9]
Definition: GaussLegendre1D.h:78
GL_wt5
static double GL_wt5[5]
Definition: GaussLegendre1D.h:40
GL_wt9
static double GL_wt9[9]
Definition: GaussLegendre1D.h:84
GL_pt11
static double GL_pt11[11]
Definition: GaussLegendre1D.h:104
GL_pt20
static double GL_pt20[20]
Definition: GaussLegendre1D.h:198
GL_wt2
static double GL_wt2[2]
Definition: GaussLegendre1D.h:16
GL_wt12
static double GL_wt12[12]
Definition: GaussLegendre1D.h:125
GL_wt16
static double GL_wt16[16]
Definition: GaussLegendre1D.h:189
GL_wt4
static double GL_wt4[4]
Definition: GaussLegendre1D.h:31