GCC Code Coverage Report


Directory: src/oiseau/
File: src/oiseau/utils/integration.cpp
Date: 2025-05-24 01:28:39
Exec Total Coverage
Lines: 147 147 100.0%
Functions: 3 3 100.0%
Branches: 185 331 55.9%

Line Branch Exec Source
1 // Copyright (C) 2025 Tiago V. L. Amorim (@tiagovla)
2 //
3 // This file is part of oiseau (https://github.com/tiagovla/oiseau)
4 //
5 // SPDX-License-Identifier: GPL-3.0-or-later
6
7 #include "oiseau/utils/integration.hpp"
8
9 #include <array>
10 #include <cmath>
11 #include <cstddef>
12 #include <stdexcept>
13 #include <string>
14 #include <utility>
15 #include <xtensor-blas/xlinalg.hpp>
16 #include <xtensor/containers/xadapt.hpp>
17 #include <xtensor/containers/xarray.hpp>
18 #include <xtensor/core/xeval.hpp>
19 #include <xtensor/core/xmath.hpp>
20 #include <xtensor/core/xtensor_forward.hpp>
21 #include <xtensor/generators/xbuilder.hpp>
22 #include <xtensor/io/xio.hpp>
23 #include <xtensor/misc/xcomplex.hpp>
24 #include <xtensor/misc/xmanipulation.hpp>
25 #include <xtensor/misc/xpad.hpp>
26 #include <xtensor/misc/xsort.hpp>
27 #include <xtensor/views/xslice.hpp>
28 #include <xtensor/views/xstrided_view.hpp>
29 #include <xtensor/views/xview.hpp>
30
31 #include "oiseau/dg/nodal/utils.hpp"
32
33 namespace {
34
35 // Cools, R. "Monomial Cubature Rules Since "Stroud":
36 // A Compilation--Part 2."
37 //
38 // J. Comput. Appl. Math. 112, 21-27, 1999.
39 //
40 // Cools, R. "Encyclopaedia of Cubature Formulas."
41 // http://www.cs.kuleuven.ac.be/~nines/research/ecf/ecf.html
42
43 // For cub2D_1: 1 point
44 static const std::array<double, 1 * 2> cub2D_1_nodes_data = {
45 {-0.333333333333333, -0.333333333333333}};
46 static const std::array<double, 1> cub2D_1_weights_data = {{2.000000000000000}};
47
48 // For cub2D_2: 3 points
49 static const std::array<double, 3 * 2> cub2D_2_nodes_data = {
50 {-0.666666666666667, -0.666666666666667, 0.333333333333333, -0.666666666666667,
51 -0.666666666666667, 0.333333333333333}};
52 static const std::array<double, 3> cub2D_2_weights_data = {
53 {0.666666666666667, 0.666666666666667, 0.666666666666667}};
54
55 // For cub2D_3: 6 points
56 static const std::array<double, 6 * 2> cub2D_3_nodes_data = {
57 {-0.816847572980458, -0.816847572980458, 0.633695145960917, -0.816847572980459,
58 -0.816847572980459, 0.633695145960917, -0.108103018168070, -0.108103018168070,
59 -0.783793963663860, -0.108103018168070, -0.108103018168070, -0.783793963663860}};
60 static const std::array<double, 6> cub2D_3_weights_data = {{0.219903487310644, 0.219903487310644,
61 0.219903487310644, 0.446763179356023,
62 0.446763179356023, 0.446763179356023}};
63
64 // For cub2D_4: 6 points
65 static const std::array<double, 6 * 2> cub2D_4_nodes_data = {
66 {-0.816847572980458, -0.816847572980458, 0.633695145960917, -0.816847572980459,
67 -0.816847572980459, 0.633695145960917, -0.108103018168070, -0.108103018168070,
68 -0.783793963663860, -0.108103018168070, -0.108103018168070, -0.783793963663860}};
69 static const std::array<double, 6> cub2D_4_weights_data = {{0.219903487310644, 0.219903487310644,
70 0.219903487310644, 0.446763179356023,
71 0.446763179356023, 0.446763179356023}};
72
73 // For cub2D_5: 7 points
74 static const std::array<double, 7 * 2> cub2D_5_nodes_data = {
75 {-0.333333333333333, -0.333333333333333, -0.059715871789770, -0.059715871789770,
76 -0.880568256420460, -0.059715871789770, -0.059715871789770, -0.880568256420460,
77 -0.797426985353087, -0.797426985353087, 0.594853970706175, -0.797426985353087,
78 -0.797426985353087, 0.594853970706175}};
79 static const std::array<double, 7> cub2D_5_weights_data = {
80 {0.450000000000000, 0.264788305577012, 0.264788305577012, 0.264788305577012, 0.251878361089654,
81 0.251878361089654, 0.251878361089654}};
82
83 // For cub2D_6: 12 points
84 static const std::array<double, 12 * 2> cub2D_6_nodes_data = {
85 {-0.501426509658179, -0.501426509658179, 0.002853019316358, -0.501426509658179,
86 -0.501426509658179, 0.002853019316358, -0.873821971016996, -0.873821971016996,
87 0.747643942033991, -0.873821971016996, -0.873821971016996, 0.747643942033991,
88 -0.379295097932431, -0.893709900310366, -0.893709900310366, -0.379295097932431,
89 0.273004998242797, -0.893709900310366, -0.893709900310366, 0.273004998242797,
90 0.273004998242797, -0.379295097932431, -0.379295097932431, 0.273004998242797}};
91 static const std::array<double, 12> cub2D_6_weights_data = {
92 {0.233572551452759, 0.233572551452759, 0.233572551452759, 0.101689812740414, 0.101689812740414,
93 0.101689812740414, 0.165702151236747, 0.165702151236747, 0.165702151236747, 0.165702151236747,
94 0.165702151236747, 0.165702151236747}};
95
96 // For cub2D_7: 15 points
97 static const std::array<double, 15 * 2> cub2D_7_nodes_data = {
98 {-0.158765070723907, -0.158765070723907, -0.682469858552186, -0.158765070723907,
99 -0.158765070723907, -0.682469858552186, -0.901937632421608, -0.901937632421608,
100 0.803875264843215, -0.901937632421608, -0.901937632421608, 0.803875264843215,
101 -0.696696002590528, -0.696696002590528, 0.393392005181056, -0.696696002590528,
102 -0.696696002590528, 0.393392005181056, 0.348275575962283, -0.375762055856278,
103 -0.375762055856278, 0.348275575962283, -0.972513520106005, -0.375762055856278,
104 -0.375762055856278, -0.972513520106005, -0.972513520106005, 0.348275575962283,
105 0.348275575962283, -0.972513520106005}};
106 static const std::array<double, 15> cub2D_7_weights_data = {
107 {0.278402959350494, 0.278402959350494, 0.278402959350494, 0.063653882657145, 0.063653882657145,
108 0.063653882657145, 0.168642646759703, 0.168642646759703, 0.168642646759703, 0.077983588949662,
109 0.077983588949662, 0.077983588949662, 0.077983588949662, 0.077983588949662,
110 0.077983588949662}};
111
112 // For cub2D_8: 16 points
113 static const std::array<double, 16 * 2> cub2D_8_nodes_data = {
114 {-0.333333333333333, -0.333333333333333, -0.081414823414554, -0.081414823414554,
115 -0.837170353170893, -0.081414823414554, -0.081414823414554, -0.837170353170893,
116 -0.658861384496480, -0.658861384496480, 0.317722768992959, -0.658861384496480,
117 -0.658861384496480, 0.317722768992959, -0.898905543365938, -0.898905543365938,
118 0.797811086731876, -0.898905543365938, -0.898905543365938, 0.797811086731876,
119 -0.473774340730724, 0.456984785910809, 0.456984785910809, -0.473774340730724,
120 -0.983210445180085, 0.456984785910809, 0.456984785910809, -0.983210445180085,
121 -0.983210445180085, -0.473774340730724, -0.473774340730724, -0.983210445180085}};
122 static const std::array<double, 16> cub2D_8_weights_data = {
123 {0.288631215355574, 0.190183268534569, 0.190183268534569, 0.190183268534569, 0.206434741069437,
124 0.206434741069437, 0.206434741069437, 0.064916995246396, 0.064916995246396, 0.064916995246396,
125 0.054460628348870, 0.054460628348870, 0.054460628348870, 0.054460628348870, 0.054460628348870,
126 0.054460628348870}};
127
128 // For cub2D_9: 19 points (19*3 = 57 elements)
129 static const std::array<double, 19 * 2> cub2D_9_nodes_data = {
130 {-0.333333333333333, -0.333333333333333, -0.020634961602525, -0.020634961602525,
131 -0.958730076794950, -0.020634961602525, -0.020634961602525, -0.958730076794950,
132 -0.125820817014127, -0.125820817014127, -0.748358365971746, -0.125820817014127,
133 -0.125820817014127, -0.748358365971746, -0.623592928761935, -0.623592928761935,
134 0.247185857523869, -0.623592928761935, -0.623592928761935, 0.247185857523869,
135 -0.910540973211095, -0.910540973211095, 0.821081946422189, -0.910540973211095,
136 -0.910540973211095, 0.821081946422189, 0.482397197568996, -0.556074021678469,
137 -0.556074021678469, 0.482397197568996, -0.926323175890527, -0.556074021678469,
138 -0.556074021678469, -0.926323175890527, -0.926323175890527, 0.482397197568996,
139 0.482397197568996, -0.926323175890527}};
140 static const std::array<double, 19> cub2D_9_weights_data = {
141 {0.194271592565598, 0.062669400454278, 0.062669400454278, 0.062669400454278, 0.155655082009549,
142 0.155655082009549, 0.155655082009549, 0.159295477854420, 0.159295477854420, 0.159295477854420,
143 0.051155351317396, 0.051155351317396, 0.051155351317396, 0.086567078754579, 0.086567078754579,
144 0.086567078754579, 0.086567078754579, 0.086567078754579, 0.086567078754579}};
145
146 // For cub2D_10: 25 points (25*3 = 75 elements)
147 static const std::array<double, 25 * 2> cub2D_10_nodes_data = {
148 {-0.333333333333333, -0.333333333333333, -0.004269134091050, -0.004269134091050,
149 -0.991461731817899, -0.004269134091050, -0.004269134091050, -0.991461731817899,
150 -0.143975100541888, -0.143975100541888, -0.712049798916225, -0.143975100541888,
151 -0.143975100541888, -0.712049798916225, -0.630487174513551, -0.630487174513551,
152 0.260974349027102, -0.630487174513551, -0.630487174513551, 0.260974349027102,
153 -0.959037562856645, -0.959037562856645, 0.918075125713290, -0.959037562856645,
154 -0.959037562856645, 0.918075125713290, -0.726852847487933, 0.656846867693389,
155 0.656846867693389, -0.726852847487933, -0.929994020205456, 0.656846867693389,
156 0.656846867693389, -0.929994020205456, -0.929994020205456, -0.726852847487933,
157 -0.726852847487933, -0.929994020205456, -0.334512798822723, 0.259414658305837,
158 0.259414658305837, -0.334512798822723, -0.924901859483115, 0.259414658305837,
159 0.259414658305837, -0.924901859483115, -0.924901859483115, -0.334512798822723,
160 -0.334512798822723, -0.924901859483115}};
161 static const std::array<double, 25> cub2D_10_weights_data = {
162 {0.167046799610393, 0.014459701184113, 0.014459701184113, 0.014459701184113,
163 0.148984355841961, 0.148984355841961, 0.148984355841961, 0.157292946806217,
164 0.157292946806217, 0.157292946806217, 0.013856646174215, 0.013856646174215,
165 0.013856646174215, 0.059036640669559, 0.059036640669559, 0.059036640669559,
166 0.059036640669559, 0.059036640669559, 0.059036640669559, 0.079158734392122,
167 0.079158734392122, 0.079158734392122, 0.079158734392122, 0.079158734392122,
168 0.079158734392122}};
169
170 // For cub2D_11: 28 points (28*3 = 84 elements)
171 static const std::array<double, 28 * 2> cub2D_11_nodes_data = {
172 {-0.333333333333333, -0.333333333333333, -0.008227986519701, -0.008227986519701,
173 -0.983544026960598, -0.008227986519701, -0.008227986519701, -0.983544026960598,
174 -0.123062767323470, -0.123062767323470, -0.753874465353061, -0.123062767323470,
175 -0.123062767323470, -0.753874465353061, -0.579583807314522, -0.579583807314522,
176 0.159167614629044, -0.579583807314522, -0.579583807314522, 0.159167614629044,
177 -0.794793191450311, -0.794793191450311, 0.589586382900622, -0.794793191450311,
178 -0.794793191450311, 0.589586382900622, -0.943045809035533, -0.943045809035533,
179 0.886091618071066, -0.943045809035533, -0.943045809035533, 0.886091618071066,
180 -0.701412405190965, 0.686811031831200, 0.686811031831200, -0.701412405190965,
181 -0.985398626640235, 0.686811031831200, 0.686811031831200, -0.985398626640235,
182 -0.985398626640235, -0.701412405190966, -0.701412405190966, -0.985398626640235,
183 -0.420944470627256, 0.328932876191794, 0.328932876191794, -0.420944470627256,
184 -0.907988405564538, 0.328932876191794, 0.328932876191794, -0.907988405564538,
185 -0.907988405564538, -0.420944470627256, -0.420944470627256, -0.907988405564538}};
186 static const std::array<double, 28> cub2D_11_weights_data = {
187 {0.171542269659139, 0.033232309648099, 0.033232309648099, 0.033232309648099, 0.134650934561697,
188 0.134650934561697, 0.134650934561697, 0.141045284213931, 0.141045284213931, 0.141045284213931,
189 0.077255352409353, 0.077255352409353, 0.077255352409353, 0.020851693311810, 0.020851693311810,
190 0.020851693311810, 0.020556454130106, 0.020556454130106, 0.020556454130106, 0.020556454130106,
191 0.020556454130106, 0.020556454130106, 0.080668713854259, 0.080668713854259, 0.080668713854259,
192 0.080668713854259, 0.080668713854259, 0.080668713854259}};
193
194 // For cub2D_12: 36 points (36*3 = 108 elements)
195 static const std::array<double, 36 * 2> cub2D_12_nodes_data = {
196 {-0.115127288420454, -0.115127288420454, -0.769745423159092, -0.115127288420454,
197 -0.115127288420454, -0.769745423159092, -0.241326933740970, -0.241326933740970,
198 -0.517346132518060, -0.241326933740970, -0.241326933740970, -0.517346132518060,
199 -0.773435586772427, -0.773435586772427, 0.546871173544855, -0.773435586772427,
200 -0.773435586772427, 0.546871173544855, -0.550360151853422, -0.550360151853422,
201 0.100720303706844, -0.550360151853422, -0.550360151853422, 0.100720303706844,
202 -0.949850839686919, -0.949850839686919, 0.899701679373837, -0.949850839686919,
203 -0.949850839686919, 0.899701679373837, -0.023247583079632, -0.023247583079632,
204 -0.953504833840737, -0.023247583079632, -0.023247583079632, -0.953504833840737,
205 0.701114686742190, -0.956341185792092, -0.956341185792092, 0.701114686742190,
206 -0.744773500950097, -0.956341185792092, -0.956341185792092, -0.744773500950097,
207 -0.744773500950097, 0.701114686742189, 0.701114686742189, -0.744773500950097,
208 0.280974603820889, -0.820754518409649, -0.820754518409649, 0.280974603820889,
209 -0.460220085411240, -0.820754518409649, -0.820754518409649, -0.460220085411240,
210 -0.460220085411240, 0.280974603820889, 0.280974603820889, -0.460220085411240,
211 0.380092839755442, -0.412599349012509, -0.412599349012509, 0.380092839755442,
212 -0.967493490742933, -0.412599349012509, -0.412599349012509, -0.967493490742933,
213 -0.967493490742933, 0.380092839755442, 0.380092839755442, -0.967493490742933}};
214 static const std::array<double, 36> cub2D_12_weights_data = {
215 {0.088694050812375, 0.088694050812375, 0.088694050812375, 0.083486638970495, 0.083486638970495,
216 0.083486638970495, 0.061949370456958, 0.061949370456958, 0.061949370456958, 0.096926744607805,
217 0.096926744607805, 0.096926744607805, 0.016284715813394, 0.016284715813394, 0.016284715813394,
218 0.047730162209543, 0.047730162209543, 0.047730162209543, 0.030740478172077, 0.030740478172077,
219 0.030740478172077, 0.030740478172077, 0.030740478172077, 0.030740478172077, 0.073364295183933,
220 0.073364295183933, 0.073364295183933, 0.073364295183933, 0.073364295183933, 0.073364295183933,
221 0.031692718542038, 0.031692718542038, 0.031692718542038, 0.031692718542038, 0.031692718542038,
222 0.031692718542038}};
223
224 // For cub2D_13: 40 points (40*3 = 120 elements)
225 static const std::array<double, 40 * 2> cub2D_13_nodes_data = {
226 {-0.333333333333333, -0.333333333333333, -0.178369512906405, -0.178369512906405,
227 -0.643260974187191, -0.178369512906405, -0.178369512906405, -0.643260974187191,
228 -0.542160866418819, -0.542160866418819, 0.084321732837639, -0.542160866418819,
229 -0.542160866418819, 0.084321732837639, -0.771083702251175, -0.771083702251175,
230 0.542167404502350, -0.771083702251175, -0.771083702251175, 0.542167404502350,
231 -0.951222762153923, -0.951222762153923, 0.902445524307847, -0.951222762153923,
232 -0.951222762153923, 0.902445524307847, -0.071124044893491, -0.071124044893491,
233 -0.857751910213018, -0.071124044893491, -0.071124044893491, -0.857751910213018,
234 0.089497598920545, -0.972567007080596, -0.972567007080596, 0.089497598920545,
235 -0.116930591839948, -0.972567007080596, -0.972567007080596, -0.116930591839948,
236 -0.116930591839948, 0.089497598920545, 0.089497598920545, -0.116930591839948,
237 0.708303576893352, -0.752827405974001, -0.752827405974001, 0.708303576893352,
238 -0.955476170919351, -0.752827405974001, -0.752827405974001, -0.955476170919351,
239 -0.955476170919351, 0.708303576893352, 0.708303576893352, -0.955476170919351,
240 0.400693795223418, -0.438009873048077, -0.438009873048077, 0.400693795223418,
241 -0.962683922175342, -0.438009873048076, -0.438009873048076, -0.962683922175342,
242 -0.962683922175342, 0.400693795223419, 0.400693795223419, -0.962683922175342,
243 -0.461147708177324, -0.809703416305633, -0.809703416305633, -0.461147708177324,
244 0.270851124482956, -0.809703416305633, -0.809703416305633, 0.270851124482956,
245 0.270851124482956, -0.461147708177324, -0.461147708177324, 0.270851124482956}};
246 static const std::array<double, 40> cub2D_13_weights_data = {
247 {0.097649880256618, 0.090830392435257, 0.090830392435257, 0.090830392435257,
248 0.093688172298398, 0.093688172298398, 0.093688172298398, 0.062636625766914,
249 0.062636625766914, 0.062636625766914, 0.015384123058757, 0.015384123058757,
250 0.015384123058757, 0.063336411850675, 0.063336411850675, 0.063336411850675,
251 0.017363112895214, 0.017363112895214, 0.017363112895214, 0.017363112895214,
252 0.017363112895214, 0.017363112895214, 0.030203519313196, 0.030203519313196,
253 0.030203519313196, 0.030203519313196, 0.030203519313196, 0.030203519313196,
254 0.032954120635442, 0.032954120635442, 0.032954120635442, 0.032954120635442,
255 0.032954120635442, 0.032954120635442, 0.073599737741711, 0.073599737741711,
256 0.073599737741711, 0.073599737741711, 0.073599737741711, 0.073599737741711}};
257
258 // For cub2D_14: 46 points (46*3 = 138 elements)
259 static const std::array<double, 46 * 2> cub2D_14_nodes_data = {
260 {-0.333333333333333, -0.333333333333333, -0.031437623162377, -0.031437623162377,
261 -0.937124753675245, -0.031437623162377, -0.031437623162377, -0.937124753675245,
262 -0.190179067155837, -0.190179067155837, -0.619641865688325, -0.190179067155837,
263 -0.190179067155837, -0.619641865688325, -0.544945017724160, -0.544945017724160,
264 0.089890035448320, -0.544945017724160, -0.544945017724160, 0.089890035448320,
265 -0.829084434528895, -0.829084434528895, 0.658168869057790, -0.829084434528895,
266 -0.829084434528895, 0.658168869057790, -0.961731843229187, -0.961731843229187,
267 0.923463686458374, -0.961731843229187, -0.961731843229187, 0.923463686458374,
268 -0.228055909294146, 0.200257489743243, 0.200257489743243, -0.228055909294146,
269 -0.972201580449098, 0.200257489743243, 0.200257489743243, -0.972201580449098,
270 -0.972201580449097, -0.228055909294146, -0.228055909294146, -0.972201580449097,
271 -0.801926305237733, 0.769518568627872, 0.769518568627872, -0.801926305237733,
272 -0.967592263390139, 0.769518568627872, 0.769518568627872, -0.967592263390139,
273 -0.967592263390139, -0.801926305237733, -0.801926305237733, -0.967592263390139,
274 -0.544893784145096, 0.504355701557747, 0.504355701557747, -0.544893784145096,
275 -0.959461917412651, 0.504355701557747, 0.504355701557747, -0.959461917412651,
276 -0.959461917412651, -0.544893784145095, -0.544893784145095, -0.959461917412651,
277 -0.288429073961769, 0.109399611316741, 0.109399611316741, -0.288429073961769,
278 -0.820970537354972, 0.109399611316741, 0.109399611316741, -0.820970537354972,
279 -0.820970537354972, -0.288429073961769, -0.288429073961769, -0.820970537354972,
280 -0.593507885280605, 0.397658756992448, 0.397658756992448, -0.593507885280605,
281 -0.804150871711842, 0.397658756992447, 0.397658756992447, -0.804150871711842,
282 -0.804150871711842, -0.593507885280605, -0.593507885280605, -0.804150871711842}};
283 static const std::array<double, 46> cub2D_14_weights_data = {
284 {0.086016161940337, 0.020861042581505, 0.020861042581505, 0.020861042581505, 0.084906577433761,
285 0.084906577433761, 0.084906577433761, 0.094412955694385, 0.094412955694385, 0.094412955694385,
286 0.036931420530108, 0.036931420530108, 0.036931420530108, 0.009566859223433, 0.009566859223433,
287 0.009566859223433, 0.023873332102599, 0.023873332102599, 0.023873332102599, 0.023873332102599,
288 0.023873332102599, 0.023873332102599, 0.018006541968931, 0.018006541968931, 0.018006541968931,
289 0.018006541968931, 0.018006541968931, 0.018006541968931, 0.030117913357456, 0.030117913357456,
290 0.030117913357456, 0.030117913357456, 0.030117913357456, 0.030117913357456, 0.067035335144205,
291 0.067035335144205, 0.067035335144205, 0.067035335144205, 0.067035335144205, 0.067035335144205,
292 0.056624756038490, 0.056624756038490, 0.056624756038490, 0.056624756038490, 0.056624756038490,
293 0.056624756038490}};
294
295 static const std::array<double, 54 * 2> cub2D_15_nodes_data = {
296 {-0.083438407261750, -0.083438407261750, -0.833123185476500, -0.083438407261750,
297 -0.083438407261750, -0.833123185476500, -0.192779070841739, -0.192779070841739,
298 -0.614441858316522, -0.192779070841739, -0.192779070841739, -0.614441858316522,
299 -0.413605664173949, -0.413605664173949, -0.172788671652101, -0.413605664173949,
300 -0.413605664173949, -0.172788671652101, -0.707064426114454, -0.707064426114454,
301 0.414128852228908, -0.707064426114454, -0.707064426114454, 0.414128852228908,
302 -0.887274264668793, -0.887274264668793, 0.774548529337586, -0.887274264668793,
303 -0.887274264668793, 0.774548529337586, -0.966849746283259, -0.966849746283259,
304 0.933699492566519, -0.966849746283259, -0.966849746283259, 0.933699492566519,
305 -0.520930891690411, 0.501106485071962, 0.501106485071962, -0.520930891690411,
306 -0.980175593381550, 0.501106485071962, 0.501106485071962, -0.980175593381550,
307 -0.980175593381550, -0.520930891690411, -0.520930891690411, -0.980175593381550,
308 -0.190242385363320, 0.158634844102864, 0.158634844102864, -0.190242385363320,
309 -0.968392458739544, 0.158634844102864, 0.158634844102864, -0.968392458739544,
310 -0.968392458739544, -0.190242385363320, -0.190242385363320, -0.968392458739544,
311 -0.809995773773910, 0.799708556139969, 0.799708556139969, -0.809995773773910,
312 -0.989712782366059, 0.799708556139969, 0.799708556139969, -0.989712782366059,
313 -0.989712782366059, -0.809995773773910, -0.809995773773910, -0.989712782366059,
314 -0.700493785355452, 0.602649133849474, 0.602649133849474, -0.700493785355452,
315 -0.902155348494022, 0.602649133849474, 0.602649133849474, -0.902155348494022,
316 -0.902155348494023, -0.700493785355452, -0.700493785355452, -0.902155348494023,
317 -0.426160775117330, 0.288623277852292, 0.288623277852292, -0.426160775117330,
318 -0.862462502734962, 0.288623277852292, 0.288623277852292, -0.862462502734962,
319 -0.862462502734962, -0.426160775117330, -0.426160775117330, -0.862462502734962,
320 -0.436328663801831, 0.099519827552432, 0.099519827552432, -0.436328663801831,
321 -0.663191163750602, 0.099519827552432, 0.099519827552432, -0.663191163750602,
322 -0.663191163750602, -0.436328663801831, -0.436328663801831, -0.663191163750602}};
323 static const std::array<double, 54> cub2D_15_weights_data = {
324 {0.065323637697611, 0.065323637697611, 0.065323637697611, 0.054825636062729, 0.054825636062729,
325 0.054825636062729, 0.053020073197407, 0.053020073197407, 0.053020073197407, 0.058431924272972,
326 0.058431924272972, 0.058431924272972, 0.021169216132488, 0.021169216132488, 0.021169216132488,
327 0.007229286128184, 0.007229286128184, 0.007229286128184, 0.017055496203419, 0.017055496203419,
328 0.017055496203419, 0.017055496203419, 0.017055496203419, 0.017055496203419, 0.027832353033384,
329 0.027832353033384, 0.027832353033384, 0.027832353033384, 0.027832353033384, 0.027832353033384,
330 0.008583865881470, 0.008583865881470, 0.008583865881470, 0.008583865881470, 0.008583865881470,
331 0.008583865881470, 0.032470658563550, 0.032470658563550, 0.032470658563550, 0.032470658563550,
332 0.032470658563550, 0.032470658563550, 0.051214681842525, 0.051214681842525, 0.051214681842525,
333 0.051214681842525, 0.051214681842525, 0.051214681842525, 0.066176391063291, 0.066176391063291,
334 0.066176391063291, 0.066176391063291, 0.066176391063291, 0.066176391063291}};
335
336 // For cub2D_16: 58 points (58*3 = 174 elements)
337 static const std::array<double, 58 * 2> cub2D_16_nodes_data = {
338 {-0.333333333333333, -0.333333333333333, -0.015796436959213, -0.015796436959213,
339 -0.968407126081574, -0.015796436959213, -0.015796436959213, -0.968407126081574,
340 -0.087376299046785, -0.087376299046785, -0.825247401906431, -0.087376299046785,
341 -0.087376299046785, -0.825247401906431, -0.640498098534045, -0.640498098534045,
342 0.280996197068091, -0.640498098534045, -0.640498098534045, 0.280996197068091,
343 -0.828211591878549, -0.828211591878549, 0.656423183757099, -0.828211591878549,
344 -0.828211591878549, 0.656423183757099, -0.977882767295650, -0.977882767295650,
345 0.955765534591299, -0.977882767295650, -0.977882767295650, 0.955765534591299,
346 -0.648594849699253, 0.619534954455185, 0.619534954455185, -0.648594849699253,
347 -0.970940104755933, 0.619534954455185, 0.619534954455185, -0.970940104755933,
348 -0.970940104755933, -0.648594849699253, -0.648594849699253, -0.970940104755933,
349 -0.355089058161032, 0.324703448463838, 0.324703448463838, -0.355089058161032,
350 -0.969614390302806, 0.324703448463838, 0.324703448463838, -0.969614390302806,
351 -0.969614390302806, -0.355089058161032, -0.355089058161032, -0.969614390302806,
352 -0.863082725186344, 0.829810165174004, 0.829810165174004, -0.863082725186344,
353 -0.966727439987660, 0.829810165174004, 0.829810165174004, -0.966727439987660,
354 -0.966727439987660, -0.863082725186344, -0.863082725186344, -0.966727439987660,
355 -0.650110471151428, 0.511910525190604, 0.511910525190604, -0.650110471151428,
356 -0.861800054039176, 0.511910525190604, 0.511910525190604, -0.861800054039176,
357 -0.861800054039176, -0.650110471151428, -0.650110471151428, -0.861800054039176,
358 -0.282624366842035, 0.131065359625217, 0.131065359625217, -0.282624366842035,
359 -0.848440992783182, 0.131065359625217, 0.131065359625217, -0.848440992783182,
360 -0.848440992783182, -0.282624366842035, -0.282624366842035, -0.848440992783182,
361 -0.500121711290305, 0.333566061453817, 0.333566061453817, -0.500121711290305,
362 -0.833444350163512, 0.333566061453817, 0.333566061453817, -0.833444350163512,
363 -0.833444350163512, -0.500121711290305, -0.500121711290305, -0.833444350163512,
364 -0.353308953197778, -0.027538833736648, -0.027538833736648, -0.353308953197778,
365 -0.619152213065573, -0.027538833736648, -0.027538833736648, -0.619152213065573,
366 -0.619152213065573, -0.353308953197778, -0.353308953197778, -0.619152213065573}};
367 static const std::array<double, 58> cub2D_16_weights_data = {
368 {0.092421202321849, 0.027991652734724, 0.027991652734724, 0.027991652734724, 0.036406763596424,
369 0.036406763596424, 0.036406763596424, 0.062729423327251, 0.062729423327251, 0.062729423327251,
370 0.032217170192673, 0.032217170192673, 0.032217170192673, 0.003676792575648, 0.003676792575648,
371 0.003676792575648, 0.019075686313307, 0.019075686313307, 0.019075686313307, 0.019075686313307,
372 0.019075686313307, 0.019075686313307, 0.025111336723323, 0.025111336723323, 0.025111336723323,
373 0.025111336723323, 0.025111336723323, 0.025111336723323, 0.014134510743040, 0.014134510743040,
374 0.014134510743040, 0.014134510743040, 0.014134510743040, 0.014134510743040, 0.025255543672496,
375 0.025255543672496, 0.025255543672496, 0.025255543672496, 0.025255543672496, 0.025255543672496,
376 0.038432852520849, 0.038432852520849, 0.038432852520849, 0.038432852520849, 0.038432852520849,
377 0.038432852520849, 0.032993291211606, 0.032993291211606, 0.032993291211606, 0.032993291211606,
378 0.032993291211606, 0.032993291211606, 0.081415677215044, 0.081415677215044, 0.081415677215044,
379 0.081415677215044, 0.081415677215044, 0.081415677215044}};
380
381 // For cub2D_17: 66 points (66*3 = 198 elements)
382 static const std::array<double, 66 * 2> cub2D_17_nodes_data = {
383 {-0.013565183960096, -0.013565183960096, -0.972869632079808, -0.013565183960096,
384 -0.013565183960096, -0.972869632079808, -0.918012666387151, -0.918012666387151,
385 0.836025332774302, -0.918012666387151, -0.918012666387151, 0.836025332774302,
386 -0.469265478050798, -0.469265478050798, -0.061469043898404, -0.469265478050798,
387 -0.469265478050798, -0.061469043898404, -0.278161974512876, -0.278161974512876,
388 -0.443676050974249, -0.278161974512876, -0.278161974512876, -0.443676050974249,
389 -0.743831619059579, -0.743831619059579, 0.487663238119159, -0.743831619059579,
390 -0.743831619059579, 0.487663238119159, -0.975086972700342, -0.975086972700342,
391 0.950173945400684, -0.975086972700342, -0.975086972700342, 0.950173945400684,
392 -0.331485915788080, 0.305875449252880, 0.305875449252880, -0.331485915788080,
393 -0.974389533464800, 0.305875449252880, 0.305875449252880, -0.974389533464800,
394 -0.974389533464800, -0.331485915788080, -0.331485915788080, -0.974389533464800,
395 -0.617368143234940, 0.598534426856625, 0.598534426856625, -0.617368143234940,
396 -0.981166283621686, 0.598534426856625, 0.598534426856625, -0.981166283621686,
397 -0.981166283621686, -0.617368143234940, -0.617368143234940, -0.981166283621686,
398 -0.846737941679184, 0.837351785097968, 0.837351785097968, -0.846737941679184,
399 -0.990613843418784, 0.837351785097968, 0.837351785097968, -0.990613843418784,
400 -0.990613843418784, -0.846737941679184, -0.846737941679184, -0.990613843418784,
401 -0.530582382227094, 0.412831673770520, 0.412831673770520, -0.530582382227094,
402 -0.882249291543426, 0.412831673770520, 0.412831673770520, -0.882249291543426,
403 -0.882249291543426, -0.530582382227094, -0.530582382227094, -0.882249291543426,
404 -0.230167008731505, 0.092655855430620, 0.092655855430620, -0.230167008731505,
405 -0.862488846699115, 0.092655855430620, 0.092655855430620, -0.862488846699115,
406 -0.862488846699115, -0.230167008731505, -0.230167008731505, -0.862488846699115,
407 -0.769841956364772, 0.681416462088999, 0.681416462088999, -0.769841956364772,
408 -0.911574505724228, 0.681416462088999, 0.681416462088999, -0.911574505724228,
409 -0.911574505724228, -0.769841956364772, -0.769841956364772, -0.911574505724228,
410 -0.502901760016855, 0.206946937904245, 0.206946937904245, -0.502901760016855,
411 -0.704045177887389, 0.206946937904245, 0.206946937904245, -0.704045177887389,
412 -0.704045177887389, -0.502901760016855, -0.502901760016855, -0.704045177887389,
413 -0.258115377755090, -0.067105414124881, -0.067105414124881, -0.258115377755090,
414 -0.674779208120030, -0.067105414124880, -0.067105414124880, -0.674779208120030,
415 -0.674779208120030, -0.258115377755090, -0.258115377755090, -0.674779208120030}};
416 static const std::array<double, 66> cub2D_17_weights_data = {
417 {0.022448424077156, 0.022448424077156, 0.022448424077156, 0.011377816766740, 0.011377816766740,
418 0.011377816766740, 0.056148078797670, 0.056148078797670, 0.056148078797670, 0.031804753050686,
419 0.031804753050686, 0.031804753050686, 0.042944604159838, 0.042944604159838, 0.042944604159838,
420 0.004138336267131, 0.004138336267131, 0.004138336267131, 0.020094111670483, 0.020094111670483,
421 0.020094111670483, 0.020094111670483, 0.020094111670483, 0.020094111670483, 0.013023443943004,
422 0.013023443943004, 0.013023443943004, 0.013023443943004, 0.013023443943004, 0.013023443943004,
423 0.005856954369545, 0.005856954369545, 0.005856954369545, 0.005856954369545, 0.005856954369545,
424 0.005856954369545, 0.037746172643499, 0.037746172643499, 0.037746172643499, 0.037746172643499,
425 0.037746172643499, 0.037746172643499, 0.048362752988591, 0.048362752988591, 0.048362752988591,
426 0.048362752988591, 0.048362752988591, 0.048362752988591, 0.023467126169388, 0.023467126169388,
427 0.023467126169388, 0.023467126169388, 0.023467126169388, 0.023467126169388, 0.054703428836887,
428 0.054703428836887, 0.054703428836887, 0.054703428836887, 0.054703428836887, 0.054703428836887,
429 0.045648336152327, 0.045648336152327, 0.045648336152327, 0.045648336152327, 0.045648336152327,
430 0.045648336152327}};
431
432 // For cub2D_18: 73 points (73*3 = 219 elements)
433 static const std::array<double, 73 * 2> cub2D_18_nodes_data = {
434 {-0.333333333333333, -0.333333333333333, -0.012131216528029, -0.012131216528029,
435 -0.975737566943942, -0.012131216528029, -0.012131216528029, -0.975737566943942,
436 -0.230136518749796, -0.230136518749796, -0.539726962500408, -0.230136518749796,
437 -0.230136518749796, -0.539726962500408, -0.499402807850562, -0.499402807850562,
438 -0.001194384298875, -0.499402807850563, -0.499402807850563, -0.001194384298875,
439 -0.710045241598598, -0.710045241598598, 0.420090483197196, -0.710045241598598,
440 -0.710045241598598, 0.420090483197196, -0.903019171569391, -0.903019171569391,
441 0.806038343138783, -0.903019171569391, -0.903019171569391, 0.806038343138783,
442 -0.972866921676664, -0.972866921676664, 0.945733843353328, -0.972866921676664,
443 -0.972866921676664, 0.945733843353328, -0.859848143426920, 0.852682278520227,
444 0.852682278520227, -0.859848143426920, -0.992834135093306, 0.852682278520227,
445 0.852682278520227, -0.992834135093306, -0.992834135093306, -0.859848143426920,
446 -0.859848143426920, -0.992834135093306, -0.592208428296456, 0.573110619333459,
447 0.573110619333459, -0.592208428296456, -0.980902191037003, 0.573110619333459,
448 0.573110619333459, -0.980902191037003, -0.980902191037003, -0.592208428296456,
449 -0.592208428296456, -0.980902191037003, -0.316660705097116, 0.294011442575493,
450 0.294011442575493, -0.316660705097116, -0.977350737478378, 0.294011442575493,
451 0.294011442575493, -0.977350737478378, -0.977350737478378, -0.316660705097116,
452 -0.316660705097116, -0.977350737478378, -0.762708275393600, 0.720805143081058,
453 0.720805143081058, -0.762708275393600, -0.958096867687458, 0.720805143081058,
454 0.720805143081058, -0.958096867687458, -0.958096867687458, -0.762708275393600,
455 -0.762708275393600, -0.958096867687458, -0.499464753852078, 0.389673957377540,
456 0.389673957377540, -0.499464753852078, -0.890209203525462, 0.389673957377540,
457 0.389673957377540, -0.890209203525462, -0.890209203525462, -0.499464753852078,
458 -0.499464753852078, -0.890209203525462, -0.730193961187213, 0.595225312221749,
459 0.595225312221749, -0.730193961187213, -0.865031351034536, 0.595225312221749,
460 0.595225312221749, -0.865031351034536, -0.865031351034535, -0.730193961187213,
461 -0.730193961187213, -0.865031351034535, -0.213662181077459, 0.092159471784540,
462 0.092159471784540, -0.213662181077459, -0.878497290707081, 0.092159471784540,
463 0.092159471784540, -0.878497290707081, -0.878497290707081, -0.213662181077459,
464 -0.213662181077459, -0.878497290707081, -0.268906542375276, -0.010964677486621,
465 -0.010964677486621, -0.268906542375276, -0.720128780138103, -0.010964677486621,
466 -0.010964677486621, -0.720128780138103, -0.720128780138103, -0.268906542375276,
467 -0.268906542375276, -0.720128780138103, -0.507963230765286, 0.233062121320884,
468 0.233062121320884, -0.507963230765286, -0.725098890555598, 0.233062121320884,
469 0.233062121320884, -0.725098890555598, -0.725098890555598, -0.507963230765286,
470 -0.507963230765286, -0.725098890555598}};
471 static const std::array<double, 73> cub2D_18_weights_data = {
472 {0.044365924378076, 0.019118866558615, 0.019118866558615, 0.019118866558615, 0.049294282264207,
473 0.049294282264207, 0.049294282264207, 0.060654125981259, 0.060654125981259, 0.060654125981259,
474 0.031366231844497, 0.031366231844497, 0.031366231844497, 0.016173035699059, 0.016173035699059,
475 0.016173035699059, 0.004750076743416, 0.004750076743416, 0.004750076743416, 0.004329998364046,
476 0.004329998364046, 0.004329998364046, 0.004329998364046, 0.004329998364046, 0.004329998364046,
477 0.012300136592151, 0.012300136592151, 0.012300136592151, 0.012300136592151, 0.012300136592151,
478 0.012300136592151, 0.017146550496094, 0.017146550496094, 0.017146550496094, 0.017146550496094,
479 0.017146550496094, 0.017146550496094, 0.010992784367686, 0.010992784367686, 0.010992784367686,
480 0.010992784367686, 0.010992784367686, 0.010992784367686, 0.033988423627451, 0.033988423627451,
481 0.033988423627451, 0.033988423627451, 0.033988423627451, 0.033988423627451, 0.025768775250048,
482 0.025768775250048, 0.025768775250048, 0.025768775250048, 0.025768775250048, 0.025768775250048,
483 0.040023698716305, 0.040023698716305, 0.040023698716305, 0.040023698716305, 0.040023698716305,
484 0.040023698716305, 0.045277248097616, 0.045277248097616, 0.045277248097616, 0.045277248097616,
485 0.045277248097616, 0.045277248097616, 0.045433087546729, 0.045433087546729, 0.045433087546729,
486 0.045433087546729, 0.045433087546729, 0.045433087546729}};
487
488 // For cub2D_19: 82 points (82*3 = 246 elements)
489 static const std::array<double, 82 * 2> cub2D_19_nodes_data = {
490 {-0.333333333333333, -0.333333333333333, -0.121193890022463, -0.121193890022463,
491 -0.757612219955075, -0.121193890022463, -0.121193890022463, -0.757612219955075,
492 -0.227921589064499, -0.227921589064499, -0.544156821871001, -0.227921589064499,
493 -0.227921589064499, -0.544156821871001, -0.480832787187258, -0.480832787187258,
494 -0.038334425625484, -0.480832787187258, -0.480832787187258, -0.038334425625484,
495 -0.607587000462791, -0.607587000462791, 0.215174000925582, -0.607587000462791,
496 -0.607587000462791, 0.215174000925582, -0.728032884013154, -0.728032884013154,
497 0.456065768026307, -0.728032884013154, -0.728032884013154, 0.456065768026307,
498 -0.884999963315497, -0.884999963315497, 0.769999926630994, -0.884999963315497,
499 -0.884999963315497, 0.769999926630994, -0.973927705240279, -0.973927705240279,
500 0.947855410480559, -0.973927705240279, -0.973927705240279, 0.947855410480559,
501 -0.419340397282846, 0.418549313572482, 0.418549313572482, -0.419340397282846,
502 -0.999208916289636, 0.418549313572482, 0.418549313572482, -0.999208916289636,
503 -0.999208916289636, -0.419340397282846, -0.419340397282846, -0.999208916289636,
504 -0.154285565801825, 0.131285016869205, 0.131285016869205, -0.154285565801825,
505 -0.976999451067380, 0.131285016869205, 0.131285016869205, -0.976999451067380,
506 -0.976999451067380, -0.154285565801825, -0.154285565801825, -0.976999451067380,
507 -0.864328042937615, 0.842262778125134, 0.842262778125134, -0.864328042937615,
508 -0.977934735187519, 0.842262778125134, 0.842262778125134, -0.977934735187519,
509 -0.977934735187519, -0.864328042937615, -0.864328042937615, -0.977934735187519,
510 -0.676980679779850, 0.654351228666662, 0.654351228666662, -0.676980679779850,
511 -0.977370548886812, 0.654351228666662, 0.654351228666662, -0.977370548886812,
512 -0.977370548886812, -0.676980679779850, -0.676980679779850, -0.977370548886812,
513 -0.451038034994882, 0.391933493150074, 0.391933493150074, -0.451038034994882,
514 -0.940895458155192, 0.391933493150074, 0.391933493150074, -0.940895458155192,
515 -0.940895458155192, -0.451038034994882, -0.451038034994882, -0.940895458155192,
516 -0.755079003035426, 0.643775758022122, 0.643775758022122, -0.755079003035426,
517 -0.888696754986697, 0.643775758022122, 0.643775758022122, -0.888696754986697,
518 -0.888696754986697, -0.755079003035426, -0.755079003035426, -0.888696754986697,
519 -0.668500025831376, 0.544622467980326, 0.544622467980326, -0.668500025831376,
520 -0.876122442148950, 0.544622467980326, 0.544622467980326, -0.876122442148950,
521 -0.876122442148950, -0.668500025831376, -0.668500025831376, -0.876122442148950,
522 -0.205954158284095, 0.090524206162520, 0.090524206162520, -0.205954158284095,
523 -0.884570047878425, 0.090524206162520, 0.090524206162520, -0.884570047878425,
524 -0.884570047878425, -0.205954158284095, -0.205954158284095, -0.884570047878425,
525 -0.488476686471250, 0.295757669634562, 0.295757669634562, -0.488476686471250,
526 -0.807280983163311, 0.295757669634562, 0.295757669634562, -0.807280983163311,
527 -0.807280983163311, -0.488476686471250, -0.488476686471250, -0.807280983163311,
528 -0.342507806805715, 0.042214391480752, 0.042214391480752, -0.342507806805715,
529 -0.699706584675037, 0.042214391480751, 0.042214391480751, -0.699706584675037,
530 -0.699706584675037, -0.342507806805715, -0.342507806805715, -0.699706584675037}};
531 static const std::array<double, 82> cub2D_19_weights_data = {
532 {0.041424760048010, 0.031784855337689, 0.031784855337689, 0.031784855337689, 0.048406599909930,
533 0.048406599909930, 0.048406599909930, 0.048177661858475, 0.048177661858475, 0.048177661858475,
534 0.042691162490028, 0.042691162490028, 0.042691162490028, 0.031889013978028, 0.031889013978028,
535 0.031889013978028, 0.015529272923518, 0.015529272923518, 0.015529272923518, 0.004442852871415,
536 0.004442852871415, 0.004442852871415, 0.004599409024561, 0.004599409024561, 0.004599409024561,
537 0.004599409024561, 0.004599409024561, 0.004599409024561, 0.016608327001253, 0.016608327001253,
538 0.016608327001253, 0.016608327001253, 0.016608327001253, 0.016608327001253, 0.008508350664254,
539 0.008508350664254, 0.008508350664254, 0.008508350664254, 0.008508350664254, 0.008508350664254,
540 0.012752760516072, 0.012752760516072, 0.012752760516072, 0.012752760516072, 0.012752760516072,
541 0.012752760516072, 0.024864731137205, 0.024864731137205, 0.024864731137205, 0.024864731137205,
542 0.024864731137205, 0.024864731137205, 0.012779469878381, 0.012779469878381, 0.012779469878381,
543 0.012779469878381, 0.012779469878381, 0.012779469878381, 0.017801502950615, 0.017801502950615,
544 0.017801502950615, 0.017801502950615, 0.017801502950615, 0.017801502950615, 0.035738233266717,
545 0.035738233266717, 0.035738233266717, 0.035738233266717, 0.035738233266717, 0.035738233266717,
546 0.038344199404453, 0.038344199404453, 0.038344199404453, 0.038344199404453, 0.038344199404453,
547 0.038344199404453, 0.042971513130613, 0.042971513130613, 0.042971513130613, 0.042971513130613,
548 0.042971513130613, 0.042971513130613}};
549
550 // For cub2D_20: 85 points (85*3 = 255 elements)
551 static const std::array<double, 85 * 2> cub2D_20_nodes_data = {
552 {-0.333333333333333, -0.333333333333333, -0.001500649324429, -0.001500649324429,
553 -0.996998701351142, -0.001500649324429, -0.001500649324429, -0.996998701351142,
554 -0.094139751938951, -0.094139751938951, -0.811720496122098, -0.094139751938951,
555 -0.094139751938951, -0.811720496122098, -0.204472124089526, -0.204472124089526,
556 -0.591055751820947, -0.204472124089526, -0.204472124089526, -0.591055751820947,
557 -0.470999594934425, -0.470999594934425, -0.058000810131149, -0.470999594934425,
558 -0.470999594934425, -0.058000810131149, -0.577962071815846, -0.577962071815846,
559 0.155924143631693, -0.577962071815846, -0.577962071815846, 0.155924143631693,
560 -0.784528785657457, -0.784528785657457, 0.569057571314915, -0.784528785657457,
561 -0.784528785657457, 0.569057571314915, -0.921861824324395, -0.921861824324395,
562 0.843723648648789, -0.921861824324395, -0.921861824324395, 0.843723648648789,
563 -0.977651240541341, -0.977651240541341, 0.955302481082681, -0.977651240541341,
564 -0.977651240541341, 0.955302481082681, -0.872900668183296, 0.862201431808621,
565 0.862201431808621, -0.872900668183296, -0.989300763625325, 0.862201431808621,
566 0.862201431808621, -0.989300763625325, -0.989300763625325, -0.872900668183295,
567 -0.872900668183295, -0.989300763625325, -0.685786162118586, 0.669876527986188,
568 0.669876527986188, -0.685786162118586, -0.984090365867602, 0.669876527986188,
569 0.669876527986188, -0.984090365867602, -0.984090365867602, -0.685786162118586,
570 -0.685786162118586, -0.984090365867602, -0.208715771271252, 0.187870974708724,
571 0.187870974708724, -0.208715771271252, -0.979155203437472, 0.187870974708724,
572 0.187870974708724, -0.979155203437472, -0.979155203437472, -0.208715771271252,
573 -0.208715771271252, -0.979155203437472, -0.453664858574179, 0.431736028981932,
574 0.431736028981932, -0.453664858574179, -0.978071170407753, 0.431736028981932,
575 0.431736028981932, -0.978071170407753, -0.978071170407753, -0.453664858574179,
576 -0.453664858574179, -0.978071170407753, -0.796429235029966, 0.719295810859041,
577 0.719295810859041, -0.796429235029966, -0.922866575829075, 0.719295810859041,
578 0.719295810859041, -0.922866575829075, -0.922866575829075, -0.796429235029966,
579 -0.796429235029966, -0.922866575829075, -0.106682901647172, 0.035521886012736,
580 0.035521886012736, -0.106682901647172, -0.928838984365563, 0.035521886012736,
581 0.035521886012736, -0.928838984365563, -0.928838984365564, -0.106682901647172,
582 -0.106682901647172, -0.928838984365564, -0.601978411700994, 0.502636778975466,
583 0.502636778975466, -0.601978411700994, -0.900658367274472, 0.502636778975466,
584 0.502636778975466, -0.900658367274472, -0.900658367274472, -0.601978411700994,
585 -0.601978411700994, -0.900658367274472, -0.351477632615435, 0.234438182446771,
586 0.234438182446771, -0.351477632615435, -0.882960549831337, 0.234438182446771,
587 0.234438182446771, -0.882960549831337, -0.882960549831337, -0.351477632615435,
588 -0.351477632615435, -0.882960549831337, -0.582937273579734, 0.339941699570946,
589 0.339941699570946, -0.582937273579734, -0.757004425991211, 0.339941699570946,
590 0.339941699570946, -0.757004425991211, -0.757004425991211, -0.582937273579734,
591 -0.582937273579734, -0.757004425991211, -0.353658866927485, 0.072237177039608,
592 0.072237177039608, -0.353658866927485, -0.718578310112123, 0.072237177039608,
593 0.072237177039608, -0.718578310112123, -0.718578310112123, -0.353658866927485,
594 -0.353658866927485, -0.718578310112123}};
595 static const std::array<double, 85> cub2D_20_weights_data = {
596 {0.055220853995399, 0.003558059094653, 0.003558059094653, 0.003558059094653,
597 0.040224796227922, 0.040224796227922, 0.040224796227922, 0.053635694518663,
598 0.053635694518663, 0.053635694518663, 0.049046267603004, 0.049046267603004,
599 0.049046267603004, 0.032789156821391, 0.032789156821391, 0.032789156821391,
600 0.029591814797299, 0.029591814797299, 0.029591814797299, 0.009158564555409,
601 0.009158564555409, 0.009158564555409, 0.003303653031152, 0.003303653031152,
602 0.003303653031152, 0.004698341817151, 0.004698341817151, 0.004698341817151,
603 0.004698341817151, 0.004698341817151, 0.004698341817151, 0.008931851508364,
604 0.008931851508364, 0.008931851508364, 0.008931851508364, 0.008931851508364,
605 0.008931851508364, 0.012199133615816, 0.012199133615816, 0.012199133615816,
606 0.012199133615816, 0.012199133615816, 0.012199133615816, 0.013782162654376,
607 0.013782162654376, 0.013782162654376, 0.013782162654376, 0.013782162654376,
608 0.013782162654376, 0.015994950144956, 0.015994950144956, 0.015994950144956,
609 0.015994950144956, 0.015994950144956, 0.015994950144956, 0.014772268570672,
610 0.014772268570672, 0.014772268570672, 0.014772268570672, 0.014772268570672,
611 0.014772268570672, 0.025598663757297, 0.025598663757297, 0.025598663757297,
612 0.025598663757297, 0.025598663757297, 0.025598663757297, 0.034516142351393,
613 0.034516142351393, 0.034516142351393, 0.034516142351393, 0.034516142351393,
614 0.034516142351393, 0.037345891805871, 0.037345891805871, 0.037345891805871,
615 0.037345891805871, 0.037345891805871, 0.037345891805871, 0.045636448116791,
616 0.045636448116791, 0.045636448116791, 0.045636448116791, 0.045636448116791,
617 0.045636448116791}};
618
619 // For cub2D_21: 93 points (93*3 = 279 elements)
620 static const std::array<double, 93 * 2> cub2D_21_nodes_data = {
621 {-0.006427416686680, -0.006427416686680, -0.987145166626641, -0.006427416686680,
622 -0.006427416686680, -0.987145166626641, -0.037371238381685, -0.037371238381685,
623 -0.925257523236629, -0.037371238381685, -0.037371238381685, -0.925257523236629,
624 -0.101972641308225, -0.101972641308225, -0.796054717383551, -0.101972641308225,
625 -0.101972641308225, -0.796054717383551, -0.405469125577621, -0.405469125577621,
626 -0.189061748844758, -0.405469125577621, -0.405469125577621, -0.189061748844758,
627 -0.556282620757932, -0.556282620757932, 0.112565241515865, -0.556282620757932,
628 -0.556282620757932, 0.112565241515865, -0.787490889149774, -0.787490889149774,
629 0.574981778299548, -0.787490889149774, -0.787490889149774, 0.574981778299548,
630 -0.892713038713217, -0.892713038713217, 0.785426077426434, -0.892713038713217,
631 -0.892713038713217, 0.785426077426434, -0.975095902008750, 0.956581360464913,
632 0.956581360464913, -0.975095902008750, -0.981485458456163, 0.956581360464913,
633 0.956581360464913, -0.981485458456163, -0.981485458456163, -0.975095902008750,
634 -0.975095902008750, -0.981485458456163, -0.734190363492767, 0.718759150923754,
635 0.718759150923754, -0.734190363492767, -0.984568787430988, 0.718759150923754,
636 0.718759150923754, -0.984568787430988, -0.984568787430988, -0.734190363492767,
637 -0.734190363492767, -0.984568787430988, -0.279909645448207, 0.260066127858194,
638 0.260066127858194, -0.279909645448207, -0.980156482409987, 0.260066127858194,
639 0.260066127858194, -0.980156482409987, -0.980156482409987, -0.279909645448207,
640 -0.279909645448207, -0.980156482409987, -0.527626383829046, 0.508213994286434,
641 0.508213994286434, -0.527626383829046, -0.980587610457388, 0.508213994286434,
642 0.508213994286434, -0.980587610457388, -0.980587610457388, -0.527626383829046,
643 -0.527626383829046, -0.980587610457388, -0.887945885434766, 0.867094084690673,
644 0.867094084690673, -0.887945885434766, -0.979148199255907, 0.867094084690673,
645 0.867094084690673, -0.979148199255907, -0.979148199255907, -0.887945885434766,
646 -0.887945885434766, -0.979148199255907, -0.738154400021390, 0.655149643679198,
647 0.655149643679198, -0.738154400021390, -0.916995243657807, 0.655149643679198,
648 0.655149643679198, -0.916995243657807, -0.916995243657807, -0.738154400021390,
649 -0.738154400021390, -0.916995243657807, -0.296840355384531, 0.194393499586184,
650 0.194393499586184, -0.296840355384531, -0.897553144201652, 0.194393499586184,
651 0.194393499586184, -0.897553144201652, -0.897553144201652, -0.296840355384531,
652 -0.296840355384531, -0.897553144201652, -0.531632641825188, 0.431035654635683,
653 0.431035654635683, -0.531632641825188, -0.899403012810496, 0.431035654635683,
654 0.431035654635683, -0.899403012810496, -0.899403012810496, -0.531632641825188,
655 -0.531632641825188, -0.899403012810496, -0.682130525363537, 0.500223407469218,
656 0.500223407469218, -0.682130525363537, -0.818092882105681, 0.500223407469218,
657 0.500223407469218, -0.818092882105681, -0.818092882105681, -0.682130525363537,
658 -0.682130525363537, -0.818092882105681, -0.376270450471865, 0.138207573987544,
659 0.138207573987544, -0.376270450471865, -0.761937123515678, 0.138207573987544,
660 0.138207573987544, -0.761937123515678, -0.761937123515678, -0.376270450471865,
661 -0.376270450471865, -0.761937123515678, -0.590719081005038, 0.339375331943743,
662 0.339375331943743, -0.590719081005038, -0.748656250938705, 0.339375331943743,
663 0.339375331943743, -0.748656250938705, -0.748656250938705, -0.590719081005038,
664 -0.590719081005038, -0.748656250938705, -0.305527033262063, -0.081590222620926,
665 -0.081590222620926, -0.305527033262063, -0.612882744117011, -0.081590222620926,
666 -0.081590222620926, -0.612882744117011, -0.612882744117011, -0.305527033262063,
667 -0.305527033262063, -0.612882744117011}};
668
669 static const std::array<double, 93> cub2D_21_weights_data = {
670 {0.009411977990382, 0.009411977990382, 0.009411977990382, 0.023551229711283, 0.023551229711283,
671 0.023551229711283, 0.041353961937512, 0.041353961937512, 0.041353961937512, 0.045947520102707,
672 0.045947520102707, 0.045947520102707, 0.047724273523632, 0.047724273523632, 0.047724273523632,
673 0.019906824503099, 0.019906824503099, 0.019906824503099, 0.014287994054933, 0.014287994054933,
674 0.014287994054933, 0.001538784565604, 0.001538784565604, 0.001538784565604, 0.001538784565604,
675 0.001538784565604, 0.001538784565604, 0.007257720730941, 0.007257720730941, 0.007257720730941,
676 0.007257720730941, 0.007257720730941, 0.007257720730941, 0.013303360825119, 0.013303360825119,
677 0.013303360825119, 0.013303360825119, 0.013303360825119, 0.013303360825119, 0.011413497063052,
678 0.011413497063052, 0.011413497063052, 0.011413497063052, 0.011413497063052, 0.011413497063052,
679 0.006552521291655, 0.006552521291655, 0.006552521291655, 0.006552521291655, 0.006552521291655,
680 0.006552521291655, 0.017432381135646, 0.017432381135646, 0.017432381135646, 0.017432381135646,
681 0.017432381135646, 0.017432381135646, 0.027402609499462, 0.027402609499462, 0.027402609499462,
682 0.027402609499462, 0.027402609499462, 0.027402609499462, 0.025014173853794, 0.025014173853794,
683 0.025014173853794, 0.025014173853794, 0.025014173853794, 0.025014173853794, 0.008690112508894,
684 0.008690112508894, 0.008690112508894, 0.008690112508894, 0.008690112508894, 0.008690112508894,
685 0.037386369243416, 0.037386369243416, 0.037386369243416, 0.037386369243416, 0.037386369243416,
686 0.037386369243416, 0.032509611084921, 0.032509611084921, 0.032509611084921, 0.032509611084921,
687 0.032509611084921, 0.032509611084921, 0.043740300619054, 0.043740300619054, 0.043740300619054,
688 0.043740300619054, 0.043740300619054, 0.043740300619054}};
689
690 // For cub2D_22: 100 points (100*3 = 300 elements)
691 static const std::array<double, 100 * 2> cub2D_22_nodes_data = {
692 {-0.333333333333333, -0.333333333333333, -0.005980679319437, -0.005980679319437,
693 -0.988038641361126, -0.005980679319437, -0.005980679319437, -0.988038641361126,
694 -0.112289615572167, -0.112289615572167, -0.775420768855665, -0.112289615572167,
695 -0.112289615572167, -0.775420768855665, -0.209082673923590, -0.209082673923590,
696 -0.581834652152820, -0.209082673923590, -0.209082673923590, -0.581834652152820,
697 -0.467712894350161, -0.467712894350161, -0.064574211299679, -0.467712894350161,
698 -0.467712894350161, -0.064574211299679, -0.616276252022817, -0.616276252022817,
699 0.232552504045635, -0.616276252022817, -0.616276252022817, 0.232552504045635,
700 -0.755246756631224, -0.755246756631224, 0.510493513262448, -0.755246756631224,
701 -0.755246756631224, 0.510493513262448, -0.893562558892192, -0.893562558892192,
702 0.787125117784384, -0.893562558892192, -0.893562558892192, 0.787125117784384,
703 -0.943105536827199, -0.943105536827199, 0.886211073654399, -0.943105536827199,
704 -0.943105536827199, 0.886211073654399, -0.991786296535875, -0.991786296535875,
705 0.983572593071750, -0.991786296535875, -0.991786296535875, 0.983572593071750,
706 -0.413667191986728, 0.401491377065593, 0.401491377065593, -0.413667191986728,
707 -0.987824185078864, 0.401491377065593, 0.401491377065593, -0.987824185078864,
708 -0.987824185078865, -0.413667191986728, -0.413667191986728, -0.987824185078865,
709 -0.932052869826067, 0.918490219898898, 0.918490219898898, -0.932052869826067,
710 -0.986437350072830, 0.918490219898898, 0.918490219898898, -0.986437350072830,
711 -0.986437350072830, -0.932052869826067, -0.932052869826067, -0.986437350072830,
712 -0.640599464469824, 0.623868058857117, 0.623868058857117, -0.640599464469824,
713 -0.983268594387293, 0.623868058857116, 0.623868058857116, -0.983268594387293,
714 -0.983268594387293, -0.640599464469824, -0.640599464469824, -0.983268594387293,
715 -0.158411570812104, 0.140890429939385, 0.140890429939385, -0.158411570812104,
716 -0.982478859127282, 0.140890429939385, 0.140890429939385, -0.982478859127282,
717 -0.982478859127282, -0.158411570812104, -0.158411570812104, -0.982478859127282,
718 -0.814806216564922, 0.793459188393794, 0.793459188393794, -0.814806216564922,
719 -0.978652971828873, 0.793459188393795, 0.793459188393795, -0.978652971828873,
720 -0.978652971828873, -0.814806216564922, -0.814806216564922, -0.978652971828873,
721 -0.363960589331557, 0.295112627690632, 0.295112627690632, -0.363960589331557,
722 -0.931152038359075, 0.295112627690632, 0.295112627690632, -0.931152038359075,
723 -0.931152038359075, -0.363960589331557, -0.363960589331557, -0.931152038359075,
724 -0.570323384314285, 0.491002374048080, 0.491002374048080, -0.570323384314285,
725 -0.920678989733795, 0.491002374048080, 0.491002374048080, -0.920678989733795,
726 -0.920678989733795, -0.570323384314285, -0.570323384314285, -0.920678989733795,
727 -0.134636707603169, 0.047157943371727, 0.047157943371727, -0.134636707603169,
728 -0.912521235768557, 0.047157943371727, 0.047157943371727, -0.912521235768557,
729 -0.912521235768557, -0.134636707603169, -0.134636707603169, -0.912521235768557,
730 -0.752804662376914, 0.649201355096884, 0.649201355096884, -0.752804662376914,
731 -0.896396692719970, 0.649201355096884, 0.649201355096884, -0.896396692719970,
732 -0.896396692719970, -0.752804662376914, -0.752804662376914, -0.896396692719970,
733 -0.328638645186542, 0.161176552903625, 0.161176552903625, -0.328638645186542,
734 -0.832537907717083, 0.161176552903625, 0.161176552903625, -0.832537907717083,
735 -0.832537907717083, -0.328638645186542, -0.328638645186542, -0.832537907717083,
736 -0.559939069093864, 0.361861076343249, 0.361861076343249, -0.559939069093864,
737 -0.801922007249385, 0.361861076343249, 0.361861076343249, -0.801922007249385,
738 -0.801922007249385, -0.559939069093864, -0.559939069093864, -0.801922007249385,
739 -0.388196135129182, 0.068617773977901, 0.068617773977901, -0.388196135129182,
740 -0.680421638848718, 0.068617773977901, 0.068617773977901, -0.680421638848718,
741 -0.680421638848718, -0.388196135129182, -0.388196135129182, -0.680421638848718}};
742 static const std::array<double, 100> cub2D_22_weights_data = {
743 {0.052134891986775, 0.002127559342619, 0.002127559342619, 0.002127559342619,
744 0.040243429730281, 0.040243429730281, 0.040243429730281, 0.048340550896214,
745 0.048340550896214, 0.048340550896214, 0.047378470721283, 0.047378470721283,
746 0.047378470721283, 0.040231109011798, 0.040231109011798, 0.040231109011798,
747 0.027899919845537, 0.027899919845537, 0.027899919845537, 0.012350949744993,
748 0.012350949744993, 0.012350949744993, 0.003039705316805, 0.003039705316805,
749 0.003039705316805, 0.000691671630889, 0.000691671630889, 0.000691671630889,
750 0.008022198405286, 0.008022198405286, 0.008022198405286, 0.008022198405286,
751 0.008022198405286, 0.008022198405286, 0.003090974933637, 0.003090974933637,
752 0.003090974933637, 0.003090974933637, 0.003090974933637, 0.003090974933637,
753 0.008631214056178, 0.008631214056178, 0.008631214056178, 0.008631214056178,
754 0.008631214056178, 0.008631214056178, 0.010897457944070, 0.010897457944070,
755 0.010897457944070, 0.010897457944070, 0.010897457944070, 0.010897457944070,
756 0.008001551263950, 0.008001551263950, 0.008001551263950, 0.008001551263950,
757 0.008001551263950, 0.008001551263950, 0.017745434082141, 0.017745434082141,
758 0.017745434082141, 0.017745434082141, 0.017745434082141, 0.017745434082141,
759 0.017950672107247, 0.017950672107247, 0.017950672107247, 0.017950672107247,
760 0.017950672107247, 0.017950672107247, 0.019228676191702, 0.019228676191702,
761 0.019228676191702, 0.019228676191702, 0.019228676191702, 0.019228676191702,
762 0.019100455942623, 0.019100455942623, 0.019100455942623, 0.019100455942623,
763 0.019100455942623, 0.019100455942623, 0.028083739150636, 0.028083739150636,
764 0.028083739150636, 0.028083739150636, 0.028083739150636, 0.028083739150636,
765 0.031874915632607, 0.031874915632607, 0.031874915632607, 0.031874915632607,
766 0.031874915632607, 0.031874915632607, 0.040865211838584, 0.040865211838584,
767 0.040865211838584, 0.040865211838584, 0.040865211838584, 0.040865211838584}};
768
769 // For cub2D_23: 106 points (106*3 = 318 elements)
770 static const std::array<double, 106 * 2> cub2D_23_nodes_data = {
771 {-0.333333333333333, -0.333333333333333, -0.023538910955543, -0.023538910955543,
772 -0.952922178088914, -0.023538910955543, -0.023538910955543, -0.952922178088914,
773 -0.112255282121933, -0.112255282121933, -0.775489435756134, -0.112255282121933,
774 -0.112255282121933, -0.775489435756134, -0.212088442838205, -0.212088442838205,
775 -0.575823114323591, -0.212088442838205, -0.212088442838205, -0.575823114323591,
776 -0.467032671065063, -0.467032671065063, -0.065934657869875, -0.467032671065063,
777 -0.467032671065063, -0.065934657869875, -0.602458675644835, -0.602458675644835,
778 0.204917351289670, -0.602458675644835, -0.602458675644835, 0.204917351289670,
779 -0.729340080155585, -0.729340080155585, 0.458680160311169, -0.729340080155585,
780 -0.729340080155585, 0.458680160311169, -0.835032835950571, -0.835032835950571,
781 0.670065671901142, -0.835032835950571, -0.835032835950571, 0.670065671901142,
782 -0.916650365183127, -0.916650365183127, 0.833300730366254, -0.916650365183127,
783 -0.916650365183127, 0.833300730366254, -0.982250743407210, -0.982250743407210,
784 0.964501486814420, -0.982250743407210, -0.982250743407210, 0.964501486814420,
785 -0.105601712649592, 0.098292547426640, 0.098292547426640, -0.105601712649592,
786 -0.992690834777047, 0.098292547426640, 0.098292547426640, -0.992690834777047,
787 -0.992690834777047, -0.105601712649592, -0.105601712649592, -0.992690834777047,
788 -0.775227228315076, 0.773362241907340, 0.773362241907340, -0.775227228315076,
789 -0.998135013592264, 0.773362241907340, 0.773362241907340, -0.998135013592264,
790 -0.998135013592264, -0.775227228315076, -0.775227228315076, -0.998135013592264,
791 -0.399056075238285, 0.392811698367078, 0.392811698367078, -0.399056075238285,
792 -0.993755623128794, 0.392811698367078, 0.392811698367078, -0.993755623128794,
793 -0.993755623128794, -0.399056075238285, -0.399056075238285, -0.993755623128794,
794 -0.907633572417643, 0.891831436837026, 0.891831436837026, -0.907633572417643,
795 -0.984197864419384, 0.891831436837026, 0.891831436837026, -0.984197864419384,
796 -0.984197864419383, -0.907633572417642, -0.907633572417642, -0.984197864419383,
797 -0.610008084404048, 0.588812673873118, 0.588812673873118, -0.610008084404048,
798 -0.978804589469070, 0.588812673873118, 0.588812673873118, -0.978804589469070,
799 -0.978804589469070, -0.610008084404048, -0.610008084404048, -0.978804589469070,
800 -0.243171741354056, 0.207960140279272, 0.207960140279272, -0.243171741354056,
801 -0.964788398925216, 0.207960140279272, 0.207960140279272, -0.964788398925216,
802 -0.964788398925216, -0.243171741354055, -0.243171741354055, -0.964788398925216,
803 -0.789506197850739, 0.739925802118596, 0.739925802118596, -0.789506197850739,
804 -0.950419604267857, 0.739925802118596, 0.739925802118596, -0.950419604267857,
805 -0.950419604267857, -0.789506197850739, -0.789506197850739, -0.950419604267857,
806 -0.455884762353173, 0.385117794610837, 0.385117794610837, -0.455884762353173,
807 -0.929233032257664, 0.385117794610837, 0.385117794610837, -0.929233032257664,
808 -0.929233032257664, -0.455884762353173, -0.455884762353173, -0.929233032257664,
809 -0.112482048478797, 0.019740291196956, 0.019740291196956, -0.112482048478797,
810 -0.907258242718159, 0.019740291196956, 0.019740291196956, -0.907258242718159,
811 -0.907258242718159, -0.112482048478797, -0.112482048478797, -0.907258242718159,
812 -0.664205324633765, 0.550530931038120, 0.550530931038120, -0.664205324633765,
813 -0.886325606404355, 0.550530931038120, 0.550530931038120, -0.886325606404355,
814 -0.886325606404354, -0.664205324633765, -0.664205324633765, -0.886325606404354,
815 -0.295594853518405, 0.152149871080588, 0.152149871080588, -0.295594853518405,
816 -0.856555017562183, 0.152149871080588, 0.152149871080588, -0.856555017562183,
817 -0.856555017562183, -0.295594853518405, -0.295594853518405, -0.856555017562183,
818 -0.525935282564036, 0.319991164262401, 0.319991164262401, -0.525935282564036,
819 -0.794055881698366, 0.319991164262401, 0.319991164262401, -0.794055881698366,
820 -0.794055881698366, -0.525935282564036, -0.525935282564036, -0.794055881698366,
821 -0.368673747852155, 0.056982821883363, 0.056982821883363, -0.368673747852155,
822 -0.688309074031208, 0.056982821883363, 0.056982821883363, -0.688309074031208,
823 -0.688309074031208, -0.368673747852155, -0.368673747852155, -0.688309074031208}};
824 static const std::array<double, 106> cub2D_23_weights_data = {
825 {0.049993627092845, 0.008227775544650, 0.008227775544650, 0.008227775544650, 0.037662477311797,
826 0.037662477311797, 0.037662477311797, 0.046916667243031, 0.046916667243031, 0.046916667243031,
827 0.047191879210718, 0.047191879210718, 0.047191879210718, 0.039689081561875, 0.039689081561875,
828 0.039689081561875, 0.029223692430473, 0.029223692430473, 0.029223692430473, 0.018566057479642,
829 0.018566057479642, 0.018566057479642, 0.008784960019827, 0.008784960019827, 0.008784960019827,
830 0.002061552741126, 0.002061552741126, 0.002061552741126, 0.004448377162851, 0.004448377162851,
831 0.004448377162851, 0.004448377162851, 0.004448377162851, 0.004448377162851, 0.002318973002522,
832 0.002318973002522, 0.002318973002522, 0.002318973002522, 0.002318973002522, 0.002318973002522,
833 0.005127488569570, 0.005127488569570, 0.005127488569570, 0.005127488569570, 0.005127488569570,
834 0.005127488569570, 0.004167853762943, 0.004167853762943, 0.004167853762943, 0.004167853762943,
835 0.004167853762943, 0.004167853762943, 0.010245094978581, 0.010245094978581, 0.010245094978581,
836 0.010245094978581, 0.010245094978581, 0.010245094978581, 0.012823590639281, 0.012823590639281,
837 0.012823590639281, 0.012823590639281, 0.012823590639281, 0.012823590639281, 0.011635516794817,
838 0.011635516794817, 0.011635516794817, 0.011635516794817, 0.011635516794817, 0.011635516794817,
839 0.019844273900077, 0.019844273900077, 0.019844273900077, 0.019844273900077, 0.019844273900077,
840 0.019844273900077, 0.011754407449188, 0.011754407449188, 0.011754407449188, 0.011754407449188,
841 0.011754407449188, 0.011754407449188, 0.021600208906600, 0.021600208906600, 0.021600208906600,
842 0.021600208906600, 0.021600208906600, 0.021600208906600, 0.028495796363599, 0.028495796363599,
843 0.028495796363599, 0.028495796363599, 0.028495796363599, 0.028495796363599, 0.031988381018369,
844 0.031988381018369, 0.031988381018369, 0.031988381018369, 0.031988381018369, 0.031988381018369,
845 0.041389027831224, 0.041389027831224, 0.041389027831224, 0.041389027831224, 0.041389027831224,
846 0.041389027831224}};
847
848 // For cub2D_24: 118 points (118*3 = 354 elements)
849 static const std::array<double, 118 * 2> cub2D_24_nodes_data = {
850 {-0.333333333333333, -0.333333333333333, -0.031382760283421, -0.031382760283421,
851 -0.937234479433159, -0.031382760283421, -0.031382760283421, -0.937234479433159,
852 -0.120096233850662, -0.120096233850662, -0.759807532298676, -0.120096233850662,
853 -0.120096233850662, -0.759807532298676, -0.217343938317536, -0.217343938317536,
854 -0.565312123364928, -0.217343938317536, -0.217343938317536, -0.565312123364928,
855 -0.429818284439074, -0.429818284439074, -0.140363431121852, -0.429818284439074,
856 -0.429818284439074, -0.140363431121852, -0.522392801883300, -0.522392801883300,
857 0.044785603766601, -0.522392801883300, -0.522392801883300, 0.044785603766601,
858 -0.704274510649686, -0.704274510649686, 0.408549021299373, -0.704274510649686,
859 -0.704274510649686, 0.408549021299373, -0.843105586121546, -0.843105586121546,
860 0.686211172243092, -0.843105586121546, -0.843105586121546, 0.686211172243092,
861 -0.936285318267427, -0.936285318267427, 0.872570636534854, -0.936285318267427,
862 -0.936285318267427, 0.872570636534854, -0.983008712604130, -0.983008712604130,
863 0.966017425208259, -0.983008712604130, -0.983008712604130, 0.966017425208259,
864 -0.133936561710478, 0.120327965916980, 0.120327965916980, -0.133936561710478,
865 -0.986391404206501, 0.120327965916980, 0.120327965916980, -0.986391404206501,
866 -0.986391404206501, -0.133936561710478, -0.133936561710478, -0.986391404206501,
867 -0.589559941056661, 0.574991625876557, 0.574991625876557, -0.589559941056661,
868 -0.985431684819897, 0.574991625876557, 0.574991625876557, -0.985431684819897,
869 -0.985431684819897, -0.589559941056661, -0.589559941056661, -0.985431684819897,
870 -0.375079684130172, 0.361371712031196, 0.361371712031196, -0.375079684130172,
871 -0.986292027901024, 0.361371712031196, 0.361371712031196, -0.986292027901024,
872 -0.986292027901024, -0.375079684130172, -0.375079684130172, -0.986292027901024,
873 -0.906832105591067, 0.897244066241012, 0.897244066241012, -0.906832105591067,
874 -0.990411960649945, 0.897244066241012, 0.897244066241012, -0.990411960649945,
875 -0.990411960649945, -0.906832105591067, -0.906832105591067, -0.990411960649945,
876 -0.768281564078976, 0.757477531703546, 0.757477531703546, -0.768281564078976,
877 -0.989195967624570, 0.757477531703546, 0.757477531703546, -0.989195967624570,
878 -0.989195967624570, -0.768281564078975, -0.768281564078975, -0.989195967624570,
879 -0.498678726055310, 0.424585822926150, 0.424585822926150, -0.498678726055310,
880 -0.925907096870839, 0.424585822926150, 0.424585822926150, -0.925907096870839,
881 -0.925907096870839, -0.498678726055310, -0.498678726055310, -0.925907096870839,
882 -0.279607664483490, 0.208396882316209, 0.208396882316209, -0.279607664483490,
883 -0.928789217832719, 0.208396882316209, 0.208396882316209, -0.928789217832719,
884 -0.928789217832719, -0.279607664483490, -0.279607664483490, -0.928789217832719,
885 -0.837737372642508, 0.780926628976898, 0.780926628976898, -0.837737372642508,
886 -0.943189256334389, 0.780926628976898, 0.780926628976898, -0.943189256334389,
887 -0.943189256334389, -0.837737372642508, -0.837737372642508, -0.943189256334389,
888 -0.693711793201882, 0.625024627714433, 0.625024627714433, -0.693711793201882,
889 -0.931312834512551, 0.625024627714433, 0.625024627714433, -0.931312834512551,
890 -0.931312834512551, -0.693711793201882, -0.693711793201882, -0.931312834512551,
891 0.004700993829951, -0.135567929734853, -0.135567929734853, 0.004700993829951,
892 -0.869133064095098, -0.135567929734853, -0.135567929734853, -0.869133064095098,
893 -0.869133064095098, 0.004700993829951, 0.004700993829951, -0.869133064095098,
894 -0.521976982650353, 0.349105045944945, 0.349105045944945, -0.521976982650353,
895 -0.827128063294591, 0.349105045944945, 0.349105045944945, -0.827128063294591,
896 -0.827128063294591, -0.521976982650353, -0.521976982650353, -0.827128063294591,
897 -0.326968721136217, 0.144732602043697, 0.144732602043697, -0.326968721136217,
898 -0.817763880907480, 0.144732602043697, 0.144732602043697, -0.817763880907480,
899 -0.817763880907480, -0.326968721136217, -0.326968721136217, -0.817763880907480,
900 -0.696116803866709, 0.531011336134871, 0.531011336134871, -0.696116803866709,
901 -0.834894532268162, 0.531011336134871, 0.531011336134871, -0.834894532268162,
902 -0.834894532268162, -0.696116803866709, -0.696116803866709, -0.834894532268162,
903 -0.536404917748559, 0.226734558438523, 0.226734558438523, -0.536404917748559,
904 -0.690329640689964, 0.226734558438523, 0.226734558438523, -0.690329640689964,
905 -0.690329640689964, -0.536404917748559, -0.536404917748559, -0.690329640689964,
906 -0.344489563789357, 0.009282127094255, 0.009282127094255, -0.344489563789357,
907 -0.664792563304898, 0.009282127094255, 0.009282127094255, -0.664792563304898,
908 -0.664792563304898, -0.344489563789357, -0.344489563789357, -0.664792563304898}};
909 static const std::array<double, 118> cub2D_24_weights_data = {
910 {0.031330242175782, 0.014717653847587, 0.014717653847587, 0.014717653847587, 0.030963348398970,
911 0.030963348398970, 0.030963348398970, 0.037986940843648, 0.037986940843648, 0.037986940843648,
912 0.033466254011049, 0.033466254011049, 0.033466254011049, 0.029203686754054, 0.029203686754054,
913 0.029203686754054, 0.022147482605586, 0.022147482605586, 0.022147482605586, 0.015827753677335,
914 0.015827753677335, 0.015827753677335, 0.005897827695084, 0.005897827695084, 0.005897827695084,
915 0.001905131297570, 0.001905131297570, 0.001905131297570, 0.008627443386199, 0.008627443386199,
916 0.008627443386199, 0.008627443386199, 0.008627443386199, 0.008627443386199, 0.007292016855628,
917 0.007292016855628, 0.007292016855628, 0.007292016855628, 0.007292016855628, 0.007292016855628,
918 0.008117703702749, 0.008117703702749, 0.008117703702749, 0.008117703702749, 0.008117703702749,
919 0.008117703702749, 0.002858359515171, 0.002858359515171, 0.002858359515171, 0.002858359515171,
920 0.002858359515171, 0.002858359515171, 0.004596788633153, 0.004596788633153, 0.004596788633153,
921 0.004596788633153, 0.004596788633153, 0.004596788633153, 0.017097477649229, 0.017097477649229,
922 0.017097477649229, 0.017097477649229, 0.017097477649229, 0.017097477649229, 0.018575372163249,
923 0.018575372163249, 0.018575372163249, 0.018575372163249, 0.018575372163249, 0.018575372163249,
924 0.008711688567270, 0.008711688567270, 0.008711688567270, 0.008711688567270, 0.008711688567270,
925 0.008711688567270, 0.013292883787775, 0.013292883787775, 0.013292883787775, 0.013292883787775,
926 0.013292883787775, 0.013292883787775, 0.012281001510740, 0.012281001510740, 0.012281001510740,
927 0.012281001510740, 0.012281001510740, 0.012281001510740, 0.021820885555420, 0.021820885555420,
928 0.021820885555420, 0.021820885555420, 0.021820885555420, 0.021820885555420, 0.027371090249668,
929 0.027371090249668, 0.027371090249668, 0.027371090249668, 0.027371090249668, 0.027371090249668,
930 0.018737543889147, 0.018737543889147, 0.018737543889147, 0.018737543889147, 0.018737543889147,
931 0.018737543889147, 0.028700757241388, 0.028700757241388, 0.028700757241388, 0.028700757241388,
932 0.028700757241388, 0.028700757241388, 0.033972574031807, 0.033972574031807, 0.033972574031807,
933 0.033972574031807, 0.033972574031807, 0.033972574031807}};
934
935 // For cub2D_25: 126 points (126*3 = 378 elements)
936 static const std::array<double, 126 * 2> cub2D_25_nodes_data = {
937 {-0.027946483073174, -0.027946483073174, -0.944107033853652, -0.027946483073174,
938 -0.027946483073174, -0.944107033853652, -0.131178601327651, -0.131178601327651,
939 -0.737642797344697, -0.131178601327651, -0.131178601327651, -0.737642797344697,
940 -0.220221729512072, -0.220221729512072, -0.559556540975855, -0.220221729512072,
941 -0.220221729512072, -0.559556540975855, -0.403113531960391, -0.403113531960391,
942 -0.193772936079218, -0.403113531960391, -0.403113531960391, -0.193772936079218,
943 -0.531911655325256, -0.531911655325256, 0.063823310650513, -0.531911655325256,
944 -0.531911655325256, 0.063823310650513, -0.697063330781965, -0.697063330781965,
945 0.394126661563930, -0.697063330781965, -0.697063330781965, 0.394126661563930,
946 -0.774532212908013, -0.774532212908013, 0.549064425816026, -0.774532212908013,
947 -0.774532212908013, 0.549064425816026, -0.844568615816947, -0.844568615816947,
948 0.689137231633895, -0.844568615816948, -0.844568615816948, 0.689137231633895,
949 -0.930213812771406, -0.930213812771406, 0.860427625542812, -0.930213812771406,
950 -0.930213812771406, 0.860427625542812, -0.985483630758135, -0.985483630758135,
951 0.970967261516271, -0.985483630758135, -0.985483630758135, 0.970967261516271,
952 -0.545571095693272, 0.542986390284387, 0.542986390284387, -0.545571095693272,
953 -0.997415294591116, 0.542986390284387, 0.542986390284387, -0.997415294591116,
954 -0.997415294591116, -0.545571095693272, -0.545571095693272, -0.997415294591116,
955 -0.129978890292857, 0.119179487748624, 0.119179487748624, -0.129978890292857,
956 -0.989200597455768, 0.119179487748624, 0.119179487748624, -0.989200597455768,
957 -0.989200597455768, -0.129978890292857, -0.129978890292857, -0.989200597455768,
958 -0.359380801455591, 0.346612795387641, 0.346612795387641, -0.359380801455591,
959 -0.987231993932050, 0.346612795387641, 0.346612795387641, -0.987231993932050,
960 -0.987231993932050, -0.359380801455591, -0.359380801455591, -0.987231993932050,
961 -0.816499355439990, 0.806442932436004, 0.806442932436004, -0.816499355439990,
962 -0.989943576996014, 0.806442932436004, 0.806442932436004, -0.989943576996014,
963 -0.989943576996014, -0.816499355439990, -0.816499355439990, -0.989943576996014,
964 -0.923978328282551, 0.910324811038988, 0.910324811038988, -0.923978328282551,
965 -0.986346482756436, 0.910324811038988, 0.910324811038988, -0.986346482756436,
966 -0.986346482756436, -0.923978328282551, -0.923978328282551, -0.986346482756436,
967 -0.685149563029377, 0.665117163749518, 0.665117163749518, -0.685149563029377,
968 -0.979967600720141, 0.665117163749517, 0.665117163749517, -0.979967600720141,
969 -0.979967600720141, -0.685149563029376, -0.685149563029376, -0.979967600720141,
970 -0.520220680442934, 0.468705054096154, 0.468705054096154, -0.520220680442934,
971 -0.948484373653220, 0.468705054096154, 0.468705054096154, -0.948484373653220,
972 -0.948484373653220, -0.520220680442934, -0.520220680442934, -0.948484373653220,
973 -0.276113763747879, 0.215657967508047, 0.215657967508047, -0.276113763747879,
974 -0.939544203760168, 0.215657967508047, 0.215657967508047, -0.939544203760168,
975 -0.939544203760168, -0.276113763747879, -0.276113763747879, -0.939544203760168,
976 -0.832896078090343, 0.771886097876019, 0.771886097876019, -0.832896078090343,
977 -0.938990019785676, 0.771886097876019, 0.771886097876019, -0.938990019785676,
978 -0.938990019785676, -0.832896078090343, -0.832896078090343, -0.938990019785676,
979 -0.703113558535164, 0.611200463810025, 0.611200463810025, -0.703113558535164,
980 -0.908086905274861, 0.611200463810025, 0.611200463810025, -0.908086905274861,
981 -0.908086905274861, -0.703113558535164, -0.703113558535164, -0.908086905274861,
982 -0.432520582544930, 0.297634981464375, 0.297634981464375, -0.432520582544930,
983 -0.865114398919445, 0.297634981464375, 0.297634981464375, -0.865114398919445,
984 -0.865114398919445, -0.432520582544930, -0.432520582544930, -0.865114398919445,
985 -0.186201249762425, 0.046111066930604, 0.046111066930604, -0.186201249762425,
986 -0.859909817168179, 0.046111066930604, 0.046111066930604, -0.859909817168179,
987 -0.859909817168179, -0.186201249762425, -0.186201249762425, -0.859909817168179,
988 -0.611772025950215, 0.443948976669982, 0.443948976669982, -0.611772025950215,
989 -0.832176950719767, 0.443948976669982, 0.443948976669982, -0.832176950719767,
990 -0.832176950719767, -0.611772025950215, -0.611772025950215, -0.832176950719767,
991 -0.351731305998594, 0.110980234644288, 0.110980234644288, -0.351731305998594,
992 -0.759248928645695, 0.110980234644288, 0.110980234644288, -0.759248928645695,
993 -0.759248928645695, -0.351731305998594, -0.351731305998594, -0.759248928645695,
994 -0.541445032888038, 0.245311234573305, 0.245311234573305, -0.541445032888038,
995 -0.703866201685267, 0.245311234573305, 0.245311234573305, -0.703866201685267,
996 -0.703866201685267, -0.541445032888038, -0.541445032888038, -0.703866201685267,
997 -0.348763754808032, -0.034779976926618, -0.034779976926618, -0.348763754808032,
998 -0.616456268265350, -0.034779976926618, -0.034779976926618, -0.616456268265350,
999 -0.616456268265350, -0.348763754808032, -0.348763754808032, -0.616456268265350}};
1000 static const std::array<double, 126> cub2D_25_weights_data = {
1001 {0.016011163760041, 0.016011163760041, 0.016011163760041, 0.031894153664781, 0.031894153664781,
1002 0.031894153664781, 0.026218282461591, 0.026218282461591, 0.026218282461591, 0.039166001931271,
1003 0.039166001931271, 0.039166001931271, 0.032941770883075, 0.032941770883075, 0.032941770883075,
1004 0.017094558148184, 0.017094558148184, 0.017094558148184, 0.016323771714453, 0.016323771714453,
1005 0.016323771714453, 0.012242293079968, 0.012242293079968, 0.012242293079968, 0.005816996529873,
1006 0.005816996529873, 0.005816996529873, 0.001384550491324, 0.001384550491324, 0.001384550491324,
1007 0.002496578398555, 0.002496578398555, 0.002496578398555, 0.002496578398555, 0.002496578398555,
1008 0.002496578398555, 0.006809505817606, 0.006809505817606, 0.006809505817606, 0.006809505817606,
1009 0.006809505817606, 0.006809505817606, 0.006719308652128, 0.006719308652128, 0.006719308652128,
1010 0.006719308652128, 0.006719308652128, 0.006719308652128, 0.003432313078994, 0.003432313078994,
1011 0.003432313078994, 0.003432313078994, 0.003432313078994, 0.003432313078994, 0.002961712633431,
1012 0.002961712633431, 0.002961712633431, 0.002961712633431, 0.002961712633431, 0.002961712633431,
1013 0.007022625221457, 0.007022625221457, 0.007022625221457, 0.007022625221457, 0.007022625221457,
1014 0.007022625221457, 0.014787100299413, 0.014787100299413, 0.014787100299413, 0.014787100299413,
1015 0.014787100299413, 0.014787100299413, 0.015966174954753, 0.015966174954753, 0.015966174954753,
1016 0.015966174954753, 0.015966174954753, 0.015966174954753, 0.008711925226316, 0.008711925226316,
1017 0.008711925226316, 0.008711925226316, 0.008711925226316, 0.008711925226316, 0.014730113402836,
1018 0.014730113402836, 0.014730113402836, 0.014730113402836, 0.014730113402836, 0.014730113402836,
1019 0.021927145692839, 0.021927145692839, 0.021927145692839, 0.021927145692839, 0.021927145692839,
1020 0.021927145692839, 0.023499923487082, 0.023499923487082, 0.023499923487082, 0.023499923487082,
1021 0.023499923487082, 0.023499923487082, 0.020031201427597, 0.020031201427597, 0.020031201427597,
1022 0.020031201427597, 0.020031201427597, 0.020031201427597, 0.026619281575257, 0.026619281575257,
1023 0.026619281575257, 0.026619281575257, 0.026619281575257, 0.026619281575257, 0.028308893010452,
1024 0.028308893010452, 0.028308893010452, 0.028308893010452, 0.028308893010452, 0.028308893010452,
1025 0.029762759122336, 0.029762759122336, 0.029762759122336, 0.029762759122336, 0.029762759122336,
1026 0.029762759122336}};
1027
1028 // For cub2D_26: 138 points (138*3 = 414 elements)
1029 static const std::array<double, 138 * 2> cub2D_26_nodes_data = {
1030 {-0.027285103318006, -0.027285103318006, -0.945429793363989, -0.027285103318006,
1031 -0.027285103318006, -0.945429793363989, -0.068629018183452, -0.068629018183452,
1032 -0.862741963633096, -0.068629018183452, -0.068629018183452, -0.862741963633096,
1033 -0.136174624247252, -0.136174624247252, -0.727650751505495, -0.136174624247252,
1034 -0.136174624247252, -0.727650751505495, -0.214440393597162, -0.214440393597162,
1035 -0.571119212805675, -0.214440393597162, -0.214440393597162, -0.571119212805675,
1036 -0.392927303733924, -0.392927303733924, -0.214145392532152, -0.392927303733924,
1037 -0.392927303733924, -0.214145392532152, -0.541283541373341, -0.541283541373341,
1038 0.082567082746682, -0.541283541373341, -0.541283541373341, 0.082567082746682,
1039 -0.710171670270578, -0.710171670270578, 0.420343340541156, -0.710171670270578,
1040 -0.710171670270578, 0.420343340541156, -0.832251071789951, -0.832251071789951,
1041 0.664502143579902, -0.832251071789951, -0.832251071789951, 0.664502143579902,
1042 -0.931928355163542, -0.931928355163542, 0.863856710327084, -0.931928355163542,
1043 -0.931928355163542, 0.863856710327084, -0.987078078630829, -0.987078078630829,
1044 0.974156157261657, -0.987078078630829, -0.987078078630829, 0.974156157261657,
1045 -0.932113855389598, 0.919072286067742, 0.919072286067742, -0.932113855389598,
1046 -0.986958430678145, 0.919072286067742, 0.919072286067742, -0.986958430678145,
1047 -0.986958430678145, -0.932113855389597, -0.932113855389597, -0.986958430678145,
1048 -0.331832115907669, 0.318412220533634, 0.318412220533634, -0.331832115907669,
1049 -0.986580104625965, 0.318412220533634, 0.318412220533634, -0.986580104625965,
1050 -0.986580104625965, -0.331832115907669, -0.331832115907669, -0.986580104625965,
1051 -0.117284648816543, 0.105635324925259, 0.105635324925259, -0.117284648816543,
1052 -0.988350676108717, 0.105635324925259, 0.105635324925259, -0.988350676108717,
1053 -0.988350676108717, -0.117284648816543, -0.117284648816543, -0.988350676108717,
1054 -0.528179583523521, 0.515363521190658, 0.515363521190658, -0.528179583523521,
1055 -0.987183937667137, 0.515363521190658, 0.515363521190658, -0.987183937667137,
1056 -0.987183937667137, -0.528179583523521, -0.528179583523521, -0.987183937667137,
1057 -0.698183069548291, 0.685666877859863, 0.685666877859863, -0.698183069548291,
1058 -0.987483808311572, 0.685666877859863, 0.685666877859863, -0.987483808311572,
1059 -0.987483808311572, -0.698183069548291, -0.698183069548291, -0.987483808311572,
1060 -0.834663613179069, 0.821127985248516, 0.821127985248516, -0.834663613179069,
1061 -0.986464372069447, 0.821127985248516, 0.821127985248516, -0.986464372069447,
1062 -0.986464372069447, -0.834663613179069, -0.834663613179069, -0.986464372069447,
1063 -0.700166221086294, 0.634916644768372, 0.634916644768372, -0.700166221086294,
1064 -0.934750423682077, 0.634916644768372, 0.634916644768372, -0.934750423682077,
1065 -0.934750423682078, -0.700166221086294, -0.700166221086294, -0.934750423682078,
1066 -0.160245113591115, 0.096801406370527, 0.096801406370527, -0.160245113591115,
1067 -0.936556292779412, 0.096801406370527, 0.096801406370527, -0.936556292779412,
1068 -0.936556292779412, -0.160245113591115, -0.160245113591115, -0.936556292779412,
1069 -0.348814552390868, 0.279444440434072, 0.279444440434072, -0.348814552390868,
1070 -0.930629888043204, 0.279444440434072, 0.279444440434072, -0.930629888043204,
1071 -0.930629888043204, -0.348814552390868, -0.348814552390868, -0.930629888043204,
1072 -0.835149343614232, 0.764834325997890, 0.764834325997890, -0.835149343614232,
1073 -0.929684982383659, 0.764834325997890, 0.764834325997890, -0.929684982383659,
1074 -0.929684982383659, -0.835149343614232, -0.835149343614232, -0.929684982383659,
1075 -0.534046892746188, 0.466663082505331, 0.466663082505331, -0.534046892746188,
1076 -0.932616189759143, 0.466663082505331, 0.466663082505331, -0.932616189759143,
1077 -0.932616189759143, -0.534046892746188, -0.534046892746188, -0.932616189759143,
1078 -0.704373154566392, 0.546726033293271, 0.546726033293271, -0.704373154566392,
1079 -0.842352878726879, 0.546726033293271, 0.546726033293271, -0.842352878726879,
1080 -0.842352878726879, -0.704373154566392, -0.704373154566392, -0.842352878726879,
1081 -0.220224863280788, 0.060870104244893, 0.060870104244893, -0.220224863280788,
1082 -0.840645240964104, 0.060870104244893, 0.060870104244893, -0.840645240964104,
1083 -0.840645240964104, -0.220224863280788, -0.220224863280788, -0.840645240964104,
1084 -0.394989254221112, 0.230609434358343, 0.230609434358343, -0.394989254221112,
1085 -0.835620180137232, 0.230609434358343, 0.230609434358343, -0.835620180137232,
1086 -0.835620180137232, -0.394989254221112, -0.394989254221112, -0.835620180137232,
1087 -0.557563751773578, 0.393274056332418, 0.393274056332418, -0.557563751773578,
1088 -0.835710304558840, 0.393274056332418, 0.393274056332418, -0.835710304558840,
1089 -0.835710304558840, -0.557563751773578, -0.557563751773578, -0.835710304558840,
1090 -0.350522450436603, 0.060630141977535, 0.060630141977535, -0.350522450436603,
1091 -0.710107691540932, 0.060630141977535, 0.060630141977535, -0.710107691540932,
1092 -0.710107691540932, -0.350522450436603, -0.350522450436603, -0.710107691540932,
1093 -0.544246685468649, 0.246315777233803, 0.246315777233803, -0.544246685468649,
1094 -0.702069091765154, 0.246315777233803, 0.246315777233803, -0.702069091765154,
1095 -0.702069091765154, -0.544246685468649, -0.544246685468649, -0.702069091765154,
1096 -0.373996265063702, -0.064072130507071, -0.064072130507071, -0.373996265063702,
1097 -0.561931604429227, -0.064072130507071, -0.064072130507071, -0.561931604429227,
1098 -0.561931604429227, -0.373996265063702, -0.373996265063702, -0.561931604429227}};
1099 static const std::array<double, 138> cub2D_26_weights_data = {
1100 {0.005361616431413, 0.005361616431413, 0.005361616431413, 0.012732191427031, 0.012732191427031,
1101 0.012732191427031, 0.029707048808635, 0.029707048808635, 0.029707048808635, 0.026709487358142,
1102 0.026709487358142, 0.026709487358142, 0.031691197689589, 0.031691197689589, 0.031691197689589,
1103 0.028281596577704, 0.028281596577704, 0.028281596577704, 0.022460561269283, 0.022460561269283,
1104 0.022460561269283, 0.013160382318625, 0.013160382318625, 0.013160382318625, 0.005828465225510,
1105 0.005828465225510, 0.005828465225510, 0.001098762787251, 0.001098762787251, 0.001098762787251,
1106 0.002557622023150, 0.002557622023150, 0.002557622023150, 0.002557622023150, 0.002557622023150,
1107 0.002557622023150, 0.007088900226242, 0.007088900226242, 0.007088900226242, 0.007088900226242,
1108 0.007088900226242, 0.007088900226242, 0.006588000446609, 0.006588000446609, 0.006588000446609,
1109 0.006588000446609, 0.006588000446609, 0.006588000446609, 0.006069708653929, 0.006069708653929,
1110 0.006069708653929, 0.006069708653929, 0.006069708653929, 0.006069708653929, 0.004942128706706,
1111 0.004942128706706, 0.004942128706706, 0.004942128706706, 0.004942128706706, 0.004942128706706,
1112 0.004076340070443, 0.004076340070443, 0.004076340070443, 0.004076340070443, 0.004076340070443,
1113 0.004076340070443, 0.011120280239045, 0.011120280239045, 0.011120280239045, 0.011120280239045,
1114 0.011120280239045, 0.011120280239045, 0.012755358640694, 0.012755358640694, 0.012755358640694,
1115 0.012755358640694, 0.012755358640694, 0.012755358640694, 0.014549157045387, 0.014549157045387,
1116 0.014549157045387, 0.014549157045387, 0.014549157045387, 0.014549157045387, 0.009121880355576,
1117 0.009121880355576, 0.009121880355576, 0.009121880355576, 0.009121880355576, 0.009121880355576,
1118 0.013582808914065, 0.013582808914065, 0.013582808914065, 0.013582808914065, 0.013582808914065,
1119 0.013582808914065, 0.015585248954434, 0.015585248954434, 0.015585248954434, 0.015585248954434,
1120 0.015585248954434, 0.015585248954434, 0.018960151369388, 0.018960151369388, 0.018960151369388,
1121 0.018960151369388, 0.018960151369388, 0.018960151369388, 0.019206200353033, 0.019206200353033,
1122 0.019206200353033, 0.019206200353033, 0.019206200353033, 0.019206200353033, 0.018121839059318,
1123 0.018121839059318, 0.018121839059318, 0.018121839059318, 0.018121839059318, 0.018121839059318,
1124 0.028403705951863, 0.028403705951863, 0.028403705951863, 0.028403705951863, 0.028403705951863,
1125 0.028403705951863, 0.026986162760930, 0.026986162760930, 0.026986162760930, 0.026986162760930,
1126 0.026986162760930, 0.026986162760930, 0.025102184615930, 0.025102184615930, 0.025102184615930,
1127 0.025102184615930, 0.025102184615930, 0.025102184615930}};
1128
1129 // For cub2D_27: 145 points (145*3 = 435 elements)
1130 static const std::array<double, 145 * 2> cub2D_27_nodes_data = {
1131 {-0.333333333333333, -0.333333333333333, -0.029244446609137, -0.029244446609137,
1132 -0.941511106781726, -0.029244446609137, -0.029244446609137, -0.941511106781726,
1133 -0.132843721814340, -0.132843721814340, -0.734312556371321, -0.132843721814340,
1134 -0.132843721814340, -0.734312556371321, -0.224940014502969, -0.224940014502969,
1135 -0.550119970994063, -0.224940014502969, -0.224940014502969, -0.550119970994063,
1136 -0.427786783949924, -0.427786783949924, -0.144426432100151, -0.427786783949924,
1137 -0.427786783949924, -0.144426432100151, -0.532776206162091, -0.532776206162091,
1138 0.065552412324182, -0.532776206162091, -0.532776206162091, 0.065552412324182,
1139 -0.690368113175391, -0.690368113175391, 0.380736226350782, -0.690368113175391,
1140 -0.690368113175391, 0.380736226350782, -0.781499070170348, -0.781499070170348,
1141 0.562998140340695, -0.781499070170348, -0.781499070170348, 0.562998140340695,
1142 -0.862704525220276, -0.862704525220276, 0.725409050440551, -0.862704525220276,
1143 -0.862704525220276, 0.725409050440551, -0.932961091535336, -0.932961091535336,
1144 0.865922183070671, -0.932961091535336, -0.932961091535336, 0.865922183070671,
1145 -0.986811381964774, -0.986811381964774, 0.973622763929549, -0.986811381964774,
1146 -0.986811381964774, 0.973622763929549, -0.717055503863097, 0.716419063026126,
1147 0.716419063026126, -0.717055503863097, -0.999363559163030, 0.716419063026126,
1148 0.716419063026126, -0.999363559163030, -0.999363559163030, -0.717055503863097,
1149 -0.717055503863097, -0.999363559163030, -0.838822221132805, 0.827544031058903,
1150 0.827544031058903, -0.838822221132805, -0.988721809926098, 0.827544031058903,
1151 0.827544031058903, -0.988721809926098, -0.988721809926098, -0.838822221132805,
1152 -0.838822221132805, -0.988721809926098, -0.537630806497654, 0.526128943172145,
1153 0.526128943172145, -0.537630806497654, -0.988498136674491, 0.526128943172145,
1154 0.526128943172145, -0.988498136674491, -0.988498136674491, -0.537630806497654,
1155 -0.537630806497654, -0.988498136674491, -0.113842988120976, 0.103273580134309,
1156 0.103273580134309, -0.113842988120976, -0.989430592013333, 0.103273580134310,
1157 0.103273580134310, -0.989430592013333, -0.989430592013333, -0.113842988120976,
1158 -0.113842988120976, -0.989430592013333, -0.330849908839651, 0.320515152715889,
1159 0.320515152715889, -0.330849908839651, -0.989665243876238, 0.320515152715889,
1160 0.320515152715889, -0.989665243876238, -0.989665243876238, -0.330849908839651,
1161 -0.330849908839651, -0.989665243876238, -0.931869179489789, 0.919222453867072,
1162 0.919222453867072, -0.931869179489789, -0.987353274377283, 0.919222453867072,
1163 0.919222453867072, -0.987353274377283, -0.987353274377283, -0.931869179489789,
1164 -0.931869179489789, -0.987353274377283, -0.695123977280935, 0.663705924287710,
1165 0.663705924287710, -0.695123977280935, -0.968581947006775, 0.663705924287710,
1166 0.663705924287710, -0.968581947006775, -0.968581947006775, -0.695123977280935,
1167 -0.695123977280935, -0.968581947006775, -0.831869809255826, 0.777736654895860,
1168 0.777736654895860, -0.831869809255826, -0.945866845640035, 0.777736654895860,
1169 0.777736654895860, -0.945866845640035, -0.945866845640035, -0.831869809255826,
1170 -0.831869809255826, -0.945866845640035, -0.423211420319719, 0.374995160760160,
1171 0.374995160760160, -0.423211420319719, -0.951783740440441, 0.374995160760160,
1172 0.374995160760160, -0.951783740440441, -0.951783740440441, -0.423211420319719,
1173 -0.423211420319719, -0.951783740440441, -0.223962554104902, 0.171509638849087,
1174 0.171509638849087, -0.223962554104902, -0.947547084744185, 0.171509638849087,
1175 0.171509638849087, -0.947547084744185, -0.947547084744185, -0.223962554104902,
1176 -0.223962554104902, -0.947547084744185, -0.566926820194262, 0.490923426439871,
1177 0.490923426439871, -0.566926820194262, -0.923996606245609, 0.490923426439871,
1178 0.490923426439871, -0.923996606245609, -0.923996606245609, -0.566926820194262,
1179 -0.566926820194262, -0.923996606245609, -0.350787336349322, 0.245677528944182,
1180 0.245677528944182, -0.350787336349322, -0.894890192594860, 0.245677528944182,
1181 0.245677528944182, -0.894890192594860, -0.894890192594860, -0.350787336349322,
1182 -0.350787336349322, -0.894890192594860, -0.729613610936203, 0.622255871516285,
1183 0.622255871516285, -0.729613610936203, -0.892642260580081, 0.622255871516285,
1184 0.622255871516285, -0.892642260580081, -0.892642260580081, -0.729613610936203,
1185 -0.729613610936203, -0.892642260580081, -0.176209680235251, 0.035410146457445,
1186 0.035410146457445, -0.176209680235251, -0.859200466222194, 0.035410146457445,
1187 0.035410146457445, -0.859200466222194, -0.859200466222194, -0.176209680235251,
1188 -0.176209680235251, -0.859200466222194, -0.469171656648510, 0.304686011244002,
1189 0.304686011244002, -0.469171656648510, -0.835514354595492, 0.304686011244002,
1190 0.304686011244002, -0.835514354595492, -0.835514354595492, -0.469171656648510,
1191 -0.469171656648510, -0.835514354595492, -0.623736093891471, 0.443479545725970,
1192 0.443479545725970, -0.623736093891471, -0.819743451834499, 0.443479545725970,
1193 0.443479545725970, -0.819743451834499, -0.819743451834499, -0.623736093891471,
1194 -0.623736093891471, -0.819743451834499, -0.336632062394500, 0.104847567508036,
1195 0.104847567508036, -0.336632062394500, -0.768215505113536, 0.104847567508036,
1196 0.104847567508036, -0.768215505113536, -0.768215505113536, -0.336632062394500,
1197 -0.336632062394500, -0.768215505113536, -0.530404689974552, 0.224195004863778,
1198 0.224195004863778, -0.530404689974552, -0.693790314889227, 0.224195004863778,
1199 0.224195004863778, -0.693790314889227, -0.693790314889227, -0.530404689974552,
1200 -0.530404689974552, -0.693790314889227, -0.350831684137242, -0.019508133770036,
1201 -0.019508133770036, -0.350831684137242, -0.629660182092722, -0.019508133770036,
1202 -0.019508133770036, -0.629660182092722, -0.629660182092722, -0.350831684137242,
1203 -0.350831684137242, -0.629660182092722}};
1204 static const std::array<double, 145> cub2D_27_weights_data = {
1205 {0.029215421142604, 0.013615273717612, 0.013615273717612, 0.013615273717612,
1206 0.030951102870660, 0.030951102870660, 0.030951102870660, 0.031733186724762,
1207 0.031733186724762, 0.031733186724762, 0.031559855928489, 0.031559855928489,
1208 0.031559855928489, 0.027863700370354, 0.027863700370354, 0.027863700370354,
1209 0.019750305737275, 0.019750305737275, 0.019750305737275, 0.015635498945203,
1210 0.015635498945203, 0.015635498945203, 0.010432865446986, 0.010432865446986,
1211 0.010432865446986, 0.005852724472600, 0.005852724472600, 0.005852724472600,
1212 0.001134879007165, 0.001134879007165, 0.001134879007165, 0.001375795459783,
1213 0.001375795459783, 0.001375795459783, 0.001375795459783, 0.001375795459783,
1214 0.001375795459783, 0.003088879415937, 0.003088879415937, 0.003088879415937,
1215 0.003088879415937, 0.003088879415937, 0.003088879415937, 0.005625149324346,
1216 0.005625149324346, 0.005625149324346, 0.005625149324346, 0.005625149324346,
1217 0.005625149324346, 0.005913105372899, 0.005913105372899, 0.005913105372899,
1218 0.005913105372899, 0.005913105372899, 0.005913105372899, 0.005565783438844,
1219 0.005565783438844, 0.005565783438844, 0.005565783438844, 0.005565783438844,
1220 0.005565783438844, 0.002449540456172, 0.002449540456172, 0.002449540456172,
1221 0.002449540456172, 0.002449540456172, 0.002449540456172, 0.007906643758942,
1222 0.007906643758942, 0.007906643758942, 0.007906643758942, 0.007906643758942,
1223 0.007906643758942, 0.007221969465327, 0.007221969465327, 0.007221969465327,
1224 0.007221969465327, 0.007221969465327, 0.007221969465327, 0.008707930088036,
1225 0.008707930088036, 0.008707930088036, 0.008707930088036, 0.008707930088036,
1226 0.008707930088036, 0.011256464740666, 0.011256464740666, 0.011256464740666,
1227 0.011256464740666, 0.011256464740666, 0.011256464740666, 0.013269437724243,
1228 0.013269437724243, 0.013269437724243, 0.013269437724243, 0.013269437724243,
1229 0.013269437724243, 0.013046146795576, 0.013046146795576, 0.013046146795576,
1230 0.013046146795576, 0.013046146795576, 0.013046146795576, 0.012947418329903,
1231 0.012947418329903, 0.012947418329903, 0.012947418329903, 0.012947418329903,
1232 0.012947418329903, 0.021313811627966, 0.021313811627966, 0.021313811627966,
1233 0.021313811627966, 0.021313811627966, 0.021313811627966, 0.017176891528936,
1234 0.017176891528936, 0.017176891528936, 0.017176891528936, 0.017176891528936,
1235 0.017176891528936, 0.017763399981969, 0.017763399981969, 0.017763399981969,
1236 0.017763399981969, 0.017763399981969, 0.017763399981969, 0.023828398561090,
1237 0.023828398561090, 0.023828398561090, 0.023828398561090, 0.023828398561090,
1238 0.023828398561090, 0.026764788789016, 0.026764788789016, 0.026764788789016,
1239 0.026764788789016, 0.026764788789016, 0.026764788789016, 0.028977845006028,
1240 0.028977845006028, 0.028977845006028, 0.028977845006028, 0.028977845006028,
1241 0.028977845006028}};
1242
1243 // For cub2D_28: 225 points (225*3 = 675 elements)
1244 static const std::array<double, 225 * 2> cub2D_28_nodes_data = {
1245 {-0.988064607832230, 0.987992518020485, -0.937649986705898, 0.937273392400706,
1246 -0.849117911767581, 0.848206583410427, -0.726072255922453, 0.724417731360170,
1247 -0.573547944561595, 0.570972172608539, -0.397788705468703, 0.394151347077563,
1248 -0.205989917758162, 0.201194093997435, -0.006003740989757, 0.000000000000000,
1249 0.193982435778648, -0.201194093997435, 0.385781223489189, -0.394151347077563,
1250 0.561540462582081, -0.570972172608539, 0.714064773942939, -0.724417731360170,
1251 0.837110429788067, -0.848206583410427, 0.925642504726384, -0.937273392400706,
1252 0.976057125852715, -0.987992518020485, -0.988369112325678, 0.987992518020485,
1253 -0.939240706051164, 0.937273392400706, -0.852967326449712, 0.848206583410427,
1254 -0.733060901773317, 0.724417731360170, -0.584427902697520, 0.570972172608539,
1255 -0.413152762435777, 0.394151347077563, -0.226247286304345, 0.201194093997435,
1256 -0.031363303799647, 0.000000000000000, 0.163520678705051, -0.201194093997435,
1257 0.350426154836483, -0.394151347077563, 0.521701295098226, -0.570972172608539,
1258 0.670334294174023, -0.724417731360170, 0.790240718850418, -0.848206583410427,
1259 0.876514098451870, -0.937273392400706, 0.925642504726384, -0.987992518020485,
1260 -0.988903846377640, 0.987992518020485, -0.942034135439991, 0.937273392400706,
1261 -0.859727204070395, 0.848206583410427, -0.745333518414343, 0.724417731360170,
1262 -0.603533972474414, 0.570972172608539, -0.440133265559207, 0.394151347077563,
1263 -0.261820832829464, 0.201194093997435, -0.075896708294786, 0.000000000000000,
1264 0.110027416239891, -0.201194093997435, 0.288339848969634, -0.394151347077563,
1265 0.451740555884842, -0.570972172608539, 0.593540101824770, -0.724417731360170,
1266 0.707933787480822, -0.848206583410427, 0.790240718850418, -0.937273392400706,
1267 0.837110429788067, -0.987992518020485, -0.989647042582769, 0.987992518020485,
1268 -0.945916562813853, 0.937273392400706, -0.869122370464600, 0.848206583410427,
1269 -0.762390524754508, 0.724417731360170, -0.630088403599617, 0.570972172608539,
1270 -0.477631920189938, 0.394151347077563, -0.311262465886975, 0.201194093997435,
1271 -0.137791134319915, 0.000000000000000, 0.035680197247145, -0.201194093997435,
1272 0.202049651550108, -0.394151347077563, 0.354506134959787, -0.570972172608539,
1273 0.486808256114678, -0.724417731360170, 0.593540101824770, -0.848206583410427,
1274 0.670334294174023, -0.937273392400706, 0.714064773942939, -0.987992518020485,
1275 -0.990568289973542, 0.987992518020485, -0.950729122489687, 0.937273392400706,
1276 -0.880768383276303, 0.848206583410427, -0.783533962351248, 0.724417731360170,
1277 -0.663004610946658, 0.570972172608539, -0.524114312723242, 0.394151347077563,
1278 -0.372549075177309, 0.201194093997435, -0.214513913695731, 0.000000000000000,
1279 -0.056478752214152, -0.201194093997435, 0.095086485331781, -0.394151347077563,
1280 0.233976783555196, -0.570972172608539, 0.354506134959787, -0.724417731360170,
1281 0.451740555884842, -0.848206583410427, 0.521701295098226, -0.937273392400706,
1282 0.561540462582081, -0.987992518020485, -0.991629876411625, 0.987992518020485,
1283 -0.956274807758919, 0.937273392400706, -0.894188501892071, 0.848206583410427,
1284 -0.807898304472545, 0.724417731360170, -0.700935138254217, 0.570972172608539,
1285 -0.577677642201529, 0.394151347077563, -0.443171835046505, 0.201194093997435,
1286 -0.302924326461218, 0.000000000000000, -0.162676817875932, -0.201194093997435,
1287 -0.028171010720908, -0.394151347077563, 0.095086485331781, -0.570972172608539,
1288 0.202049651550108, -0.724417731360170, 0.288339848969634, -0.848206583410427,
1289 0.350426154836483, -0.937273392400706, 0.385781223489189, -0.987992518020485,
1290 -0.992788341781213, 0.987992518020485, -0.962326584707617, 0.937273392400706,
1291 -0.908833322242456, 0.848206583410427, -0.834486103249711, 0.724417731360170,
1292 -0.742327153788413, 0.570972172608539, -0.636129088126634, 0.394151347077563,
1293 -0.520239531729724, 0.201194093997435, -0.399402953001283, 0.000000000000000,
1294 -0.278566374272841, -0.201194093997435, -0.162676817875932, -0.394151347077563,
1295 -0.056478752214152, -0.570972172608539, 0.035680197247145, -0.724417731360170,
1296 0.110027416239891, -0.848206583410427, 0.163520678705051, -0.937273392400706,
1297 0.193982435778648, -0.987992518020485, -0.993996259010243, 0.987992518020485,
1298 -0.968636696200353, 0.937273392400706, -0.924103291705214, 0.848206583410427,
1299 -0.862208865680085, 0.724417731360170, -0.785486086304269, 0.570972172608539,
1300 -0.697075673538782, 0.394151347077563, -0.600597046998717, 0.201194093997435,
1301 -0.500000000000000, 0.000000000000000, -0.399402953001283, -0.201194093997435,
1302 -0.302924326461218, -0.394151347077563, -0.214513913695731, -0.570972172608539,
1303 -0.137791134319915, -0.724417731360170, -0.075896708294786, -0.848206583410427,
1304 -0.031363303799647, -0.937273392400706, -0.006003740989757, -0.987992518020485,
1305 -0.995204176239272, 0.987992518020485, -0.974946807693089, 0.937273392400706,
1306 -0.939373261167971, 0.848206583410427, -0.889931628110459, 0.724417731360170,
1307 -0.828645018820126, 0.570972172608539, -0.758022258950930, 0.394151347077563,
1308 -0.680954562267710, 0.201194093997435, -0.600597046998717, 0.000000000000000,
1309 -0.520239531729724, -0.201194093997435, -0.443171835046505, -0.394151347077563,
1310 -0.372549075177309, -0.570972172608539, -0.311262465886975, -0.724417731360170,
1311 -0.261820832829464, -0.848206583410427, -0.226247286304345, -0.937273392400706,
1312 -0.205989917758162, -0.987992518020485, -0.996362641608860, 0.987992518020485,
1313 -0.980998584641787, 0.937273392400706, -0.954018081518357, 0.848206583410427,
1314 -0.916519426887625, 0.724417731360170, -0.870037034354322, 0.570972172608539,
1315 -0.816473704876034, 0.394151347077563, -0.758022258950930, 0.201194093997435,
1316 -0.697075673538782, 0.000000000000000, -0.636129088126634, -0.201194093997435,
1317 -0.577677642201529, -0.394151347077563, -0.524114312723242, -0.570972172608539,
1318 -0.477631920189938, -0.724417731360170, -0.440133265559207, -0.848206583410427,
1319 -0.413152762435777, -0.937273392400706, -0.397788705468703, -0.987992518020485,
1320 -0.997424228046943, 0.987992518020485, -0.986544269911019, 0.937273392400706,
1321 -0.967438200134124, 0.848206583410427, -0.940883769008922, 0.724417731360170,
1322 -0.907967561661881, 0.570972172608539, -0.870037034354322, 0.394151347077563,
1323 -0.828645018820126, 0.201194093997435, -0.785486086304269, 0.000000000000000,
1324 -0.742327153788413, -0.201194093997435, -0.700935138254217, -0.394151347077563,
1325 -0.663004610946658, -0.570972172608539, -0.630088403599617, -0.724417731360170,
1326 -0.603533972474414, -0.848206583410427, -0.584427902697520, -0.937273392400706,
1327 -0.573547944561595, -0.987992518020485, -0.998345475437717, 0.987992518020485,
1328 -0.991356829586853, 0.937273392400706, -0.979084212945827, 0.848206583410427,
1329 -0.962027206605662, 0.724417731360170, -0.940883769008922, 0.570972172608539,
1330 -0.916519426887625, 0.394151347077563, -0.889931628110459, 0.201194093997435,
1331 -0.862208865680085, 0.000000000000000, -0.834486103249711, -0.201194093997435,
1332 -0.807898304472545, -0.394151347077563, -0.783533962351248, -0.570972172608539,
1333 -0.762390524754508, -0.724417731360170, -0.745333518414343, -0.848206583410427,
1334 -0.733060901773317, -0.937273392400706, -0.726072255922453, -0.987992518020485,
1335 -0.999088671642846, 0.987992518020485, -0.995239256960715, 0.937273392400706,
1336 -0.988479379340032, 0.848206583410427, -0.979084212945827, 0.724417731360170,
1337 -0.967438200134124, 0.570972172608539, -0.954018081518357, 0.394151347077563,
1338 -0.939373261167971, 0.201194093997435, -0.924103291705214, 0.000000000000000,
1339 -0.908833322242456, -0.201194093997435, -0.894188501892071, -0.394151347077563,
1340 -0.880768383276303, -0.570972172608539, -0.869122370464600, -0.724417731360170,
1341 -0.859727204070395, -0.848206583410427, -0.852967326449712, -0.937273392400706,
1342 -0.849117911767581, -0.987992518020485, -0.999623405694808, 0.987992518020485,
1343 -0.998032686349542, 0.937273392400706, -0.995239256960715, 0.848206583410427,
1344 -0.991356829586853, 0.724417731360170, -0.986544269911019, 0.570972172608539,
1345 -0.980998584641787, 0.394151347077563, -0.974946807693089, 0.201194093997435,
1346 -0.968636696200353, 0.000000000000000, -0.962326584707617, -0.201194093997435,
1347 -0.956274807758919, -0.394151347077563, -0.950729122489687, -0.570972172608539,
1348 -0.945916562813853, -0.724417731360170, -0.942034135439991, -0.848206583410427,
1349 -0.939240706051164, -0.937273392400706, -0.937649986705898, -0.987992518020485,
1350 -0.999927910188256, 0.987992518020485, -0.999623405694808, 0.937273392400706,
1351 -0.999088671642846, 0.848206583410427, -0.998345475437717, 0.724417731360170,
1352 -0.997424228046943, 0.570972172608539, -0.996362641608860, 0.394151347077563,
1353 -0.995204176239272, 0.201194093997435, -0.993996259010243, 0.000000000000000,
1354 -0.992788341781213, -0.201194093997435, -0.991629876411625, -0.394151347077563,
1355 -0.990568289973542, -0.570972172608539, -0.989647042582769, -0.724417731360170,
1356 -0.988903846377640, -0.848206583410427, -0.988369112325678, -0.937273392400706,
1357 -0.988064607832230, -0.987992518020485}};
1358 static const std::array<double, 225> cub2D_28_weights_data = {
1359 {0.000005678109445, 0.000067869690329, 0.000250117104238, 0.000591434111178,
1360 0.001096877668021, 0.001734258212849, 0.002437321168702, 0.003114968848543,
1361 0.003665090319212, 0.003990796070869, 0.004016439454972, 0.003700816722647,
1362 0.003045376334904, 0.002096114396383, 0.000940083783827, 0.000012991999963,
1363 0.000155291655212, 0.000572289322752, 0.001353251821662, 0.002509749901695,
1364 0.003968131092565, 0.005576799256556, 0.007127315095696, 0.008386040063107,
1365 0.009131282674963, 0.009189956930633, 0.008467785129237, 0.006968081473429,
1366 0.004796088983887, 0.002150992086750, 0.000019785289042, 0.000236490940043,
1367 0.000871529379538, 0.002060843481789, 0.003822054138805, 0.006042997294437,
1368 0.008492809847469, 0.010854063244177, 0.012770953436328, 0.013905870348620,
1369 0.013995224344240, 0.012895441564853, 0.010611569151594, 0.007303879856139,
1370 0.003275708150100, 0.000025769562269, 0.000308020165519, 0.001135132803359,
1371 0.002684167732828, 0.004978075474027, 0.007870766747028, 0.011061551425453,
1372 0.014136991279319, 0.016633665503545, 0.018111850228555, 0.018228230300094,
1373 0.016795806403939, 0.013821152243283, 0.009513016785380, 0.004266481271556,
1374 0.000030699031605, 0.000366941459749, 0.001352272787635, 0.003197623195991,
1375 0.005930333418609, 0.009376368701824, 0.013177519790991, 0.016841261700383,
1376 0.019815525683434, 0.021576472924861, 0.021715115384404, 0.020008682578130,
1377 0.016465005695410, 0.011332765372579, 0.005082618091388, 0.000034371743072,
1378 0.000410840893588, 0.001514053388316, 0.003580174265665, 0.006639815197344,
1379 0.010498120595869, 0.014754026459451, 0.018856084049129, 0.022186177283618,
1380 0.024157797330925, 0.024313026429341, 0.022402442709917, 0.018434814254740,
1381 0.012688572873940, 0.005690682540646, 0.000036637297986, 0.000437920771488,
1382 0.001613849639200, 0.003816155355883, 0.007077467309460, 0.011190086338209,
1383 0.015726512989614, 0.020098950720122, 0.023648541379510, 0.025750117404859,
1384 0.025915578164965, 0.023879061573116, 0.019649913644597, 0.013524918548175,
1385 0.006065774189928, 0.000037402932316, 0.000447072297244, 0.001647575343713,
1386 0.003895904128496, 0.007225369917846, 0.011423933120557, 0.016055160539688,
1387 0.020518972050826, 0.024142740900556, 0.026288234977700, 0.026457153482920,
1388 0.024378078430143, 0.020060551144640, 0.013807557894147, 0.006192534764769,
1389 0.000036637297986, 0.000437920771488, 0.001613849639200, 0.003816155355883,
1390 0.007077467309460, 0.011190086338209, 0.015726512989614, 0.020098950720122,
1391 0.023648541379510, 0.025750117404859, 0.025915578164965, 0.023879061573116,
1392 0.019649913644597, 0.013524918548175, 0.006065774189928, 0.000034371743072,
1393 0.000410840893588, 0.001514053388316, 0.003580174265665, 0.006639815197344,
1394 0.010498120595869, 0.014754026459451, 0.018856084049129, 0.022186177283618,
1395 0.024157797330925, 0.024313026429341, 0.022402442709917, 0.018434814254740,
1396 0.012688572873940, 0.005690682540646, 0.000030699031605, 0.000366941459749,
1397 0.001352272787635, 0.003197623195991, 0.005930333418609, 0.009376368701824,
1398 0.013177519790991, 0.016841261700383, 0.019815525683434, 0.021576472924861,
1399 0.021715115384404, 0.020008682578130, 0.016465005695410, 0.011332765372579,
1400 0.005082618091388, 0.000025769562269, 0.000308020165519, 0.001135132803359,
1401 0.002684167732828, 0.004978075474027, 0.007870766747028, 0.011061551425453,
1402 0.014136991279319, 0.016633665503545, 0.018111850228555, 0.018228230300094,
1403 0.016795806403939, 0.013821152243283, 0.009513016785380, 0.004266481271556,
1404 0.000019785289042, 0.000236490940043, 0.000871529379538, 0.002060843481789,
1405 0.003822054138805, 0.006042997294437, 0.008492809847469, 0.010854063244177,
1406 0.012770953436328, 0.013905870348620, 0.013995224344240, 0.012895441564853,
1407 0.010611569151594, 0.007303879856139, 0.003275708150100, 0.000012991999963,
1408 0.000155291655212, 0.000572289322752, 0.001353251821662, 0.002509749901695,
1409 0.003968131092565, 0.005576799256556, 0.007127315095696, 0.008386040063107,
1410 0.009131282674963, 0.009189956930633, 0.008467785129237, 0.006968081473429,
1411 0.004796088983887, 0.002150992086750, 0.000005678109445, 0.000067869690329,
1412 0.000250117104238, 0.000591434111178, 0.001096877668021, 0.001734258212849,
1413 0.002437321168702, 0.003114968848543, 0.003665090319212, 0.003990796070869,
1414 0.004016439454972, 0.003700816722647, 0.003045376334904, 0.002096114396383,
1415 0.000940083783827}};
1416 } // namespace
1417
1418 namespace oiseau::utils::integration {
1419 42 std::pair<xt::xarray<double>, xt::xarray<double>> cubature(int order) {
1420
2/2
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 40 times.
42 if (order <= 0) {
1421 2 throw std::out_of_range("cubature: n must be a positive integer, but got " +
1422
2/4
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
4 std::to_string(order));
1423 }
1424
29/29
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 1 times.
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 1 times.
✓ Branch 4 taken 1 times.
✓ Branch 5 taken 1 times.
✓ Branch 6 taken 1 times.
✓ Branch 7 taken 1 times.
✓ Branch 8 taken 1 times.
✓ Branch 9 taken 1 times.
✓ Branch 10 taken 1 times.
✓ Branch 11 taken 1 times.
✓ Branch 12 taken 1 times.
✓ Branch 13 taken 1 times.
✓ Branch 14 taken 1 times.
✓ Branch 15 taken 1 times.
✓ Branch 16 taken 1 times.
✓ Branch 17 taken 1 times.
✓ Branch 18 taken 1 times.
✓ Branch 19 taken 1 times.
✓ Branch 20 taken 1 times.
✓ Branch 21 taken 1 times.
✓ Branch 22 taken 1 times.
✓ Branch 23 taken 1 times.
✓ Branch 24 taken 1 times.
✓ Branch 25 taken 1 times.
✓ Branch 26 taken 1 times.
✓ Branch 27 taken 1 times.
✓ Branch 28 taken 12 times.
40 switch (order) {
1425 1 case 1:
1426
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_1_nodes_data.data(), {1ul, 2ul}),
1427
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_1_weights_data.data(), {1ul})};
1428 1 case 2:
1429
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_2_nodes_data.data(), {3ul, 2ul}),
1430
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_2_weights_data.data(), {3ul})};
1431 1 case 3:
1432
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_3_nodes_data.data(), {6ul, 2ul}),
1433
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_3_weights_data.data(), {6ul})};
1434 1 case 4:
1435
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_4_nodes_data.data(), {6ul, 2ul}),
1436
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_4_weights_data.data(), {6ul})};
1437 1 case 5:
1438
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_5_nodes_data.data(), {7ul, 2ul}),
1439
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_5_weights_data.data(), {7ul})};
1440 1 case 6:
1441
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_6_nodes_data.data(), {12ul, 2ul}),
1442
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_6_weights_data.data(), {12ul})};
1443 1 case 7:
1444
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_7_nodes_data.data(), {15ul, 2ul}),
1445
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_7_weights_data.data(), {15ul})};
1446 1 case 8:
1447
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_8_nodes_data.data(), {16ul, 2ul}),
1448
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_8_weights_data.data(), {16ul})};
1449 1 case 9:
1450
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_9_nodes_data.data(), {19ul, 2ul}),
1451
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_9_weights_data.data(), {19ul})};
1452 1 case 10:
1453
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_10_nodes_data.data(), {25ul, 2ul}),
1454
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_10_weights_data.data(), {25ul})};
1455 1 case 11:
1456
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_11_nodes_data.data(), {28ul, 2ul}),
1457
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_11_weights_data.data(), {28ul})};
1458 1 case 12:
1459
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_12_nodes_data.data(), {36ul, 2ul}),
1460
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_12_weights_data.data(), {36ul})};
1461 1 case 13:
1462
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_13_nodes_data.data(), {40ul, 2ul}),
1463
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_13_weights_data.data(), {40ul})};
1464 1 case 14:
1465
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_14_nodes_data.data(), {46ul, 2ul}),
1466
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_14_weights_data.data(), {46ul})};
1467 1 case 15:
1468
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_15_nodes_data.data(), {54ul, 2ul}),
1469
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_15_weights_data.data(), {54ul})};
1470 1 case 16:
1471
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_16_nodes_data.data(), {58ul, 2ul}),
1472
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_16_weights_data.data(), {58ul})};
1473 1 case 17:
1474
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_17_nodes_data.data(), {66ul, 2ul}),
1475
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_17_weights_data.data(), {66ul})};
1476 1 case 18:
1477
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_18_nodes_data.data(), {73ul, 2ul}),
1478
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_18_weights_data.data(), {73ul})};
1479 1 case 19:
1480
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_19_nodes_data.data(), {82ul, 2ul}),
1481
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_19_weights_data.data(), {82ul})};
1482 1 case 20:
1483
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_20_nodes_data.data(), {85ul, 2ul}),
1484
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_20_weights_data.data(), {85ul})};
1485 1 case 21:
1486
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_21_nodes_data.data(), {93ul, 2ul}),
1487
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_21_weights_data.data(), {93ul})};
1488 1 case 22:
1489
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_22_nodes_data.data(), {100ul, 2ul}),
1490
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_22_weights_data.data(), {100ul})};
1491 1 case 23:
1492
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_23_nodes_data.data(), {106ul, 2ul}),
1493
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_23_weights_data.data(), {106ul})};
1494 1 case 24:
1495
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_24_nodes_data.data(), {118ul, 2ul}),
1496
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_24_weights_data.data(), {118ul})};
1497 1 case 25:
1498
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_25_nodes_data.data(), {126ul, 2ul}),
1499
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_25_weights_data.data(), {126ul})};
1500 1 case 26:
1501
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_26_nodes_data.data(), {138ul, 2ul}),
1502
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_26_weights_data.data(), {138ul})};
1503 1 case 27:
1504
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_27_nodes_data.data(), {145ul, 2ul}),
1505
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_27_weights_data.data(), {145ul})};
1506 1 case 28:
1507
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
3 return std::pair{xt::adapt(cub2D_28_nodes_data.data(), {225ul, 2ul}),
1508
2/4
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
2 xt::adapt(cub2D_28_weights_data.data(), {225ul})};
1509 12 default:
1510 // TODO(tiagovla): check order/number of nodes relationship
1511 12 int cubNA = std::ceil((order + 1) / 2);
1512
1/2
✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
12 auto [cubA, cubWA] = oiseau::dg::nodal::utils::jacobi_gq(cubNA - 1, 0, 0);
1513
1/2
✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
12 auto [cubB, cubWB] = oiseau::dg::nodal::utils::jacobi_gq(cubNA - 1, 1, 0);
1514
2/4
✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12 times.
✗ Branch 5 not taken.
12 auto r0 = xt::reshape_view(xt::tile(cubA, {cubNA}), {cubNA, cubNA});
1515
2/4
✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12 times.
✗ Branch 5 not taken.
12 auto r1 = xt::transpose(xt::reshape_view(xt::tile(cubB, {cubNA}), {cubNA, cubNA}));
1516
3/6
✓ Branch 6 taken 12 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 12 times.
✗ Branch 10 not taken.
✓ Branch 12 taken 12 times.
✗ Branch 13 not taken.
24 xt::xarray<double> cubR = xt::flatten(xt::eval((0.5 * ((1.0 + r0) * (1.0 - r1)) - 1.0)));
1517
3/6
✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12 times.
✗ Branch 8 not taken.
24 xt::xarray<double> cubS = xt::flatten(xt::eval(r1));
1518
2/4
✓ Branch 2 taken 12 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
24 xt::xarray<double> nodes = xt::stack(xt::xtuple(cubR, cubS), 1);
1519
3/6
✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 12 times.
✗ Branch 9 not taken.
24 xt::xarray<double> weights = 0.5 * xt::flatten(xt::linalg::outer(cubWB, cubWA));
1520
1/2
✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
12 return std::pair{nodes, weights};
1521 12 }
1522 }
1523
1524 51 std::pair<xt::xarray<double>, xt::xarray<double>> quadrature(int order) {
1525
2/2
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 49 times.
51 if (order <= 0) {
1526 2 throw std::out_of_range("quadrature: n must be a positive integer, but got " +
1527
2/4
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
4 std::to_string(order));
1528 }
1529 // TODO(tiagovla): check order/number of nodes relationship
1530 49 int n = std::ceil((order + 1) / 2);
1531
1532 // Recurrence coefficients for Legendre polynomials
1533
1/2
✓ Branch 2 taken 49 times.
✗ Branch 3 not taken.
49 xt::xarray<double> a = xt::zeros<double>({n});
1534
1/2
✓ Branch 2 taken 49 times.
✗ Branch 3 not taken.
49 xt::xarray<double> b = xt::zeros<double>({n - 1});
1535
2/2
✓ Branch 0 taken 576 times.
✓ Branch 1 taken 49 times.
625 for (int i = 1; i < n; ++i) {
1536
1/2
✓ Branch 1 taken 576 times.
✗ Branch 2 not taken.
576 b[i - 1] = static_cast<double>(i) / std::sqrt(4.0 * i * i - 1.0);
1537 }
1538
1539 // Jacobi matrix construction
1540
1/2
✓ Branch 2 taken 49 times.
✗ Branch 3 not taken.
49 xt::xarray<double> J = xt::zeros<double>({n, n});
1541
2/2
✓ Branch 0 taken 625 times.
✓ Branch 1 taken 49 times.
674 for (int i = 0; i < n; ++i) {
1542
2/4
✓ Branch 1 taken 625 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 625 times.
✗ Branch 5 not taken.
625 J(i, i) = a[i];
1543
2/2
✓ Branch 0 taken 576 times.
✓ Branch 1 taken 49 times.
625 if (i < n - 1) {
1544
2/4
✓ Branch 1 taken 576 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 576 times.
✗ Branch 5 not taken.
576 J(i, i + 1) = b[i];
1545
2/4
✓ Branch 1 taken 576 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 576 times.
✗ Branch 5 not taken.
576 J(i + 1, i) = b[i];
1546 }
1547 }
1548
1549 // Solve eigenvalue problem
1550
1/2
✓ Branch 1 taken 49 times.
✗ Branch 2 not taken.
49 auto eig_result = xt::linalg::eig(J);
1551
1/2
✓ Branch 3 taken 49 times.
✗ Branch 4 not taken.
49 xt::xarray<double> eigenvalues = xt::real(std::get<0>(eig_result));
1552
1/2
✓ Branch 3 taken 49 times.
✗ Branch 4 not taken.
49 xt::xarray<double> eigenvectors = xt::real(std::get<1>(eig_result));
1553
1/2
✓ Branch 1 taken 49 times.
✗ Branch 2 not taken.
49 xt::xarray<std::size_t> sorted_indices = xt::argsort(eigenvalues);
1554
1555
3/6
✓ Branch 1 taken 49 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 49 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 49 times.
✗ Branch 8 not taken.
49 xt::xarray<double> nodes = xt::view(eigenvalues, xt::keep(sorted_indices));
1556
3/6
✓ Branch 1 taken 49 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 49 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 49 times.
✗ Branch 9 not taken.
49 xt::xarray<double> sorted_vectors = xt::view(eigenvectors, xt::all(), xt::keep(sorted_indices));
1557
1558 // // Weights are 2 * (first row of eigenvectors)^2
1559
2/4
✓ Branch 1 taken 49 times.
✗ Branch 2 not taken.
✓ Branch 6 taken 49 times.
✗ Branch 7 not taken.
49 xt::xarray<double> weights = 2.0 * xt::square(xt::row(sorted_vectors, 0));
1560
1561
1/2
✓ Branch 1 taken 49 times.
✗ Branch 2 not taken.
98 return std::make_pair(nodes, weights);
1562 49 }
1563
1564 14 std::pair<xt::xarray<double>, xt::xarray<double>> jacobi_gq(unsigned n, double alpha, double beta) {
1565
2/2
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 12 times.
14 if (n == 0) {
1566
1/2
✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
2 xt::xarray<double> x = {(alpha - beta) / (alpha + beta + 2)};
1567
1/2
✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
2 xt::xarray<double> w = {2};
1568 2 return make_pair(std::move(x), std::move(w));
1569 2 }
1570
1/2
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 xt::xarray<double> h1 = 2 * xt::linspace<double>(0, n, n + 1) + alpha + beta;
1571
2/4
✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12 times.
✗ Branch 5 not taken.
12 auto h1s = xt::view(h1, xt::range(0, n));
1572 12 auto lins = xt::arange<double>(1, n + 1);
1573 xt::xarray<double> m =
1574
1/2
✓ Branch 6 taken 12 times.
✗ Branch 7 not taken.
24 xt::diag(-1.0 / 2.0 * (std::pow(alpha, 2) - std::pow(beta, 2)) / (h1 + 2) / h1) +
1575
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
36 xt::diag(2. / (h1s + 2) *
1576 48 xt::sqrt(lins * (lins + alpha + beta) * (lins + alpha) * (lins + beta) /
1577 60 (h1s + 1) / (h1s + 3)),
1578
1/2
✓ Branch 2 taken 12 times.
✗ Branch 3 not taken.
12 1);
1579
1/4
✗ Branch 0 not taken.
✓ Branch 1 taken 12 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
12 if (alpha + beta == 0) m(0, 0) = 0;
1580
1/2
✓ Branch 2 taken 12 times.
✗ Branch 3 not taken.
12 m += xt::transpose(m);
1581
1/2
✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
12 auto [d, v] = xt::linalg::eigh(m);
1582 12 double cte = std::pow(2, (alpha + beta + 1)) / (alpha + beta + 1) * std::tgamma(alpha + 1) *
1583 12 std::tgamma(beta + 1) / std::tgamma(alpha + beta + 1);
1584
3/6
✓ Branch 2 taken 12 times.
✗ Branch 3 not taken.
✓ Branch 7 taken 12 times.
✗ Branch 8 not taken.
✓ Branch 13 taken 12 times.
✗ Branch 14 not taken.
12 xt::xarray<double> w = cte * xt::square(xt::view(v, 0, xt::all())), x = d;
1585
1/2
✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
12 return {x, w};
1586 12 }
1587
1588 } // namespace oiseau::utils::integration
1589