diff --git a/include/integratorxx/quadratures/s2/ahrens_beylkin.hpp b/include/integratorxx/quadratures/s2/ahrens_beylkin.hpp index bf83484..a364c30 100644 --- a/include/integratorxx/quadratures/s2/ahrens_beylkin.hpp +++ b/include/integratorxx/quadratures/s2/ahrens_beylkin.hpp @@ -3,6 +3,7 @@ #include #include #include +#include #include namespace IntegratorXX { @@ -64,8 +65,14 @@ template struct quadrature_traits> { detail::copy_grid>(points, weights); else if (npts == 492) detail::copy_grid>(points, weights); - else if (npts == 552) - detail::copy_grid>(points, weights); + // NOTE: the order-39 rule is 572 points, not 552. The 552-point table -- + // and the qsph1-39-552DP.dat it came from -- is missing its 20-point + // (dodecahedral vertex) orbit, which is why its weights sum to 0.9632 * 4pi + // and no weighting of those points integrates to order 39 at all. The + // orbit restored, the same points and weights form a valid rule. 552 + // remains unavailable; ask for 572. + else if (npts == 572) + detail::copy_grid>(points, weights); else if (npts == 612) detail::copy_grid>(points, weights); else if (npts == 672) @@ -162,6 +169,8 @@ template struct quadrature_traits> { detail::copy_grid>(points, weights); else if (npts == 15012) detail::copy_grid>(points, weights); + else + detail::throw_unsupported_grid_size("AhrensBeylkin", npts); return std::make_tuple(points, weights); } @@ -183,7 +192,7 @@ inline static int64_t npts_by_algebraic_order(int64_t order) { case 37: return 492; case 39: - return 552; + return 572; case 41: return 612; case 44: @@ -301,7 +310,7 @@ inline static int64_t algebraic_order_by_npts(int64_t npts) { return 35; case 492: return 37; - case 552: + case 572: return 39; case 612: return 41; diff --git a/include/integratorxx/quadratures/s2/ahrens_beylkin/ahrens_beylkin_572.hpp b/include/integratorxx/quadratures/s2/ahrens_beylkin/ahrens_beylkin_572.hpp new file mode 100644 index 0000000..acb7f20 --- /dev/null +++ b/include/integratorxx/quadratures/s2/ahrens_beylkin/ahrens_beylkin_572.hpp @@ -0,0 +1,1162 @@ +#pragma once + +namespace IntegratorXX { +namespace AhrensBeylkinGrids { +/** + * \brief Ahrens-Beylkin Quadrature specification for order 39 grid with 572 points + * + */ +template +struct ahrens_beylkin_572 { + + static constexpr std::array,572> points = { + 0.000000000000000E+00, -0.5257311121191336, 0.8506508083520399, + 0.8506508083520399, 0.000000000000000E+00, 0.5257311121191336, + -0.5257311121191336, 0.8506508083520399, 0.000000000000000E+00, + 0.5257311121191336, 0.8506508083520399, 0.000000000000000E+00, + -0.8506508083520399, 0.000000000000000E+00, 0.5257311121191336, + 0.8506508083520399, 0.000000000000000E+00, -0.5257311121191336, + 0.000000000000000E+00, 0.5257311121191336, 0.8506508083520399, + 0.5257311121191336, -0.8506508083520399, 0.000000000000000E+00, + 0.000000000000000E+00, 0.5257311121191336, -0.8506508083520399, + -0.8506508083520399, 0.000000000000000E+00, -0.5257311121191336, + 0.000000000000000E+00, -0.5257311121191336, -0.8506508083520399, + -0.5257311121191336, -0.8506508083520399, 0.000000000000000E+00, + -0.2562213369191951, -0.9307043572416347, 0.2610364455756627, + 0.8042971171056256, -0.5919748966758045, 0.05169012595506249, + -0.3387294605658302, 0.6268970522080171, -0.7016141663889637, + 0.7533042923440262, 0.3706757152888219, -0.5432606715299628, + -0.9626506119646264, -0.1774000648976085, -0.2045312109641326, + 0.05169012595506249, 0.8042971171056256, -0.5919748966758045, + 0.2610364455756627, -0.2562213369191951, -0.9307043572416347, + -0.7016141663889637, -0.3387294605658302, 0.6268970522080171, + -0.5432606715299628, 0.7533042923440262, 0.3706757152888219, + -0.2045312109641326, -0.9626506119646264, -0.1774000648976085, + -0.9307043572416347, 0.2610364455756627, -0.2562213369191951, + -0.5919748966758045, 0.05169012595506249, 0.8042971171056256, + 0.6268970522080171, -0.7016141663889637, -0.3387294605658302, + 0.3706757152888219, -0.5432606715299628, 0.7533042923440262, + -0.1774000648976085, -0.2045312109641326, -0.9626506119646264, + -0.7533042923440262, 0.3706757152888219, 0.5432606715299628, + 0.3387294605658302, 0.6268970522080171, 0.7016141663889637, + -0.8042971171056256, -0.5919748966758045, -0.05169012595506249, + 0.2562213369191951, -0.9307043572416347, -0.2610364455756627, + 0.9626506119646264, -0.1774000648976085, 0.2045312109641326, + 0.5432606715299628, -0.7533042923440262, 0.3706757152888219, + -0.05169012595506249, -0.8042971171056256, -0.5919748966758045, + 0.7016141663889637, 0.3387294605658302, 0.6268970522080171, + -0.2610364455756627, 0.2562213369191951, -0.9307043572416347, + 0.2045312109641326, 0.9626506119646264, -0.1774000648976085, + 0.3706757152888219, 0.5432606715299628, -0.7533042923440262, + 0.6268970522080171, 0.7016141663889637, 0.3387294605658302, + -0.5919748966758045, -0.05169012595506249, -0.8042971171056256, + -0.9307043572416347, -0.2610364455756627, 0.2562213369191951, + -0.1774000648976085, 0.2045312109641326, 0.9626506119646264, + 0.3387294605658302, -0.6268970522080171, -0.7016141663889637, + 0.2562213369191951, 0.9307043572416347, 0.2610364455756627, + -0.7533042923440262, -0.3706757152888219, -0.5432606715299628, + -0.8042971171056256, 0.5919748966758045, 0.05169012595506249, + 0.9626506119646264, 0.1774000648976085, -0.2045312109641326, + -0.7016141663889637, 0.3387294605658302, -0.6268970522080171, + -0.5432606715299628, -0.7533042923440262, -0.3706757152888219, + 0.2610364455756627, 0.2562213369191951, 0.9307043572416347, + 0.05169012595506249, -0.8042971171056256, 0.5919748966758045, + -0.2045312109641326, 0.9626506119646264, 0.1774000648976085, + -0.6268970522080171, -0.7016141663889637, 0.3387294605658302, + 0.9307043572416347, 0.2610364455756627, 0.2562213369191951, + -0.3706757152888219, -0.5432606715299628, -0.7533042923440262, + 0.5919748966758045, 0.05169012595506249, -0.8042971171056256, + 0.1774000648976085, -0.2045312109641326, 0.9626506119646264, + 0.8042971171056256, 0.5919748966758045, -0.05169012595506249, + -0.2562213369191951, 0.9307043572416347, -0.2610364455756627, + -0.3387294605658302, -0.6268970522080171, 0.7016141663889637, + 0.7533042923440262, -0.3706757152888219, 0.5432606715299628, + -0.9626506119646264, 0.1774000648976085, 0.2045312109641326, + -0.05169012595506249, 0.8042971171056256, 0.5919748966758045, + -0.2610364455756627, -0.2562213369191951, 0.9307043572416347, + 0.5432606715299628, 0.7533042923440262, -0.3706757152888219, + 0.7016141663889637, -0.3387294605658302, -0.6268970522080171, + 0.2045312109641326, -0.9626506119646264, 0.1774000648976085, + 0.5919748966758045, -0.05169012595506249, 0.8042971171056256, + 0.9307043572416347, -0.2610364455756627, -0.2562213369191951, + -0.6268970522080171, 0.7016141663889637, -0.3387294605658302, + -0.3706757152888219, 0.5432606715299628, 0.7533042923440262, + 0.1774000648976085, 0.2045312109641326, -0.9626506119646264, + -0.1580039435414246, -0.9103014444936309, 0.3826042785675133, + 0.8789255741506070, -0.4647473735521596, 0.1072367188998021, + -0.4455540709414713, 0.6698339516049919, -0.5939731030482136, + 0.7012098219480158, 0.5118300080635672, -0.4963212955830938, + -0.9765773816157269, -0.2090916225456152, -0.05076722464162248, + 0.1072367188998021, 0.8789255741506070, -0.4647473735521596, + 0.3826042785675133, -0.1580039435414246, -0.9103014444936309, + -0.5939731030482136, -0.4455540709414713, 0.6698339516049919, + -0.4963212955830938, 0.7012098219480158, 0.5118300080635672, + -0.05076722464162248, -0.9765773816157269, -0.2090916225456152, + -0.9103014444936309, 0.3826042785675133, -0.1580039435414246, + -0.4647473735521596, 0.1072367188998021, 0.8789255741506070, + 0.6698339516049919, -0.5939731030482136, -0.4455540709414713, + 0.5118300080635672, -0.4963212955830938, 0.7012098219480158, + -0.2090916225456152, -0.05076722464162248, -0.9765773816157269, + -0.7012098219480158, 0.5118300080635672, 0.4963212955830938, + 0.4455540709414713, 0.6698339516049919, 0.5939731030482136, + -0.8789255741506070, -0.4647473735521596, -0.1072367188998021, + 0.1580039435414246, -0.9103014444936309, -0.3826042785675133, + 0.9765773816157269, -0.2090916225456152, 0.05076722464162248, + 0.4963212955830938, -0.7012098219480158, 0.5118300080635672, + -0.1072367188998021, -0.8789255741506070, -0.4647473735521596, + 0.5939731030482136, 0.4455540709414713, 0.6698339516049919, + -0.3826042785675133, 0.1580039435414246, -0.9103014444936309, + 0.05076722464162248, 0.9765773816157269, -0.2090916225456152, + 0.5118300080635672, 0.4963212955830938, -0.7012098219480158, + 0.6698339516049919, 0.5939731030482136, 0.4455540709414713, + -0.4647473735521596, -0.1072367188998021, -0.8789255741506070, + -0.9103014444936309, -0.3826042785675133, 0.1580039435414246, + -0.2090916225456152, 0.05076722464162248, 0.9765773816157269, + 0.4455540709414713, -0.6698339516049919, -0.5939731030482136, + 0.1580039435414246, 0.9103014444936309, 0.3826042785675133, + -0.7012098219480158, -0.5118300080635672, -0.4963212955830938, + -0.8789255741506070, 0.4647473735521596, 0.1072367188998021, + 0.9765773816157269, 0.2090916225456152, -0.05076722464162248, + -0.5939731030482136, 0.4455540709414713, -0.6698339516049919, + -0.4963212955830938, -0.7012098219480158, -0.5118300080635672, + 0.3826042785675133, 0.1580039435414246, 0.9103014444936309, + 0.1072367188998021, -0.8789255741506070, 0.4647473735521596, + -0.05076722464162248, 0.9765773816157269, 0.2090916225456152, + -0.6698339516049919, -0.5939731030482136, 0.4455540709414713, + 0.9103014444936309, 0.3826042785675133, 0.1580039435414246, + -0.5118300080635672, -0.4963212955830938, -0.7012098219480158, + 0.4647473735521596, 0.1072367188998021, -0.8789255741506070, + 0.2090916225456152, -0.05076722464162248, 0.9765773816157269, + 0.8789255741506070, 0.4647473735521596, -0.1072367188998021, + -0.1580039435414246, 0.9103014444936309, -0.3826042785675133, + -0.4455540709414713, -0.6698339516049919, 0.5939731030482136, + 0.7012098219480158, -0.5118300080635672, 0.4963212955830938, + -0.9765773816157269, 0.2090916225456152, 0.05076722464162248, + -0.1072367188998021, 0.8789255741506070, 0.4647473735521596, + -0.3826042785675133, -0.1580039435414246, 0.9103014444936309, + 0.4963212955830938, 0.7012098219480158, -0.5118300080635672, + 0.5939731030482136, -0.4455540709414713, -0.6698339516049919, + 0.05076722464162248, -0.9765773816157269, 0.2090916225456152, + 0.4647473735521596, -0.1072367188998021, 0.8789255741506070, + 0.9103014444936309, -0.3826042785675133, -0.1580039435414246, + -0.6698339516049919, 0.5939731030482136, -0.4455540709414713, + -0.5118300080635672, 0.4963212955830938, 0.7012098219480158, + 0.2090916225456152, 0.05076722464162248, -0.9765773816157269, + -0.05504178136452656, -0.8669402990003630, 0.4953634224217416, + 0.9320423003683537, -0.3249241701046998, 0.1603790323135777, + -0.5420161288956633, 0.6961776033127985, -0.4706965696312301, + 0.6310756019448078, 0.6411358219482720, -0.4366788779466121, + -0.9660599920529717, -0.2358646970555552, 0.1053372509490511, + 0.1603790323135777, 0.9320423003683537, -0.3249241701046998, + 0.4953634224217416, -0.05504178136452656, -0.8669402990003630, + -0.4706965696312301, -0.5420161288956633, 0.6961776033127985, + -0.4366788779466121, 0.6310756019448078, 0.6411358219482720, + 0.1053372509490511, -0.9660599920529717, -0.2358646970555552, + -0.8669402990003630, 0.4953634224217416, -0.05504178136452656, + -0.3249241701046998, 0.1603790323135777, 0.9320423003683537, + 0.6961776033127985, -0.4706965696312301, -0.5420161288956633, + 0.6411358219482720, -0.4366788779466121, 0.6310756019448078, + -0.2358646970555552, 0.1053372509490511, -0.9660599920529717, + -0.6310756019448078, 0.6411358219482720, 0.4366788779466121, + 0.5420161288956633, 0.6961776033127985, 0.4706965696312301, + -0.9320423003683537, -0.3249241701046998, -0.1603790323135777, + 0.05504178136452656, -0.8669402990003630, -0.4953634224217416, + 0.9660599920529717, -0.2358646970555552, -0.1053372509490511, + 0.4366788779466121, -0.6310756019448078, 0.6411358219482720, + -0.1603790323135777, -0.9320423003683537, -0.3249241701046998, + 0.4706965696312301, 0.5420161288956633, 0.6961776033127985, + -0.4953634224217416, 0.05504178136452656, -0.8669402990003630, + -0.1053372509490511, 0.9660599920529717, -0.2358646970555552, + 0.6411358219482720, 0.4366788779466121, -0.6310756019448078, + 0.6961776033127985, 0.4706965696312301, 0.5420161288956633, + -0.3249241701046998, -0.1603790323135777, -0.9320423003683537, + -0.8669402990003630, -0.4953634224217416, 0.05504178136452656, + -0.2358646970555552, -0.1053372509490511, 0.9660599920529717, + 0.5420161288956633, -0.6961776033127985, -0.4706965696312301, + 0.05504178136452656, 0.8669402990003630, 0.4953634224217416, + -0.6310756019448078, -0.6411358219482720, -0.4366788779466121, + -0.9320423003683537, 0.3249241701046998, 0.1603790323135777, + 0.9660599920529717, 0.2358646970555552, 0.1053372509490511, + -0.4706965696312301, 0.5420161288956633, -0.6961776033127985, + -0.4366788779466121, -0.6310756019448078, -0.6411358219482720, + 0.4953634224217416, 0.05504178136452656, 0.8669402990003630, + 0.1603790323135777, -0.9320423003683537, 0.3249241701046998, + 0.1053372509490511, 0.9660599920529717, 0.2358646970555552, + -0.6961776033127985, -0.4706965696312301, 0.5420161288956633, + 0.8669402990003630, 0.4953634224217416, 0.05504178136452656, + -0.6411358219482720, -0.4366788779466121, -0.6310756019448078, + 0.3249241701046998, 0.1603790323135777, -0.9320423003683537, + 0.2358646970555552, 0.1053372509490511, 0.9660599920529717, + 0.9320423003683537, 0.3249241701046998, -0.1603790323135777, + -0.05504178136452656, 0.8669402990003630, -0.4953634224217416, + -0.5420161288956633, -0.6961776033127985, 0.4706965696312301, + 0.6310756019448078, -0.6411358219482720, 0.4366788779466121, + -0.9660599920529717, 0.2358646970555552, -0.1053372509490511, + -0.1603790323135777, 0.9320423003683537, 0.3249241701046998, + -0.4953634224217416, -0.05504178136452656, 0.8669402990003630, + 0.4366788779466121, 0.6310756019448078, -0.6411358219482720, + 0.4706965696312301, -0.5420161288956633, -0.6961776033127985, + -0.1053372509490511, -0.9660599920529717, 0.2358646970555552, + 0.3249241701046998, -0.1603790323135777, 0.9320423003683537, + 0.8669402990003630, -0.4953634224217416, -0.05504178136452656, + -0.6961776033127985, 0.4706965696312301, -0.5420161288956633, + -0.6411358219482720, 0.4366788779466121, 0.6310756019448078, + 0.2358646970555552, -0.1053372509490511, -0.9660599920529717, + -0.4797951924527550, -0.8656155314425499, 0.1432002968734904, + 0.6236329556813699, -0.7767189049015061, 0.08825916018591930, + -0.08889662654104381, 0.6232389798072184, -0.7769623953824791, + 0.8652215555683984, 0.1434437873544634, -0.4804326588078795, + -0.9201626922559695, -0.0003939758741514565, -0.3915360322668357, + 0.08825916018591930, 0.6236329556813699, -0.7767189049015061, + 0.1432002968734904, -0.4797951924527550, -0.8656155314425499, + -0.7769623953824791, -0.08889662654104381, 0.6232389798072184, + -0.4804326588078795, 0.8652215555683984, 0.1434437873544634, + -0.3915360322668357, -0.9201626922559695, -0.0003939758741514565, + -0.8656155314425499, 0.1432002968734904, -0.4797951924527550, + -0.7767189049015061, 0.08825916018591930, 0.6236329556813699, + 0.6232389798072184, -0.7769623953824791, -0.08889662654104381, + 0.1434437873544634, -0.4804326588078795, 0.8652215555683984, + -0.0003939758741514565, -0.3915360322668357, -0.9201626922559695, + -0.8652215555683984, 0.1434437873544634, 0.4804326588078795, + 0.08889662654104381, 0.6232389798072184, 0.7769623953824791, + -0.6236329556813699, -0.7767189049015061, -0.08825916018591930, + 0.4797951924527550, -0.8656155314425499, -0.1432002968734904, + 0.9201626922559695, -0.0003939758741514565, 0.3915360322668357, + 0.4804326588078795, -0.8652215555683984, 0.1434437873544634, + -0.08825916018591930, -0.6236329556813699, -0.7767189049015061, + 0.7769623953824791, 0.08889662654104381, 0.6232389798072184, + -0.1432002968734904, 0.4797951924527550, -0.8656155314425499, + 0.3915360322668357, 0.9201626922559695, -0.0003939758741514565, + 0.1434437873544634, 0.4804326588078795, -0.8652215555683984, + 0.6232389798072184, 0.7769623953824791, 0.08889662654104381, + -0.7767189049015061, -0.08825916018591930, -0.6236329556813699, + -0.8656155314425499, -0.1432002968734904, 0.4797951924527550, + -0.0003939758741514565, 0.3915360322668357, 0.9201626922559695, + 0.08889662654104381, -0.6232389798072184, -0.7769623953824791, + 0.4797951924527550, 0.8656155314425499, 0.1432002968734904, + -0.8652215555683984, -0.1434437873544634, -0.4804326588078795, + -0.6236329556813699, 0.7767189049015061, 0.08825916018591930, + 0.9201626922559695, 0.0003939758741514565, -0.3915360322668357, + -0.7769623953824791, 0.08889662654104381, -0.6232389798072184, + -0.4804326588078795, -0.8652215555683984, -0.1434437873544634, + 0.1432002968734904, 0.4797951924527550, 0.8656155314425499, + 0.08825916018591930, -0.6236329556813699, 0.7767189049015061, + -0.3915360322668357, 0.9201626922559695, 0.0003939758741514565, + -0.6232389798072184, -0.7769623953824791, 0.08889662654104381, + 0.8656155314425499, 0.1432002968734904, 0.4797951924527550, + -0.1434437873544634, -0.4804326588078795, -0.8652215555683984, + 0.7767189049015061, 0.08825916018591930, -0.6236329556813699, + 0.0003939758741514565, -0.3915360322668357, 0.9201626922559695, + 0.6236329556813699, 0.7767189049015061, -0.08825916018591930, + -0.4797951924527550, 0.8656155314425499, -0.1432002968734904, + -0.08889662654104381, -0.6232389798072184, 0.7769623953824791, + 0.8652215555683984, -0.1434437873544634, 0.4804326588078795, + -0.9201626922559695, 0.0003939758741514565, 0.3915360322668357, + -0.08825916018591930, 0.6236329556813699, 0.7767189049015061, + -0.1432002968734904, -0.4797951924527550, 0.8656155314425499, + 0.4804326588078795, 0.8652215555683984, -0.1434437873544634, + 0.7769623953824791, -0.08889662654104381, -0.6232389798072184, + 0.3915360322668357, -0.9201626922559695, 0.0003939758741514565, + 0.7767189049015061, -0.08825916018591930, 0.6236329556813699, + 0.8656155314425499, -0.1432002968734904, -0.4797951924527550, + -0.6232389798072184, 0.7769623953824791, -0.08889662654104381, + -0.1434437873544634, 0.4804326588078795, 0.8652215555683984, + 0.0003939758741514565, 0.3915360322668357, -0.9201626922559695, + -0.4028214664655274, -0.8728676405153182, 0.2753850909104979, + 0.7193786216352178, -0.6772245592384751, 0.1544710170176507, + -0.1956430812768431, 0.6939328865360421, -0.6929508883984918, + 0.8474219054161425, 0.2911114200705147, -0.4439935307247199, + -0.9683359793089897, -0.02544573509917569, -0.2483504494478768, + 0.1544710170176507, 0.7193786216352178, -0.6772245592384751, + 0.2753850909104979, -0.4028214664655274, -0.8728676405153182, + -0.6929508883984918, -0.1956430812768431, 0.6939328865360421, + -0.4439935307247199, 0.8474219054161425, 0.2911114200705147, + -0.2483504494478768, -0.9683359793089897, -0.02544573509917569, + -0.8728676405153182, 0.2753850909104979, -0.4028214664655274, + -0.6772245592384751, 0.1544710170176507, 0.7193786216352178, + 0.6939328865360421, -0.6929508883984918, -0.1956430812768431, + 0.2911114200705147, -0.4439935307247199, 0.8474219054161425, + -0.02544573509917569, -0.2483504494478768, -0.9683359793089897, + -0.8474219054161425, 0.2911114200705147, 0.4439935307247199, + 0.1956430812768431, 0.6939328865360421, 0.6929508883984918, + -0.7193786216352178, -0.6772245592384751, -0.1544710170176507, + 0.4028214664655274, -0.8728676405153182, -0.2753850909104979, + 0.9683359793089897, -0.02544573509917569, 0.2483504494478768, + 0.4439935307247199, -0.8474219054161425, 0.2911114200705147, + -0.1544710170176507, -0.7193786216352178, -0.6772245592384751, + 0.6929508883984918, 0.1956430812768431, 0.6939328865360421, + -0.2753850909104979, 0.4028214664655274, -0.8728676405153182, + 0.2483504494478768, 0.9683359793089897, -0.02544573509917569, + 0.2911114200705147, 0.4439935307247199, -0.8474219054161425, + 0.6939328865360421, 0.6929508883984918, 0.1956430812768431, + -0.6772245592384751, -0.1544710170176507, -0.7193786216352178, + -0.8728676405153182, -0.2753850909104979, 0.4028214664655274, + -0.02544573509917569, 0.2483504494478768, 0.9683359793089897, + 0.1956430812768431, -0.6939328865360421, -0.6929508883984918, + 0.4028214664655274, 0.8728676405153182, 0.2753850909104979, + -0.8474219054161425, -0.2911114200705147, -0.4439935307247199, + -0.7193786216352178, 0.6772245592384751, 0.1544710170176507, + 0.9683359793089897, 0.02544573509917569, -0.2483504494478768, + -0.6929508883984918, 0.1956430812768431, -0.6939328865360421, + -0.4439935307247199, -0.8474219054161425, -0.2911114200705147, + 0.2753850909104979, 0.4028214664655274, 0.8728676405153182, + 0.1544710170176507, -0.7193786216352178, 0.6772245592384751, + -0.2483504494478768, 0.9683359793089897, 0.02544573509917569, + -0.6939328865360421, -0.6929508883984918, 0.1956430812768431, + 0.8728676405153182, 0.2753850909104979, 0.4028214664655274, + -0.2911114200705147, -0.4439935307247199, -0.8474219054161425, + 0.6772245592384751, 0.1544710170176507, -0.7193786216352178, + 0.02544573509917569, -0.2483504494478768, 0.9683359793089897, + 0.7193786216352178, 0.6772245592384751, -0.1544710170176507, + -0.4028214664655274, 0.8728676405153182, -0.2753850909104979, + -0.1956430812768431, -0.6939328865360421, 0.6929508883984918, + 0.8474219054161425, -0.2911114200705147, 0.4439935307247199, + -0.9683359793089897, 0.02544573509917569, 0.2483504494478768, + -0.1544710170176507, 0.7193786216352178, 0.6772245592384751, + -0.2753850909104979, -0.4028214664655274, 0.8728676405153182, + 0.4439935307247199, 0.8474219054161425, -0.2911114200705147, + 0.6929508883984918, -0.1956430812768431, -0.6939328865360421, + 0.2483504494478768, -0.9683359793089897, 0.02544573509917569, + 0.6772245592384751, -0.1544710170176507, 0.7193786216352178, + 0.8728676405153182, -0.2753850909104979, -0.4028214664655274, + -0.6939328865360421, 0.6929508883984918, -0.1956430812768431, + -0.2911114200705147, 0.4439935307247199, 0.8474219054161425, + 0.02544573509917569, 0.2483504494478768, -0.9683359793089897, + -0.3125247813732268, -0.8624267856909737, 0.3981812405806584, + 0.8002330777108455, -0.5610064819590194, 0.2118932479749939, + -0.3014203037319542, 0.7449023143403371, -0.5952027743454713, + 0.8070960223204652, 0.4323775329671103, -0.4020518371301871, + -0.9933840149261297, -0.05533076337050840, -0.1006315333982329, + 0.2118932479749939, 0.8002330777108455, -0.5610064819590194, + 0.3981812405806584, -0.3125247813732268, -0.8624267856909737, + -0.5952027743454713, -0.3014203037319542, 0.7449023143403371, + -0.4020518371301871, 0.8070960223204652, 0.4323775329671103, + -0.1006315333982329, -0.9933840149261297, -0.05533076337050840, + -0.8624267856909737, 0.3981812405806584, -0.3125247813732268, + -0.5610064819590194, 0.2118932479749939, 0.8002330777108455, + 0.7449023143403371, -0.5952027743454713, -0.3014203037319542, + 0.4323775329671103, -0.4020518371301871, 0.8070960223204652, + -0.05533076337050840, -0.1006315333982329, -0.9933840149261297, + -0.8070960223204652, 0.4323775329671103, 0.4020518371301871, + 0.3014203037319542, 0.7449023143403371, 0.5952027743454713, + -0.8002330777108455, -0.5610064819590194, -0.2118932479749939, + 0.3125247813732268, -0.8624267856909737, -0.3981812405806584, + 0.9933840149261297, -0.05533076337050840, 0.1006315333982329, + 0.4020518371301871, -0.8070960223204652, 0.4323775329671103, + -0.2118932479749939, -0.8002330777108455, -0.5610064819590194, + 0.5952027743454713, 0.3014203037319542, 0.7449023143403371, + -0.3981812405806584, 0.3125247813732268, -0.8624267856909737, + 0.1006315333982329, 0.9933840149261297, -0.05533076337050840, + 0.4323775329671103, 0.4020518371301871, -0.8070960223204652, + 0.7449023143403371, 0.5952027743454713, 0.3014203037319542, + -0.5610064819590194, -0.2118932479749939, -0.8002330777108455, + -0.8624267856909737, -0.3981812405806584, 0.3125247813732268, + -0.05533076337050840, 0.1006315333982329, 0.9933840149261297, + 0.3014203037319542, -0.7449023143403371, -0.5952027743454713, + 0.3125247813732268, 0.8624267856909737, 0.3981812405806584, + -0.8070960223204652, -0.4323775329671103, -0.4020518371301871, + -0.8002330777108455, 0.5610064819590194, 0.2118932479749939, + 0.9933840149261297, 0.05533076337050840, -0.1006315333982329, + -0.5952027743454713, 0.3014203037319542, -0.7449023143403371, + -0.4020518371301871, -0.8070960223204652, -0.4323775329671103, + 0.3981812405806584, 0.3125247813732268, 0.8624267856909737, + 0.2118932479749939, -0.8002330777108455, 0.5610064819590194, + -0.1006315333982329, 0.9933840149261297, 0.05533076337050840, + -0.7449023143403371, -0.5952027743454713, 0.3014203037319542, + 0.8624267856909737, 0.3981812405806584, 0.3125247813732268, + -0.4323775329671103, -0.4020518371301871, -0.8070960223204652, + 0.5610064819590194, 0.2118932479749939, -0.8002330777108455, + 0.05533076337050840, -0.1006315333982329, 0.9933840149261297, + 0.8002330777108455, 0.5610064819590194, -0.2118932479749939, + -0.3125247813732268, 0.8624267856909737, -0.3981812405806584, + -0.3014203037319542, -0.7449023143403371, 0.5952027743454713, + 0.8070960223204652, -0.4323775329671103, 0.4020518371301871, + -0.9933840149261297, 0.05533076337050840, 0.1006315333982329, + -0.2118932479749939, 0.8002330777108455, 0.5610064819590194, + -0.3981812405806584, -0.3125247813732268, 0.8624267856909737, + 0.4020518371301871, 0.8070960223204652, -0.4323775329671103, + 0.5952027743454713, -0.3014203037319542, -0.7449023143403371, + 0.1006315333982329, -0.9933840149261297, 0.05533076337050840, + 0.5610064819590194, -0.2118932479749939, 0.8002330777108455, + 0.8624267856909737, -0.3981812405806584, -0.3125247813732268, + -0.7449023143403371, 0.5952027743454713, -0.3014203037319542, + -0.4323775329671103, 0.4020518371301871, 0.8070960223204652, + 0.05533076337050840, 0.1006315333982329, -0.9933840149261297, + -0.2158430484474615, -0.8307114433711540, 0.5131571652906357, + 0.8619390876663625, -0.4314021311371882, 0.2663704383057005, + -0.3993093122339659, 0.7797783451525573, -0.4821802625516483, + 0.7485507008573488, 0.5639352967050958, -0.3487819223757268, + -0.9953374278422839, -0.08216074251380521, 0.05052738985823904, + 0.2663704383057005, 0.8619390876663625, -0.4314021311371882, + 0.5131571652906357, -0.2158430484474615, -0.8307114433711540, + -0.4821802625516483, -0.3993093122339659, 0.7797783451525573, + -0.3487819223757268, 0.7485507008573488, 0.5639352967050958, + 0.05052738985823904, -0.9953374278422839, -0.08216074251380521, + -0.8307114433711540, 0.5131571652906357, -0.2158430484474615, + -0.4314021311371882, 0.2663704383057005, 0.8619390876663625, + 0.7797783451525573, -0.4821802625516483, -0.3993093122339659, + 0.5639352967050958, -0.3487819223757268, 0.7485507008573488, + -0.08216074251380521, 0.05052738985823904, -0.9953374278422839, + -0.7485507008573488, 0.5639352967050958, 0.3487819223757268, + 0.3993093122339659, 0.7797783451525573, 0.4821802625516483, + -0.8619390876663625, -0.4314021311371882, -0.2663704383057005, + 0.2158430484474615, -0.8307114433711540, -0.5131571652906357, + 0.9953374278422839, -0.08216074251380521, -0.05052738985823904, + 0.3487819223757268, -0.7485507008573488, 0.5639352967050958, + -0.2663704383057005, -0.8619390876663625, -0.4314021311371882, + 0.4821802625516483, 0.3993093122339659, 0.7797783451525573, + -0.5131571652906357, 0.2158430484474615, -0.8307114433711540, + -0.05052738985823904, 0.9953374278422839, -0.08216074251380521, + 0.5639352967050958, 0.3487819223757268, -0.7485507008573488, + 0.7797783451525573, 0.4821802625516483, 0.3993093122339659, + -0.4314021311371882, -0.2663704383057005, -0.8619390876663625, + -0.8307114433711540, -0.5131571652906357, 0.2158430484474615, + -0.08216074251380521, -0.05052738985823904, 0.9953374278422839, + 0.3993093122339659, -0.7797783451525573, -0.4821802625516483, + 0.2158430484474615, 0.8307114433711540, 0.5131571652906357, + -0.7485507008573488, -0.5639352967050958, -0.3487819223757268, + -0.8619390876663625, 0.4314021311371882, 0.2663704383057005, + 0.9953374278422839, 0.08216074251380521, 0.05052738985823904, + -0.4821802625516483, 0.3993093122339659, -0.7797783451525573, + -0.3487819223757268, -0.7485507008573488, -0.5639352967050958, + 0.5131571652906357, 0.2158430484474615, 0.8307114433711540, + 0.2663704383057005, -0.8619390876663625, 0.4314021311371882, + 0.05052738985823904, 0.9953374278422839, 0.08216074251380521, + -0.7797783451525573, -0.4821802625516483, 0.3993093122339659, + 0.8307114433711540, 0.5131571652906357, 0.2158430484474615, + -0.5639352967050958, -0.3487819223757268, -0.7485507008573488, + 0.4314021311371882, 0.2663704383057005, -0.8619390876663625, + 0.08216074251380521, 0.05052738985823904, 0.9953374278422839, + 0.8619390876663625, 0.4314021311371882, -0.2663704383057005, + -0.2158430484474615, 0.8307114433711540, -0.5131571652906357, + -0.3993093122339659, -0.7797783451525573, 0.4821802625516483, + 0.7485507008573488, -0.5639352967050958, 0.3487819223757268, + -0.9953374278422839, 0.08216074251380521, -0.05052738985823904, + -0.2663704383057005, 0.8619390876663625, 0.4314021311371882, + -0.5131571652906357, -0.2158430484474615, 0.8307114433711540, + 0.3487819223757268, 0.7485507008573488, -0.5639352967050958, + 0.4821802625516483, -0.3993093122339659, -0.7797783451525573, + -0.05052738985823904, -0.9953374278422839, 0.08216074251380521, + 0.4314021311371882, -0.2663704383057005, 0.8619390876663625, + 0.8307114433711540, -0.5131571652906357, -0.2158430484474615, + -0.7797783451525573, 0.4821802625516483, -0.3993093122339659, + -0.5639352967050958, 0.3487819223757268, 0.7485507008573488, + 0.08216074251380521, -0.05052738985823904, -0.9953374278422839, + -0.1130841612998372, -0.7805765813249656, 0.6147456166172653, + 0.9039276003753406, -0.2918084561964478, 0.3126703026702797, + -0.4887681251285179, 0.7950931607513049, -0.3590718390306502, + 0.6717421417009299, 0.6820089994514677, -0.2891819837580753, + -0.9738174556479155, -0.1088344396240357, 0.1995861413704425, + 0.3126703026702797, 0.9039276003753406, -0.2918084561964478, + 0.6147456166172653, -0.1130841612998372, -0.7805765813249656, + -0.3590718390306502, -0.4887681251285179, 0.7950931607513049, + -0.2891819837580753, 0.6717421417009299, 0.6820089994514677, + 0.1995861413704425, -0.9738174556479155, -0.1088344396240357, + -0.7805765813249656, 0.6147456166172653, -0.1130841612998372, + -0.2918084561964478, 0.3126703026702797, 0.9039276003753406, + 0.7950931607513049, -0.3590718390306502, -0.4887681251285179, + 0.6820089994514677, -0.2891819837580753, 0.6717421417009299, + -0.1088344396240357, 0.1995861413704425, -0.9738174556479155, + -0.6717421417009299, 0.6820089994514677, 0.2891819837580753, + 0.4887681251285179, 0.7950931607513049, 0.3590718390306502, + -0.9039276003753406, -0.2918084561964478, -0.3126703026702797, + 0.1130841612998372, -0.7805765813249656, -0.6147456166172653, + 0.9738174556479155, -0.1088344396240357, -0.1995861413704425, + 0.2891819837580753, -0.6717421417009299, 0.6820089994514677, + -0.3126703026702797, -0.9039276003753406, -0.2918084561964478, + 0.3590718390306502, 0.4887681251285179, 0.7950931607513049, + -0.6147456166172653, 0.1130841612998372, -0.7805765813249656, + -0.1995861413704425, 0.9738174556479155, -0.1088344396240357, + 0.6820089994514677, 0.2891819837580753, -0.6717421417009299, + 0.7950931607513049, 0.3590718390306502, 0.4887681251285179, + -0.2918084561964478, -0.3126703026702797, -0.9039276003753406, + -0.7805765813249656, -0.6147456166172653, 0.1130841612998372, + -0.1088344396240357, -0.1995861413704425, 0.9738174556479155, + 0.4887681251285179, -0.7950931607513049, -0.3590718390306502, + 0.1130841612998372, 0.7805765813249656, 0.6147456166172653, + -0.6717421417009299, -0.6820089994514677, -0.2891819837580753, + -0.9039276003753406, 0.2918084561964478, 0.3126703026702797, + 0.9738174556479155, 0.1088344396240357, 0.1995861413704425, + -0.3590718390306502, 0.4887681251285179, -0.7950931607513049, + -0.2891819837580753, -0.6717421417009299, -0.6820089994514677, + 0.6147456166172653, 0.1130841612998372, 0.7805765813249656, + 0.3126703026702797, -0.9039276003753406, 0.2918084561964478, + 0.1995861413704425, 0.9738174556479155, 0.1088344396240357, + -0.7950931607513049, -0.3590718390306502, 0.4887681251285179, + 0.7805765813249656, 0.6147456166172653, 0.1130841612998372, + -0.6820089994514677, -0.2891819837580753, -0.6717421417009299, + 0.2918084561964478, 0.3126703026702797, -0.9039276003753406, + 0.1088344396240357, 0.1995861413704425, 0.9738174556479155, + 0.9039276003753406, 0.2918084561964478, -0.3126703026702797, + -0.1130841612998372, 0.7805765813249656, -0.6147456166172653, + -0.4887681251285179, -0.7950931607513049, 0.3590718390306502, + 0.6717421417009299, -0.6820089994514677, 0.2891819837580753, + -0.9738174556479155, 0.1088344396240357, -0.1995861413704425, + -0.3126703026702797, 0.9039276003753406, 0.2918084561964478, + -0.6147456166172653, -0.1130841612998372, 0.7805765813249656, + 0.2891819837580753, 0.6717421417009299, -0.6820089994514677, + 0.3590718390306502, -0.4887681251285179, -0.7950931607513049, + -0.1995861413704425, -0.9738174556479155, 0.1088344396240357, + 0.2918084561964478, -0.3126703026702797, 0.9039276003753406, + 0.7805765813249656, -0.6147456166172653, -0.1130841612998372, + -0.7950931607513049, 0.3590718390306502, -0.4887681251285179, + -0.6820089994514677, 0.2891819837580753, 0.6717421417009299, + 0.1088344396240357, -0.1995861413704425, -0.9738174556479155, + -0.008171344577070342, -0.7146834899990076, 0.6994002704107578, + 0.9253661398725655, -0.1478259322018894, 0.3490630329123808, + -0.5668575577971182, 0.7907617209301631, -0.2310160381442243, + 0.5800790710566051, 0.7825903763530927, -0.2259658694618077, + -0.9304163085549822, -0.1346044189424025, 0.3408916883353105, + 0.3490630329123808, 0.9253661398725655, -0.1478259322018894, + 0.6994002704107578, -0.008171344577070342, -0.7146834899990076, + -0.2310160381442243, -0.5668575577971182, 0.7907617209301631, + -0.2259658694618077, 0.5800790710566051, 0.7825903763530927, + 0.3408916883353105, -0.9304163085549822, -0.1346044189424025, + -0.7146834899990076, 0.6994002704107578, -0.008171344577070342, + -0.1478259322018894, 0.3490630329123808, 0.9253661398725655, + 0.7907617209301631, -0.2310160381442243, -0.5668575577971182, + 0.7825903763530927, -0.2259658694618077, 0.5800790710566051, + -0.1346044189424025, 0.3408916883353105, -0.9304163085549822, + -0.5800790710566051, 0.7825903763530927, 0.2259658694618077, + 0.5668575577971182, 0.7907617209301631, 0.2310160381442243, + -0.9253661398725655, -0.1478259322018894, -0.3490630329123808, + 0.008171344577070342, -0.7146834899990076, -0.6994002704107578, + 0.9304163085549822, -0.1346044189424025, -0.3408916883353105, + 0.2259658694618077, -0.5800790710566051, 0.7825903763530927, + -0.3490630329123808, -0.9253661398725655, -0.1478259322018894, + 0.2310160381442243, 0.5668575577971182, 0.7907617209301631, + -0.6994002704107578, 0.008171344577070342, -0.7146834899990076, + -0.3408916883353105, 0.9304163085549822, -0.1346044189424025, + 0.7825903763530927, 0.2259658694618077, -0.5800790710566051, + 0.7907617209301631, 0.2310160381442243, 0.5668575577971182, + -0.1478259322018894, -0.3490630329123808, -0.9253661398725655, + -0.7146834899990076, -0.6994002704107578, 0.008171344577070342, + -0.1346044189424025, -0.3408916883353105, 0.9304163085549822, + 0.5668575577971182, -0.7907617209301631, -0.2310160381442243, + 0.008171344577070342, 0.7146834899990076, 0.6994002704107578, + -0.5800790710566051, -0.7825903763530927, -0.2259658694618077, + -0.9253661398725655, 0.1478259322018894, 0.3490630329123808, + 0.9304163085549822, 0.1346044189424025, 0.3408916883353105, + -0.2310160381442243, 0.5668575577971182, -0.7907617209301631, + -0.2259658694618077, -0.5800790710566051, -0.7825903763530927, + 0.6994002704107578, 0.008171344577070342, 0.7146834899990076, + 0.3490630329123808, -0.9253661398725655, 0.1478259322018894, + 0.3408916883353105, 0.9304163085549822, 0.1346044189424025, + -0.7907617209301631, -0.2310160381442243, 0.5668575577971182, + 0.7146834899990076, 0.6994002704107578, 0.008171344577070342, + -0.7825903763530927, -0.2259658694618077, -0.5800790710566051, + 0.1478259322018894, 0.3490630329123808, -0.9253661398725655, + 0.1346044189424025, 0.3408916883353105, 0.9304163085549822, + 0.9253661398725655, 0.1478259322018894, -0.3490630329123808, + -0.008171344577070342, 0.7146834899990076, -0.6994002704107578, + -0.5668575577971182, -0.7907617209301631, 0.2310160381442243, + 0.5800790710566051, -0.7825903763530927, 0.2259658694618077, + -0.9304163085549822, 0.1346044189424025, -0.3408916883353105, + -0.3490630329123808, 0.9253661398725655, 0.1478259322018894, + -0.6994002704107578, -0.008171344577070342, 0.7146834899990076, + 0.2259658694618077, 0.5800790710566051, -0.7825903763530927, + 0.2310160381442243, -0.5668575577971182, -0.7907617209301631, + -0.3408916883353105, -0.9304163085549822, 0.1346044189424025, + 0.1478259322018894, -0.3490630329123808, 0.9253661398725655, + 0.7146834899990076, -0.6994002704107578, -0.008171344577070342, + -0.7907617209301631, 0.2310160381442243, -0.5668575577971182, + -0.7825903763530927, 0.2259658694618077, 0.5800790710566051, + 0.1346044189424025, -0.3408916883353105, -0.9304163085549822, + 0.5773502691896258, 0.5773502691896258, 0.5773502691896258, + 0.000000000000000E+00, 0.9341723589627157, 0.3568220897730899, + -0.3568220897730899, 0.000000000000000E+00, 0.9341723589627157, + -0.5773502691896258, 0.5773502691896258, 0.5773502691896258, + 0.3568220897730899, 0.000000000000000E+00, 0.9341723589627157, + 0.9341723589627157, -0.3568220897730899, 0.000000000000000E+00, + 0.5773502691896258, -0.5773502691896258, 0.5773502691896258, + 0.9341723589627157, 0.3568220897730899, 0.000000000000000E+00, + 0.000000000000000E+00, 0.9341723589627157, -0.3568220897730899, + 0.5773502691896258, 0.5773502691896258, -0.5773502691896258, + 0.3568220897730899, 0.000000000000000E+00, -0.9341723589627157, + -0.5773502691896258, 0.5773502691896258, -0.5773502691896258, + -0.3568220897730899, 0.000000000000000E+00, -0.9341723589627157, + -0.9341723589627157, 0.3568220897730899, 0.000000000000000E+00, + -0.5773502691896258, -0.5773502691896258, 0.5773502691896258, + -0.9341723589627157, -0.3568220897730899, 0.000000000000000E+00, + 0.000000000000000E+00, -0.9341723589627157, 0.3568220897730899, + 0.5773502691896258, -0.5773502691896258, -0.5773502691896258, + 0.000000000000000E+00, -0.9341723589627157, -0.3568220897730899, + -0.5773502691896258, -0.5773502691896258, -0.5773502691896258 + }; + +static constexpr std::array weights = { + 0.02127696997823895, + 0.02127696997823895, + 0.02127696997823895, + 0.02127696997823895, + 0.02127696997823895, + 0.02127696997823895, + 0.02127696997823895, + 0.02127696997823895, + 0.02127696997823895, + 0.02127696997823895, + 0.02127696997823895, + 0.02127696997823895, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02195218817219852, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02274585378530300, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02271945623561909, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02173053167669868, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02154428686760805, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02201530066216307, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02225823056828800, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02153833866975277, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02098163883176727, + 0.02309487232281995, + 0.02309487232281995, + 0.02309487232281995, + 0.02309487232281995, + 0.02309487232281995, + 0.02309487232281995, + 0.02309487232281995, + 0.02309487232281995, + 0.02309487232281995, + 0.02309487232281995, + 0.02309487232281995, + 0.02309487232281995, + 0.02309487232281995, + 0.02309487232281995, + 0.02309487232281995, + 0.02309487232281995, + 0.02309487232281995, + 0.02309487232281995, + 0.02309487232281995, + 0.02309487232281995 +}; +}; +}} diff --git a/include/integratorxx/quadratures/s2/ahrens_beylkin/ahrens_beylkin_grids.hpp b/include/integratorxx/quadratures/s2/ahrens_beylkin/ahrens_beylkin_grids.hpp index a08b39a..c6490e2 100644 --- a/include/integratorxx/quadratures/s2/ahrens_beylkin/ahrens_beylkin_grids.hpp +++ b/include/integratorxx/quadratures/s2/ahrens_beylkin/ahrens_beylkin_grids.hpp @@ -10,6 +10,7 @@ #include "ahrens_beylkin_432.hpp" #include "ahrens_beylkin_492.hpp" #include "ahrens_beylkin_552.hpp" +#include "ahrens_beylkin_572.hpp" #include "ahrens_beylkin_612.hpp" #include "ahrens_beylkin_672.hpp" #include "ahrens_beylkin_732.hpp" diff --git a/include/integratorxx/quadratures/s2/delley.hpp b/include/integratorxx/quadratures/s2/delley.hpp index bbb58e8..c7974ca 100644 --- a/include/integratorxx/quadratures/s2/delley.hpp +++ b/include/integratorxx/quadratures/s2/delley.hpp @@ -2,6 +2,7 @@ #include #include +#include #include #include @@ -85,6 +86,8 @@ struct quadrature_traits> { detail::copy_grid>(points, weights); else if(npts == 3470) detail::copy_grid>(points, weights); + else + detail::throw_unsupported_grid_size("Delley", npts); // Pretabulated weights are missing 4 pi for(auto i=0; i < npts; i++) diff --git a/include/integratorxx/quadratures/s2/lebedev_laikov.hpp b/include/integratorxx/quadratures/s2/lebedev_laikov.hpp index 6d5adb6..c59334f 100644 --- a/include/integratorxx/quadratures/s2/lebedev_laikov.hpp +++ b/include/integratorxx/quadratures/s2/lebedev_laikov.hpp @@ -3,6 +3,7 @@ #include #include #include +#include #include namespace IntegratorXX { @@ -105,8 +106,12 @@ struct quadrature_traits< LebedevLaikov > { detail::copy_grid>( points, weights ); else if( npts == 4802 ) detail::copy_grid>( points, weights ); + else if( npts == 5294 ) + detail::copy_grid>( points, weights ); else if( npts == 5810 ) detail::copy_grid>( points, weights ); + else + detail::throw_unsupported_grid_size("LebedevLaikov", npts); // Pretabulated weights are missing 4 pi for(size_t i=0; i < npts; i++) @@ -149,6 +154,7 @@ struct quadrature_traits< LebedevLaikov > { case 107: return 3890 ; case 113: return 4334 ; case 119: return 4802 ; + case 125: return 5294 ; case 131: return 5810 ; default: return -1; } @@ -188,6 +194,7 @@ struct quadrature_traits< LebedevLaikov > { case 3890: return 107 ; case 4334: return 113 ; case 4802: return 119 ; + case 5294: return 125 ; case 5810: return 131 ; default: return -1; } @@ -227,6 +234,7 @@ struct quadrature_traits< LebedevLaikov > { else if( order <= 107) return 107; else if( order <= 113) return 113; else if( order <= 119) return 119; + else if( order <= 125) return 125; else return 131; } diff --git a/include/integratorxx/quadratures/s2/womersley.hpp b/include/integratorxx/quadratures/s2/womersley.hpp index 6394f9d..a0f75b5 100644 --- a/include/integratorxx/quadratures/s2/womersley.hpp +++ b/include/integratorxx/quadratures/s2/womersley.hpp @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -184,6 +185,8 @@ struct quadrature_traits> { detail::copy_grid>(points, weights); else if(npts == 7939) detail::copy_grid>(points, weights); + else + detail::throw_unsupported_grid_size("Womersley", npts); } inline static std::tuple generate( @@ -319,6 +322,8 @@ struct quadrature_traits> { detail::copy_grid>(points, weights); else if(npts == 1986) detail::copy_grid>(points, weights); + else + detail::throw_unsupported_grid_size("Womersley", npts); return std::make_tuple(points, weights); } diff --git a/include/integratorxx/util/unsupported_grid.hpp b/include/integratorxx/util/unsupported_grid.hpp new file mode 100644 index 0000000..7315daf --- /dev/null +++ b/include/integratorxx/util/unsupported_grid.hpp @@ -0,0 +1,33 @@ +#pragma once + +#include +#include +#include + +namespace IntegratorXX { +namespace detail { + +/** + * @brief Report a request for an angular grid size that is not tabulated. + * + * The angular quadratures are only defined for the specific point counts + * that integrate spherical harmonics exactly up to a given algebraic + * order. Requesting any other size is a programming error rather than a + * recoverable condition, but it is diagnosed at runtime because the size + * is typically read from user input. + * + * @param[in] family Name of the angular quadrature family + * @param[in] npts Unsupported number of points that was requested + */ +[[noreturn]] inline void throw_unsupported_grid_size(const char* family, + size_t npts) { + throw std::runtime_error( + std::string("IntegratorXX: ") + family + " does not tabulate a " + + std::to_string(npts) + + "-point grid. Supported sizes are given by " + "quadrature_traits<" + + family + ">::npts_by_algebraic_order(order)."); +} + +} // namespace detail +} // namespace IntegratorXX diff --git a/test/spherical_generator.cxx b/test/spherical_generator.cxx index 8fbe482..b8bfaac 100644 --- a/test/spherical_generator.cxx +++ b/test/spherical_generator.cxx @@ -1,5 +1,7 @@ #include "catch2/catch_all.hpp" #include +#include +#include #include #include @@ -290,6 +292,57 @@ TEMPLATE_LIST_TEST_CASE("S2 Generator", "[sph-gen]", s2_test_types) { } +/// Exact value of \int_{S^2} x^{2a} y^{2b} z^{2c} d\Omega +static double exact_even_monomial(int a, int b, int c) { + auto dfact = [](int n) { double r = 1.0; for(int k = n; k > 1; k -= 2) r *= k; return r; }; + return 4.0 * M_PI * dfact(2*a-1) * dfact(2*b-1) * dfact(2*c-1) / + dfact(2*(a+b+c) + 1); +} + +TEMPLATE_LIST_TEST_CASE("S2 Grid Validity", "[sph-gen]", s2_test_types) { + using namespace IntegratorXX; + using angular_type = TestType; + using angular_traits = quadrature_traits; + + // Sizes that no angular scheme tabulates must be diagnosed rather than + // silently yielding a zero grid. + REQUIRE_THROWS_AS( angular_type(1), std::runtime_error ); + REQUIRE_THROWS_AS( angular_type(7), std::runtime_error ); + + // Every size advertised by the algebraic order tables must be dispatched + // and must integrate polynomials exactly up to its claimed order. A + // missing dispatch branch would return zero weights; a corrupt table + // would integrate low-order monomials incorrectly. + for( int64_t order = 0; order <= 200; ++order ) { + const auto npts = angular_traits::npts_by_algebraic_order(order); + if( npts < 0 ) continue; + + INFO( "algebraic order " << order << ", " << npts << " points" ); + angular_type aq(npts); + REQUIRE( aq.npts() == static_cast(npts) ); + + const auto& p = aq.points(); + const auto& w = aq.weights(); + + // Total degree 2*(a+b+c) must not exceed the claimed algebraic order. + // Capped for run time; degree 8 already exercises every table. + const int dmax = static_cast(std::min(order / 2, 4)); + for( int a = 0; a <= dmax; ++a ) + for( int b = 0; a + b <= dmax; ++b ) + for( int c = 0; a + b + c <= dmax; ++c ) { + double integral = 0.0; + for( size_t i = 0; i < aq.npts(); ++i ) + integral += w[i] * std::pow(p[i][0], 2*a) + * std::pow(p[i][1], 2*b) + * std::pow(p[i][2], 2*c); + + INFO( "monomial x^" << 2*a << " y^" << 2*b << " z^" << 2*c ); + REQUIRE_THAT( integral, + Catch::Matchers::WithinRel(exact_even_monomial(a,b,c), 1e-12) ); + } + } +} + using sph_test_types = std::tuple< std::tuple, std::tuple,