95 mWeights.push_back(5.0 / 18.0);
96 mWeights.push_back(4.0 / 9.0);
97 mWeights.push_back(5.0 / 18.0);
100 double sqrt_three_fifths = sqrt(3.0 / 5.0);
101 mPoints.push_back(
ChastePoint<1>((-sqrt_three_fifths + 1.0) / 2.0));
103 mPoints.push_back(
ChastePoint<1>((sqrt_three_fifths + 1.0) / 2.0));
107 EXCEPTION(
"Gauss quadrature order not supported.");
109 assert(mPoints.size() == mWeights.size());
110 mNumQuadPoints = mPoints.size();
112 else if constexpr (ELEMENT_DIM == 2)
114 double one_third = 1.0 / 3.0;
115 double one_sixth = 1.0 / 6.0;
116 double two_thirds = 2.0 / 3.0;
117 switch (quadratureOrder)
122 mWeights.push_back(0.5);
128 mWeights.push_back(one_sixth);
129 mWeights.push_back(one_sixth);
130 mWeights.push_back(one_sixth);
141 double w = 1.0 / 12.0;
142 mWeights.push_back(w);
143 mWeights.push_back(w);
144 mWeights.push_back(w);
145 mWeights.push_back(w);
146 mWeights.push_back(w);
147 mWeights.push_back(w);
149 double inverse_tan = atan(0.75);
150 double cos_third = cos(inverse_tan / 3.0);
151 double sin_third = sin(inverse_tan / 3.0);
153 double a = sin_third / (2 * sqrt(3.0)) - cos_third / 6.0 + 1.0 / 3.0;
155 double b = -sin_third / (2 * sqrt(3.0)) - cos_third / 6.0 + 1.0 / 3.0;
157 double c = cos_third / 3.0 + 1.0 / 3.0;
168 EXCEPTION(
"Gauss quadrature order not supported.");
170 assert(mPoints.size() == mWeights.size());
171 mNumQuadPoints = mPoints.size();
173 else if constexpr (ELEMENT_DIM == 3)
175 switch (quadratureOrder)
180 mWeights.push_back(1.0 / 6.0);
187 double sqrt_fifth = 1.0 / sqrt(5.0);
188 double a = (1.0 + 3.0 * sqrt_fifth) / 4.0;
189 double b = (1.0 - sqrt_fifth) / 4.0;
190 double w = 1.0 / 24.0;
192 mWeights.push_back(w);
193 mWeights.push_back(w);
194 mWeights.push_back(w);
195 mWeights.push_back(w);
214 double root_seventeen = sqrt(17.0);
215 double root_term = sqrt(1022.0 - 134.0 * root_seventeen);
216 double b = (55.0 - 3.0 * root_seventeen + root_term) / 196;
217 double d = (55.0 - 3.0 * root_seventeen - root_term) / 196;
219 double a = 1.0 - 3.0 * b;
220 double c = 1.0 - 3.0 * d;
223 double w1 = (20.0 * d * d - 10.0 * d + 1.0) / (240.0 * (2.0 * d * d - d - 2.0 * b * b + b));
224 double w2 = 1.0 / 24.0 - w1;
226 mWeights.push_back(w1);
227 mWeights.push_back(w1);
228 mWeights.push_back(w1);
229 mWeights.push_back(w1);
231 mWeights.push_back(w2);
232 mWeights.push_back(w2);
233 mWeights.push_back(w2);
234 mWeights.push_back(w2);
249 EXCEPTION(
"Gauss quadrature order not supported.");
251 assert(mPoints.size() == mWeights.size());
252 mNumQuadPoints = mPoints.size();
256 EXCEPTION(
"Gauss quadrature rule not available for this dimension.");