From f388b1e0bfda05b810ddf3f22242394f8bf47f79 Mon Sep 17 00:00:00 2001 From: Kristof Cools Date: Wed, 28 Aug 2024 14:02:04 +0200 Subject: [PATCH] Revert to using Array to store quadrules --- src/quadrature/triangle/TriangleDunavant.jl | 126 +++++++++--------- src/quadrature/triangle/TriangleGauss.jl | 98 +++++++------- .../triangle/TriangleQuadratures.jl | 18 ++- 3 files changed, 128 insertions(+), 114 deletions(-) diff --git a/src/quadrature/triangle/TriangleDunavant.jl b/src/quadrature/triangle/TriangleDunavant.jl index 71244d6..e827559 100644 --- a/src/quadrature/triangle/TriangleDunavant.jl +++ b/src/quadrature/triangle/TriangleDunavant.jl @@ -3,58 +3,58 @@ # Rules for the Triangle.” International Journal for Numerical Methods # in Engineering 21, no. 6 (1985): 1129–48. https://doi.org/10.1002/nme.1620210612. -const trianglequadDunavant1a = @SVector [ +const trianglequadDunavant1a = [ 0.333333333333333, ] -const trianglequadDunavant1b = @SVector [ +const trianglequadDunavant1b = [ 0.333333333333333, ] -const trianglequadDunavant1w = @SVector [ +const trianglequadDunavant1w = [ 1.000000000000000, ] -const trianglequadDunavant3a = @SVector [ +const trianglequadDunavant3a = [ 0.666666666666667, 0.166666666666667, 0.166666666666667, ] -const trianglequadDunavant3b = @SVector [ +const trianglequadDunavant3b = [ 0.166666666666667, 0.166666666666667, 0.666666666666667, ] -const trianglequadDunavant3w = @SVector [ +const trianglequadDunavant3w = [ 0.333333333333333, 0.333333333333333, 0.333333333333333, ] -const trianglequadDunavant4a = @SVector [ +const trianglequadDunavant4a = [ 0.333333333333333, 0.600000000000000, 0.200000000000000, 0.200000000000000, ] -const trianglequadDunavant4b = @SVector [ +const trianglequadDunavant4b = [ 0.333333333333333, 0.200000000000000, 0.200000000000000, 0.600000000000000, ] -const trianglequadDunavant4w = @SVector [ +const trianglequadDunavant4w = [ -0.562500000000000, 0.520833333333333, 0.520833333333333, 0.520833333333333, ] -const trianglequadDunavant6a = @SVector [ +const trianglequadDunavant6a = [ 0.108103018168070, 0.445948490915965, 0.445948490915965, @@ -63,7 +63,7 @@ const trianglequadDunavant6a = @SVector [ 0.091576213509771, ] -const trianglequadDunavant6b = @SVector [ +const trianglequadDunavant6b = [ 0.445948490915965, 0.445948490915965, 0.108103018168070, @@ -72,7 +72,7 @@ const trianglequadDunavant6b = @SVector [ 0.816847572980459, ] -const trianglequadDunavant6w = @SVector [ +const trianglequadDunavant6w = [ 0.223381589678011, 0.223381589678011, 0.223381589678011, @@ -81,7 +81,7 @@ const trianglequadDunavant6w = @SVector [ 0.109951743655322, ] -const trianglequadDunavant7a = @SVector [ +const trianglequadDunavant7a = [ 0.333333333333333, 0.059715871789770, 0.470142064105115, @@ -91,7 +91,7 @@ const trianglequadDunavant7a = @SVector [ 0.101286507323456, ] -const trianglequadDunavant7b = @SVector [ +const trianglequadDunavant7b = [ 0.333333333333333, 0.470142064105115, 0.470142064105115, @@ -101,7 +101,7 @@ const trianglequadDunavant7b = @SVector [ 0.797426985353087, ] -const trianglequadDunavant7w = @SVector [ +const trianglequadDunavant7w = [ 0.225000000000000, 0.132394152788506, 0.132394152788506, @@ -111,7 +111,7 @@ const trianglequadDunavant7w = @SVector [ 0.125939180544827, ] -const trianglequadDunavant12a = @SVector [ +const trianglequadDunavant12a = [ 0.501426509658179, 0.249286745170910, 0.249286745170910, @@ -126,7 +126,7 @@ const trianglequadDunavant12a = @SVector [ 0.053145049844817, ] -const trianglequadDunavant12b = @SVector [ +const trianglequadDunavant12b = [ 0.249286745170910, 0.249286745170910, 0.501426509658179, @@ -141,7 +141,7 @@ const trianglequadDunavant12b = @SVector [ 0.636502499121399, ] -const trianglequadDunavant12w = @SVector [ +const trianglequadDunavant12w = [ 0.116786275726379, 0.116786275726379, 0.116786275726379, @@ -156,7 +156,7 @@ const trianglequadDunavant12w = @SVector [ 0.082851075618374, ] -const trianglequadDunavant13a = @SVector [ +const trianglequadDunavant13a = [ 0.333333333333333, 0.479308067841920, 0.260345966079040, @@ -172,7 +172,7 @@ const trianglequadDunavant13a = @SVector [ 0.048690315425316, ] -const trianglequadDunavant13b = @SVector [ +const trianglequadDunavant13b = [ 0.333333333333333, 0.260345966079040, 0.260345966079040, @@ -188,7 +188,7 @@ const trianglequadDunavant13b = @SVector [ 0.638444188569810, ] -const trianglequadDunavant13w = @SVector [ +const trianglequadDunavant13w = [ -0.149570044467682, 0.175615257433208, 0.175615257433208, @@ -204,7 +204,7 @@ const trianglequadDunavant13w = @SVector [ 0.077113760890257, ] -const trianglequadDunavant16a = @SVector [ +const trianglequadDunavant16a = [ 0.333333333333333, 0.081414823414554, 0.459292588292723, @@ -223,7 +223,7 @@ const trianglequadDunavant16a = @SVector [ 0.008394777409958, ] -const trianglequadDunavant16b = @SVector [ +const trianglequadDunavant16b = [ 0.333333333333333, 0.459292588292723, 0.459292588292723, @@ -242,7 +242,7 @@ const trianglequadDunavant16b = @SVector [ 0.728492392955404, ] -const trianglequadDunavant16w = @SVector [ +const trianglequadDunavant16w = [ 0.144315607677787, 0.095091634267285, 0.095091634267285, @@ -261,7 +261,7 @@ const trianglequadDunavant16w = @SVector [ 0.027230314174435, ] -const trianglequadDunavant19a = @SVector [ +const trianglequadDunavant19a = [ 0.333333333333333, 0.020634961602525, 0.489682519198738, @@ -283,7 +283,7 @@ const trianglequadDunavant19a = @SVector [ 0.036838412054736, ] -const trianglequadDunavant19b = @SVector [ +const trianglequadDunavant19b = [ 0.333333333333333, 0.489682519198738, 0.489682519198738, @@ -305,7 +305,7 @@ const trianglequadDunavant19b = @SVector [ 0.741198598784498, ] -const trianglequadDunavant19w = @SVector [ +const trianglequadDunavant19w = [ 0.097135796282799, 0.031334700227139, 0.031334700227139, @@ -327,7 +327,7 @@ const trianglequadDunavant19w = @SVector [ 0.043283539377289, ] -const trianglequadDunavant25a = @SVector [ +const trianglequadDunavant25a = [ 0.333333333333333, 0.028844733232685, 0.485577633383657, @@ -355,7 +355,7 @@ const trianglequadDunavant25a = @SVector [ 0.009540815400299, ] -const trianglequadDunavant25b = @SVector [ +const trianglequadDunavant25b = [ 0.333333333333333, 0.485577633383657, 0.485577633383657, @@ -383,7 +383,7 @@ const trianglequadDunavant25b = @SVector [ 0.923655933587500, ] -const trianglequadDunavant25w = @SVector [ +const trianglequadDunavant25w = [ 0.090817990382754, 0.036725957756467, 0.036725957756467, @@ -411,7 +411,7 @@ const trianglequadDunavant25w = @SVector [ 0.009421666963733, ] -const trianglequadDunavant27a = @SVector [ +const trianglequadDunavant27a = [ -0.069222096541517, 0.534611048270758, 0.534611048270758, @@ -441,7 +441,7 @@ const trianglequadDunavant27a = @SVector [ 0.021022016536166, ] -const trianglequadDunavant27b = @SVector [ +const trianglequadDunavant27b = [ 0.534611048270758, 0.534611048270758, -0.069222096541517, @@ -471,7 +471,7 @@ const trianglequadDunavant27b = @SVector [ 0.807489003159792, ] -const trianglequadDunavant27w = @SVector [ +const trianglequadDunavant27w = [ 0.000927006328961, 0.000927006328961, 0.000927006328961, @@ -501,7 +501,7 @@ const trianglequadDunavant27w = @SVector [ 0.020707659639141, ] -const trianglequadDunavant33a = @SVector [ +const trianglequadDunavant33a = [ 0.023565220452390, 0.488217389773805, 0.488217389773805, @@ -537,7 +537,7 @@ const trianglequadDunavant33a = @SVector [ 0.025734050548330, ] -const trianglequadDunavant33b = @SVector [ +const trianglequadDunavant33b = [ 0.488217389773805, 0.488217389773805, 0.023565220452390, @@ -573,7 +573,7 @@ const trianglequadDunavant33b = @SVector [ 0.858014033544073, ] -const trianglequadDunavant33w = @SVector [ +const trianglequadDunavant33w = [ 0.025731066440455, 0.025731066440455, 0.025731066440455, @@ -609,7 +609,7 @@ const trianglequadDunavant33w = @SVector [ 0.017316231108659, ] -const trianglequadDunavant37a = @SVector [ +const trianglequadDunavant37a = [ 0.333333333333333, 0.009903630120591, 0.495048184939705, @@ -649,7 +649,7 @@ const trianglequadDunavant37a = @SVector [ 0.022233076674090, ] -const trianglequadDunavant37b = @SVector [ +const trianglequadDunavant37b = [ 0.333333333333333, 0.495048184939705, 0.495048184939705, @@ -689,7 +689,7 @@ const trianglequadDunavant37b = @SVector [ 0.851409537834241, ] -const trianglequadDunavant37w = @SVector [ +const trianglequadDunavant37w = [ 0.052520923400802, 0.011280145209330, 0.011280145209330, @@ -729,7 +729,7 @@ const trianglequadDunavant37w = @SVector [ 0.015521786839045, ] -const trianglequadDunavant42a = @SVector [ +const trianglequadDunavant42a = [ 0.022072179275643, 0.488963910362179, 0.488963910362179, @@ -774,7 +774,7 @@ const trianglequadDunavant42a = @SVector [ 0.001268330932872, ] -const trianglequadDunavant42b = @SVector [ +const trianglequadDunavant42b = [ 0.488963910362179, 0.488963910362179, 0.022072179275643, @@ -819,7 +819,7 @@ const trianglequadDunavant42b = @SVector [ 0.879757171370171, ] -const trianglequadDunavant42w = @SVector [ +const trianglequadDunavant42w = [ 0.021883581369429, 0.021883581369429, 0.021883581369429, @@ -864,7 +864,7 @@ const trianglequadDunavant42w = @SVector [ 0.005010228838501, ] -const trianglequadDunavant48a = @SVector [ +const trianglequadDunavant48a = [ -0.013945833716486, 0.506972916858243, 0.506972916858243, @@ -915,7 +915,7 @@ const trianglequadDunavant48a = @SVector [ 0.012459809331199, ] -const trianglequadDunavant48b = @SVector [ +const trianglequadDunavant48b = [ 0.506972916858243, 0.506972916858243, -0.013945833716486, @@ -966,7 +966,7 @@ const trianglequadDunavant48b = @SVector [ 0.883964574092416, ] -const trianglequadDunavant48w = @SVector [ +const trianglequadDunavant48w = [ 0.001916875642849, 0.001916875642849, 0.001916875642849, @@ -1017,7 +1017,7 @@ const trianglequadDunavant48w = @SVector [ 0.007673942631049, ] -const trianglequadDunavant52a = @SVector [ +const trianglequadDunavant52a = [ 0.333333333333333, 0.005238916103123, 0.497380541948438, @@ -1072,7 +1072,7 @@ const trianglequadDunavant52a = @SVector [ 0.014317320230681, ] -const trianglequadDunavant52b = @SVector [ +const trianglequadDunavant52b = [ 0.333333333333333, 0.497380541948438, 0.497380541948438, @@ -1127,7 +1127,7 @@ const trianglequadDunavant52b = @SVector [ 0.900399064086661, ] -const trianglequadDunavant52w = @SVector [ +const trianglequadDunavant52w = [ 0.046875697427642, 0.006405878578585, 0.006405878578585, @@ -1182,7 +1182,7 @@ const trianglequadDunavant52w = @SVector [ 0.006850054546542, ] -const trianglequadDunavant61a = @SVector [ +const trianglequadDunavant61a = [ 0.333333333333333, 0.005658918886452, 0.497170540556774, @@ -1246,7 +1246,7 @@ const trianglequadDunavant61a = @SVector [ 0.014663182224828, ] -const trianglequadDunavant61b = @SVector [ +const trianglequadDunavant61b = [ 0.333333333333333, 0.497170540556774, 0.497170540556774, @@ -1310,7 +1310,7 @@ const trianglequadDunavant61b = @SVector [ 0.904625504095608, ] -const trianglequadDunavant61w = @SVector [ +const trianglequadDunavant61w = [ 0.033437199290803, 0.005093415440507, 0.005093415440507, @@ -1374,7 +1374,7 @@ const trianglequadDunavant61w = @SVector [ 0.006665632004165, ] -const trianglequadDunavant70a = @SVector [ +const trianglequadDunavant70a = [ 0.333333333333333, 0.013310382738157, 0.493344808630921, @@ -1447,7 +1447,7 @@ const trianglequadDunavant70a = @SVector [ -0.035222015287949, ] -const trianglequadDunavant70b = @SVector [ +const trianglequadDunavant70b = [ 0.333333333333333, 0.493344808630921, 0.493344808630921, @@ -1520,7 +1520,7 @@ const trianglequadDunavant70b = @SVector [ 1.014347260005363, ] -const trianglequadDunavant70w = @SVector [ +const trianglequadDunavant70w = [ 0.030809939937647, 0.009072436679404, 0.009072436679404, @@ -1593,7 +1593,7 @@ const trianglequadDunavant70w = @SVector [ 0.000046187660794, ] -const trianglequadDunavant73a = @SVector [ +const trianglequadDunavant73a = [ 0.333333333333333, 0.020780025853987, 0.489609987073006, @@ -1669,7 +1669,7 @@ const trianglequadDunavant73a = @SVector [ 0.010161119296278, ] -const trianglequadDunavant73b = @SVector [ +const trianglequadDunavant73b = [ 0.333333333333333, 0.489609987073006, 0.489609987073006, @@ -1745,7 +1745,7 @@ const trianglequadDunavant73b = @SVector [ 0.924344252620784, ] -const trianglequadDunavant73w = @SVector [ +const trianglequadDunavant73w = [ 0.032906331388919, 0.010330731891272, 0.010330731891272, @@ -1821,7 +1821,7 @@ const trianglequadDunavant73w = @SVector [ 0.003799928855302, ] -const trianglequadDunavant79a = @SVector [ +const trianglequadDunavant79a = [ 0.333333333333333, -0.001900928704400, 0.500950464352200, @@ -1903,7 +1903,7 @@ const trianglequadDunavant79a = @SVector [ 0.010547719294141, ] -const trianglequadDunavant79b = @SVector [ +const trianglequadDunavant79b = [ 0.333333333333333, 0.500950464352200, 0.500950464352200, @@ -1985,7 +1985,7 @@ const trianglequadDunavant79b = @SVector [ 0.929756171556853, ] -const trianglequadDunavant79w = @SVector [ +const trianglequadDunavant79w = [ 0.033057055541624, 0.000867019185663, 0.000867019185663, @@ -2067,7 +2067,7 @@ const trianglequadDunavant79w = @SVector [ 0.003573909385950, ] -const trianglequadDunavantA = @SVector [ +const trianglequadDunavantA = [ trianglequadDunavant1a, trianglequadDunavant3a, trianglequadDunavant4a, @@ -2090,7 +2090,7 @@ const trianglequadDunavantA = @SVector [ trianglequadDunavant79a ] -const trianglequadDunavantB = @SVector [ +const trianglequadDunavantB = [ trianglequadDunavant1b, trianglequadDunavant3b, trianglequadDunavant4b, @@ -2113,7 +2113,7 @@ const trianglequadDunavantB = @SVector [ trianglequadDunavant79b ] -const trianglequadDunavantW = @SVector [ +const trianglequadDunavantW = [ trianglequadDunavant1w, trianglequadDunavant3w, trianglequadDunavant4w, diff --git a/src/quadrature/triangle/TriangleGauss.jl b/src/quadrature/triangle/TriangleGauss.jl index 94bd6cb..907993b 100644 --- a/src/quadrature/triangle/TriangleGauss.jl +++ b/src/quadrature/triangle/TriangleGauss.jl @@ -5,75 +5,75 @@ # TODO: Add reference to higher order cubature rules -const trianglequadGauss1a = @SVector [ +const trianglequadGauss1a = [ 0.333333333333333, ] -const trianglequadGauss1b = @SVector [ +const trianglequadGauss1b = [ 0.333333333333333, ] -const trianglequadGauss1c = @SVector [ +const trianglequadGauss1c = [ 0.333333333333333, ] -const trianglequadGauss1w = @SVector [ +const trianglequadGauss1w = [ 1.0, ] -const trianglequadGauss3a = @SVector [ +const trianglequadGauss3a = [ 0.666666666666667, 0.166666666666667, 0.166666666666667, ] -const trianglequadGauss3b = @SVector [ +const trianglequadGauss3b = [ 0.166666666666667, 0.666666666666667, 0.166666666666667, ] -const trianglequadGauss3c = @SVector [ +const trianglequadGauss3c = [ 0.166666666666667, 0.166666666666667, 0.666666666666667, ] -const trianglequadGauss3w = @SVector [ +const trianglequadGauss3w = [ 0.333333333333333, 0.333333333333333, 0.333333333333333, ] -const trianglequadGauss4a = @SVector [ +const trianglequadGauss4a = [ 0.333333333333333, 0.6, 0.2, 0.2, ] -const trianglequadGauss4b = @SVector [ +const trianglequadGauss4b = [ 0.333333333333333, 0.2, 0.6, 0.2, ] -const trianglequadGauss4c = @SVector [ +const trianglequadGauss4c = [ 0.333333333333333, 0.2, 0.2, 0.6, ] -const trianglequadGauss4w = @SVector [ +const trianglequadGauss4w = [ -0.562500000000000, 0.520833333333333, 0.520833333333333, 0.520833333333333, ] -const trianglequadGauss6a = @SVector [ +const trianglequadGauss6a = [ 0.816847572980459, 0.091576213509771, 0.091576213509771, @@ -82,7 +82,7 @@ const trianglequadGauss6a = @SVector [ 0.445948490915965, ] -const trianglequadGauss6b = @SVector [ +const trianglequadGauss6b = [ 0.091576213509771, 0.816847572980459, 0.091576213509771, @@ -91,7 +91,7 @@ const trianglequadGauss6b = @SVector [ 0.445948490915965, ] -const trianglequadGauss6c = @SVector [ +const trianglequadGauss6c = [ 0.091576213509771, 0.091576213509771, 0.816847572980459, @@ -100,7 +100,7 @@ const trianglequadGauss6c = @SVector [ 0.108103018168070, ] -const trianglequadGauss6w = @SVector [ +const trianglequadGauss6w = [ 0.109951743655322, 0.109951743655322, 0.109951743655322, @@ -109,7 +109,7 @@ const trianglequadGauss6w = @SVector [ 0.223381589678011, ] -const trianglequadGauss7a = @SVector [ +const trianglequadGauss7a = [ 0.333333333333333, 0.797426985353087, 0.101286507323456, @@ -119,7 +119,7 @@ const trianglequadGauss7a = @SVector [ 0.470142064105115, ] -const trianglequadGauss7b = @SVector [ +const trianglequadGauss7b = [ 0.333333333333333, 0.101286507323456, 0.797426985353087, @@ -129,7 +129,7 @@ const trianglequadGauss7b = @SVector [ 0.470142064105115, ] -const trianglequadGauss7c = @SVector [ +const trianglequadGauss7c = [ 0.333333333333333, 0.101286507323456, 0.101286507323456, @@ -139,7 +139,7 @@ const trianglequadGauss7c = @SVector [ 0.059715871789770, ] -const trianglequadGauss7w = @SVector [ +const trianglequadGauss7w = [ 0.225000000000000, 0.125939180544827, 0.125939180544827, @@ -149,7 +149,7 @@ const trianglequadGauss7w = @SVector [ 0.132394152788506, ] -const trianglequadGauss12a = @SVector [ +const trianglequadGauss12a = [ 0.873821971016996, 0.063089014491502, 0.063089014491502, @@ -164,7 +164,7 @@ const trianglequadGauss12a = @SVector [ 0.053145049844816, ] -const trianglequadGauss12b = @SVector [ +const trianglequadGauss12b = [ 0.063089014491502, 0.873821971016996, 0.063089014491502, @@ -179,7 +179,7 @@ const trianglequadGauss12b = @SVector [ 0.310352451033785, ] -const trianglequadGauss12c = @SVector [ +const trianglequadGauss12c = [ 0.063089014491502, 0.063089014491502, 0.873821971016996, @@ -194,7 +194,7 @@ const trianglequadGauss12c = @SVector [ 0.636502499121399, ] -const trianglequadGauss12w = @SVector [ +const trianglequadGauss12w = [ 0.050844906370207, 0.050844906370207, 0.050844906370207, @@ -209,7 +209,7 @@ const trianglequadGauss12w = @SVector [ 0.082851075618374, ] -const trianglequadGauss13a = @SVector [ +const trianglequadGauss13a = [ 0.333333333333333, 0.479308067841923, 0.260345966079038, @@ -225,7 +225,7 @@ const trianglequadGauss13a = @SVector [ 0.0486903154253160, ] -const trianglequadGauss13b = @SVector [ +const trianglequadGauss13b = [ 0.333333333333333, 0.260345966079038, 0.479308067841923, @@ -241,7 +241,7 @@ const trianglequadGauss13b = @SVector [ 0.312865496004875, ] -const trianglequadGauss13c = @SVector [ +const trianglequadGauss13c = [ 0.333333333333333, 0.260345966079038, 0.260345966079038, @@ -257,7 +257,7 @@ const trianglequadGauss13c = @SVector [ 0.638444188569809, ] -const trianglequadGauss13w = @SVector [ +const trianglequadGauss13w = [ -0.149570044467670, 0.175615257433204, 0.175615257433204, @@ -273,7 +273,7 @@ const trianglequadGauss13w = @SVector [ 0.077113760890257, ] -const trianglequadGauss36a = @SVector [ +const trianglequadGauss36a = [ 0.0242935351590, 0.0265193427722, 0.9492126023551, @@ -312,7 +312,7 @@ const trianglequadGauss36a = @SVector [ 0.2305424298836 ] -const trianglequadGauss36b = @SVector [ +const trianglequadGauss36b = [ 0.9493059293846, 0.0242695130640, 0.0265067966437, @@ -351,7 +351,7 @@ const trianglequadGauss36b = @SVector [ 0.3456013949376 ] -const trianglequadGauss36w = (@SVector [ +const trianglequadGauss36w = ( [ 0.0166240998757, 0.0166811699778, 0.0166830569067, @@ -390,7 +390,7 @@ const trianglequadGauss36w = (@SVector [ 0.1035854367193 ]) ./ 2 -const trianglequadGauss78a = @SVector [ +const trianglequadGauss78a = [ 0.0089411337112, 0.9792622629807, 0.0105475382112, @@ -471,7 +471,7 @@ const trianglequadGauss78a = @SVector [ 0.3729077987144 ] -const trianglequadGauss78b = @SVector [ +const trianglequadGauss78b = [ 0.0086983293702, 0.0102644133744, 0.9785514202515, @@ -552,7 +552,7 @@ const trianglequadGauss78b = @SVector [ 0.3753750277549 ] -const trianglequadGauss78w = (@SVector [ +const trianglequadGauss78w = ( [ 0.0021744545399, 0.0028987135265, 0.0030846029337, @@ -633,7 +633,7 @@ const trianglequadGauss78w = (@SVector [ 0.0637206605672 ]) ./ 2 -const trianglequadGauss105a = @SVector [ +const trianglequadGauss105a = [ 0.0087809303836, 0.9903675314220, 0.0027029276450, @@ -741,7 +741,7 @@ const trianglequadGauss105a = @SVector [ 0.4098894602340 ] -const trianglequadGauss105b = @SVector [ +const trianglequadGauss105b = [ 0.9903676436772, 0.0087809216232, 0.0335914404439, @@ -849,7 +849,7 @@ const trianglequadGauss105b = @SVector [ 0.4098894317792, ] -const trianglequadGauss105w = (@SVector [ +const trianglequadGauss105w = ( [ 0.0006438298261, 0.0006438413076, 0.0010134735710, @@ -957,7 +957,7 @@ const trianglequadGauss105w = (@SVector [ 0.0398766879831 ]) ./ 2 -const trianglequadGauss120a = @SVector [ +const trianglequadGauss120a = [ 0.0082881595033, 0.4618422030241, 0.0071066441239, @@ -1080,7 +1080,7 @@ const trianglequadGauss120a = @SVector [ 0.3361523347440 ] -const trianglequadGauss120b = @SVector [ +const trianglequadGauss120b = [ 0.9848202768869, 0.5381577969759, 0.0080842361390, @@ -1203,7 +1203,7 @@ const trianglequadGauss120b = @SVector [ 0.2778500044356 ] -const trianglequadGauss120w = (@SVector [ +const trianglequadGauss120w = ( [ 0.0014873417859, 0.0014889035262, 0.0015005944380, @@ -1326,7 +1326,7 @@ const trianglequadGauss120w = (@SVector [ 0.0371924811018 ]) ./ 2 -const trianglequadGauss400a = @SVector [ +const trianglequadGauss400a = [ 3.4357004074525577e-03, 3.4357004074525577e-03, 3.4357004074525577e-03, 3.4357004074525577e-03, 3.4357004074525577e-03, 3.4357004074525577e-03, 3.4357004074525577e-03, 3.4357004074525577e-03, 3.4357004074525577e-03, 3.4357004074525577e-03, 3.4357004074525577e-03, 3.4357004074525577e-03, 3.4357004074525577e-03, 3.4357004074525577e-03, 3.4357004074525577e-03, @@ -1408,7 +1408,7 @@ const trianglequadGauss400a = @SVector [ 9.9656429959254744e-01, 9.9656429959254744e-01, 9.9656429959254744e-01, 9.9656429959254744e-01, 9.9656429959254744e-01, 9.9656429959254744e-01, 9.9656429959254744e-01, 9.9656429959254744e-01, 9.9656429959254744e-01, 9.9656429959254744e-01 ] -const trianglequadGauss400b = @SVector [ +const trianglequadGauss400b = [ 3.4238963701627881e-03, 1.7952145528977594e-02, 4.3732017769028415e-02, 8.0165141146159247e-02, 1.2639828298375833e-01, 1.8134795437803311e-01, 2.4372624180423841e-01, 3.1207107651919747e-01, 3.8478052619624081e-01, 4.6015035032944468e-01, 5.3641394926310271e-01, 6.1178377339630663e-01, 6.8449322307334992e-01, 7.5283805778830903e-01, 8.1521634521451436e-01, @@ -1490,7 +1490,7 @@ const trianglequadGauss400b = @SVector [ 1.8493113036459207e-03, 2.1091521745159178e-03, 2.3598212843598133e-03, 2.5954431871045409e-03, 2.8104951487431724e-03, 2.9999366212862710e-03, 3.1593274647212558e-03, 3.2849323021439448e-03, 3.3738095753870568e-03, 3.4238963701627881e-03 ] -const trianglequadGauss400w = (@SVector [ +const trianglequadGauss400w = ( [ 3.0918731028920757e-04, 7.1269681990617786e-04, 1.1001132168084852e-03, 1.4617975077641802e-03, 1.7892294090025515e-03, 2.0747266161171671e-03, 2.3115952886863795e-03, 2.4942827316709218e-03, 2.6185066288951639e-03, 2.6813551585055523e-03, 2.6813551585055523e-03, 2.6185066288951639e-03, 2.4942827316709218e-03, 2.3115952886863795e-03, 2.0747266161171671e-03, @@ -1572,7 +1572,7 @@ const trianglequadGauss400w = (@SVector [ 9.2440929444984856e-06, 9.0274198017032943e-06, 8.5991523085940462e-06, 7.9693291024496169e-06, 7.1527136615879260e-06, 6.1684491528038026e-06, 5.0396128931087845e-06, 3.7926899737209111e-06, 2.4570544575427101e-06, 1.0659372088425298e-06 ]) ./ 2 -const trianglequadGauss900a = @SVector [ +const trianglequadGauss900a = [ 1.5532579626752474e-03, 1.5532579626752474e-03, 1.5532579626752474e-03, 1.5532579626752474e-03, 1.5532579626752474e-03, 1.5532579626752474e-03, 1.5532579626752474e-03, 1.5532579626752474e-03, 1.5532579626752474e-03, 1.5532579626752474e-03, 1.5532579626752474e-03, 1.5532579626752474e-03, 1.5532579626752474e-03, 1.5532579626752474e-03, 1.5532579626752474e-03, @@ -1754,7 +1754,7 @@ const trianglequadGauss900a = @SVector [ 9.9844674203732475e-01, 9.9844674203732475e-01, 9.9844674203732475e-01, 9.9844674203732475e-01, 9.9844674203732475e-01, 9.9844674203732475e-01, 9.9844674203732475e-01, 9.9844674203732475e-01, 9.9844674203732475e-01, 9.9844674203732475e-01 ] -const trianglequadGauss900b = @SVector [ +const trianglequadGauss900b = [ 1.5508453523766334e-03, 8.1532545513458305e-03, 1.9958019337560785e-02, 3.6842661103375078e-02, 5.8628525212516977e-02, 8.5084754640270099e-02, 1.1593093317123887e-01, 1.5084009454090175e-01, 1.8944219814142918e-01, 2.3132805481318516e-01, 2.7605366563067762e-01, 3.2314492896492530e-01, 3.7210266635129818e-01, 4.2240791404863498e-01, 4.7352742426565486e-01, @@ -1936,7 +1936,7 @@ const trianglequadGauss900b = @SVector [ 1.1933868468703306e-03, 1.2585475987258832e-03, 1.3185999002349133e-03, 1.3729071863272115e-03, 1.4208937943295222e-03, 1.4620510712185931e-03, 1.4959427806874798e-03, 1.5222097843898060e-03, 1.5405741538946657e-03, 1.5508453523766334e-03 ] -const trianglequadGauss900w = (@SVector [ +const trianglequadGauss900w = ( [ 6.3393472058975955e-05, 1.4691582105612550e-04, 2.2900583486229500e-04, 3.0867923073618977e-04, 3.8508275109363019e-04, 4.5740496279664960e-04, 5.2487882297804151e-04, 5.8678895194472442e-04, 6.4247903025549066e-04, 6.9135870330888595e-04, 7.3290982143010656e-04, 7.6669192547512504e-04, 7.9234691283714938e-04, 8.0960283204461417e-04, 8.1827676484210919e-04, @@ -2118,7 +2118,7 @@ const trianglequadGauss900w = (@SVector [ 1.0755289849393060e-06, 9.9948813249661188e-07, 9.1285250744394168e-07, 8.1654050927813780e-07, 7.1157315730367923e-07, 5.9906334934258464e-07, 4.8020435429046972e-07, 3.5625849784750484e-07, 2.2855317093104202e-07, 9.8619596931444806e-08 ]) ./ 2 -const trianglequadGaussA = @SVector [ +const trianglequadGaussA = [ trianglequadGauss1a, trianglequadGauss3a, trianglequadGauss4a, @@ -2134,7 +2134,7 @@ const trianglequadGaussA = @SVector [ trianglequadGauss900a ] -const trianglequadGaussB = @SVector [ +const trianglequadGaussB = [ trianglequadGauss1b, trianglequadGauss3b, trianglequadGauss4b, @@ -2150,7 +2150,7 @@ const trianglequadGaussB = @SVector [ trianglequadGauss900b ] -const trianglequadGaussW = @SVector [ +const trianglequadGaussW = [ trianglequadGauss1w, trianglequadGauss3w, trianglequadGauss4w, diff --git a/src/quadrature/triangle/TriangleQuadratures.jl b/src/quadrature/triangle/TriangleQuadratures.jl index b6f564d..d549dcf 100644 --- a/src/quadrature/triangle/TriangleQuadratures.jl +++ b/src/quadrature/triangle/TriangleQuadratures.jl @@ -27,9 +27,19 @@ function trgauss(n) end function trgauss(trqd::TriangleQuadDunavant) + # n = trqd.order + # @assert 1 <= n <= length(trianglequadDunavantA) + # u = copy(transpose([trianglequadDunavantA[n] trianglequadDunavantB[n]])) + # w = trianglequadDunavantW[n] + # return u, w/2 + n = trqd.order @assert 1 <= n <= length(trianglequadDunavantA) - u = copy(transpose([trianglequadDunavantA[n] trianglequadDunavantB[n]])) + A = trianglequadDunavantA[n] + B = trianglequadDunavantB[n] + T = eltype(A) + AB = [A, B] + u = T[AB[i][j] for i in (1,2), j in 1:length(A)] w = trianglequadDunavantW[n] return u, w/2 end @@ -37,7 +47,11 @@ end function trgauss(trqd::TriangleQuadLegacy) n = trqd.order @assert 1 <= n <= length(trianglequadGaussA) - u = copy(transpose([trianglequadGaussA[n] trianglequadGaussB[n]])) + A = trianglequadGaussA[n] + B = trianglequadGaussB[n] + T = eltype(A) + AB = [A, B] + u = T[AB[i][j] for i in (1,2), j in 1:length(A)] w = trianglequadGaussW[n] return u, w/2 end \ No newline at end of file