BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
fn_intpoints_gauss_tri55.hpp
Go to the documentation of this file.
1/*
2 * BELFEM -- The Berkeley Lab Finite Element Framework
3 * Copyright (c) 2026, The Regents of the University of California,
4 * through Lawrence Berkeley National Laboratory (subject to receipt of any required
5 * approvals from the U.S. Dept. of Energy). All rights reserved.
6 *
7 * Developers: Christian Messe, Gregory Giard
8 *
9 * See the top-level LICENSE file for the complete license and disclaimer.
10 */
11
12#ifndef BELFEM_FN_INTPOINTS_GAUSS_TRI55_HPP
13#define BELFEM_FN_INTPOINTS_GAUSS_TRI55_HPP
14
15#include "typedefs.hpp"
16#include "cl_Vector.hpp"
17#include "cl_Matrix.hpp"
18#include "fn_sum.hpp"
19
20namespace belfem
21{
22 namespace integration
23 {
24// ----------------------------------------------------------------------------
25
34 inline void
36 Vector< real > & aWeights,
37 Matrix< real > & aPoints )
38 {
39 aPoints.set_size( 3, 55 );
40
41 aPoints( 0, 0 ) = 1./3.;
42 aPoints( 1, 0 ) = 1./3.;
43
44 aPoints( 0, 1 ) = 0.06667447224023837;
45 aPoints( 1, 1 ) = 0.06667447224023837;
46
47 aPoints( 0, 2 ) = 0.24132168070137838;
48 aPoints( 1, 2 ) = 0.24132168070137838;
49
50 aPoints( 0, 3 ) = 0.41279809595522365;
51 aPoints( 1, 3 ) = 0.41279809595522365;
52
53 aPoints( 0, 4 ) = 0.15006373658703515;
54 aPoints( 1, 4 ) = 0.15006373658703515;
55
56 aPoints( 0, 5 ) = 0.46954803099668496;
57 aPoints( 1, 5 ) = 0.46954803099668496;
58
59 aPoints( 0, 6 ) = 0.017041629405718517;
60 aPoints( 1, 6 ) = 0.017041629405718517;
61
62 aPoints( 0, 7 ) = 0.06667447224023837;
63 aPoints( 1, 7 ) = 0.8666510555195233;
64
65 aPoints( 0, 8 ) = 0.24132168070137838;
66 aPoints( 1, 8 ) = 0.5173566385972432;
67
68 aPoints( 0, 9 ) = 0.41279809595522365;
69 aPoints( 1, 9 ) = 0.1744038080895527;
70
71 aPoints( 0, 10 ) = 0.15006373658703515;
72 aPoints( 1, 10 ) = 0.6998725268259297;
73
74 aPoints( 0, 11 ) = 0.46954803099668496;
75 aPoints( 1, 11 ) = 0.060903938006630076;
76
77 aPoints( 0, 12 ) = 0.017041629405718517;
78 aPoints( 1, 12 ) = 0.965916741188563;
79
80 aPoints( 0, 13 ) = 0.8666510555195233;
81 aPoints( 1, 13 ) = 0.06667447224023837;
82
83 aPoints( 0, 14 ) = 0.5173566385972432;
84 aPoints( 1, 14 ) = 0.24132168070137838;
85
86 aPoints( 0, 15 ) = 0.1744038080895527;
87 aPoints( 1, 15 ) = 0.41279809595522365;
88
89 aPoints( 0, 16 ) = 0.6998725268259297;
90 aPoints( 1, 16 ) = 0.15006373658703515;
91
92 aPoints( 0, 17 ) = 0.060903938006630076;
93 aPoints( 1, 17 ) = 0.46954803099668496;
94
95 aPoints( 0, 18 ) = 0.965916741188563;
96 aPoints( 1, 18 ) = 0.017041629405718517;
97
98 aPoints( 0, 19 ) = 0.009664954403660254;
99 aPoints( 1, 19 ) = 0.41376948582708517;
100
101 aPoints( 0, 20 ) = 0.030305943355186365;
102 aPoints( 1, 20 ) = 0.30417944822947973;
103
104 aPoints( 0, 21 ) = 0.010812972776103751;
105 aPoints( 1, 21 ) = 0.08960908902270585;
106
107 aPoints( 0, 22 ) = 0.10665316053614844;
108 aPoints( 1, 22 ) = 0.29661537240038294;
109
110 aPoints( 0, 23 ) = 0.051354315344013114;
111 aPoints( 1, 23 ) = 0.16976335515028973;
112
113 aPoints( 0, 24 ) = 0.0036969427073556124;
114 aPoints( 1, 24 ) = 0.21404877992584728;
115
116 aPoints( 0, 25 ) = 0.5765655597692546;
117 aPoints( 1, 25 ) = 0.009664954403660254;
118
119 aPoints( 0, 26 ) = 0.6655146084153339;
120 aPoints( 1, 26 ) = 0.030305943355186365;
121
122 aPoints( 0, 27 ) = 0.8995779382011905;
123 aPoints( 1, 27 ) = 0.010812972776103751;
124
125 aPoints( 0, 28 ) = 0.5967314670634686;
126 aPoints( 1, 28 ) = 0.10665316053614844;
127
128 aPoints( 0, 29 ) = 0.7788823295056971;
129 aPoints( 1, 29 ) = 0.051354315344013114;
130
131 aPoints( 0, 30 ) = 0.7822542773667971;
132 aPoints( 1, 30 ) = 0.0036969427073556124;
133
134 aPoints( 0, 31 ) = 0.41376948582708517;
135 aPoints( 1, 31 ) = 0.5765655597692546;
136
137 aPoints( 0, 32 ) = 0.30417944822947973;
138 aPoints( 1, 32 ) = 0.6655146084153339;
139
140 aPoints( 0, 33 ) = 0.08960908902270585;
141 aPoints( 1, 33 ) = 0.8995779382011905;
142
143 aPoints( 0, 34 ) = 0.29661537240038294;
144 aPoints( 1, 34 ) = 0.5967314670634686;
145
146 aPoints( 0, 35 ) = 0.16976335515028973;
147 aPoints( 1, 35 ) = 0.7788823295056971;
148
149 aPoints( 0, 36 ) = 0.21404877992584728;
150 aPoints( 1, 36 ) = 0.7822542773667971;
151
152 aPoints( 0, 37 ) = 0.41376948582708517;
153 aPoints( 1, 37 ) = 0.009664954403660254;
154
155 aPoints( 0, 38 ) = 0.30417944822947973;
156 aPoints( 1, 38 ) = 0.030305943355186365;
157
158 aPoints( 0, 39 ) = 0.08960908902270585;
159 aPoints( 1, 39 ) = 0.010812972776103751;
160
161 aPoints( 0, 40 ) = 0.29661537240038294;
162 aPoints( 1, 40 ) = 0.10665316053614844;
163
164 aPoints( 0, 41 ) = 0.16976335515028973;
165 aPoints( 1, 41 ) = 0.051354315344013114;
166
167 aPoints( 0, 42 ) = 0.21404877992584728;
168 aPoints( 1, 42 ) = 0.0036969427073556124;
169
170 aPoints( 0, 43 ) = 0.5765655597692546;
171 aPoints( 1, 43 ) = 0.41376948582708517;
172
173 aPoints( 0, 44 ) = 0.6655146084153339;
174 aPoints( 1, 44 ) = 0.30417944822947973;
175
176 aPoints( 0, 45 ) = 0.8995779382011905;
177 aPoints( 1, 45 ) = 0.08960908902270585;
178
179 aPoints( 0, 46 ) = 0.5967314670634686;
180 aPoints( 1, 46 ) = 0.29661537240038294;
181
182 aPoints( 0, 47 ) = 0.7788823295056971;
183 aPoints( 1, 47 ) = 0.16976335515028973;
184
185 aPoints( 0, 48 ) = 0.7822542773667971;
186 aPoints( 1, 48 ) = 0.21404877992584728;
187
188 aPoints( 0, 49 ) = 0.009664954403660254;
189 aPoints( 1, 49 ) = 0.5765655597692546;
190
191 aPoints( 0, 50 ) = 0.030305943355186365;
192 aPoints( 1, 50 ) = 0.6655146084153339;
193
194 aPoints( 0, 51 ) = 0.010812972776103751;
195 aPoints( 1, 51 ) = 0.8995779382011905;
196
197 aPoints( 0, 52 ) = 0.10665316053614844;
198 aPoints( 1, 52 ) = 0.5967314670634686;
199
200 aPoints( 0, 53 ) = 0.051354315344013114;
201 aPoints( 1, 53 ) = 0.7788823295056971;
202
203 aPoints( 0, 54 ) = 0.0036969427073556124;
204 aPoints( 1, 54 ) = 0.7822542773667971;
205
206 for( uint k=0; k<55; ++k )
207 {
208 aPoints( 2, k ) = 1.0
209 - aPoints( 0, k )
210 - aPoints( 1, k );
211 }
212
213 aWeights.set_size( 55 );
214
215 aWeights( 0 ) = 0.023113955157095672;
216 aWeights( 1 ) = 0.006212712797780504;
217 aWeights( 2 ) = 0.020592020534896276;
218 aWeights( 3 ) = 0.020492609893407683;
219 aWeights( 4 ) = 0.014391748351374455;
220 aWeights( 5 ) = 0.013546834733855226;
221 aWeights( 6 ) = 0.001894567619132111;
222 aWeights( 7 ) = 0.006212712797780504;
223 aWeights( 8 ) = 0.020592020534896276;
224 aWeights( 9 ) = 0.020492609893407683;
225 aWeights( 10 ) = 0.014391748351374455;
226 aWeights( 11 ) = 0.013546834733855226;
227 aWeights( 12 ) = 0.001894567619132111;
228 aWeights( 13 ) = 0.006212712797780504;
229 aWeights( 14 ) = 0.020592020534896276;
230 aWeights( 15 ) = 0.020492609893407683;
231 aWeights( 16 ) = 0.014391748351374455;
232 aWeights( 17 ) = 0.013546834733855226;
233 aWeights( 18 ) = 0.001894567619132111;
234 aWeights( 19 ) = 0.004091105276611069;
235 aWeights( 20 ) = 0.006991803562326784;
236 aWeights( 21 ) = 0.0028759349852485795;
237 aWeights( 22 ) = 0.015823030840991622;
238 aWeights( 23 ) = 0.008826540523551642;
239 aWeights( 24 ) = 0.0023073453198645673;
240 aWeights( 25 ) = 0.004091105276611069;
241 aWeights( 26 ) = 0.006991803562326784;
242 aWeights( 27 ) = 0.0028759349852485795;
243 aWeights( 28 ) = 0.015823030840991622;
244 aWeights( 29 ) = 0.008826540523551642;
245 aWeights( 30 ) = 0.0023073453198645673;
246 aWeights( 31 ) = 0.004091105276611069;
247 aWeights( 32 ) = 0.006991803562326784;
248 aWeights( 33 ) = 0.0028759349852485795;
249 aWeights( 34 ) = 0.015823030840991622;
250 aWeights( 35 ) = 0.008826540523551642;
251 aWeights( 36 ) = 0.0023073453198645673;
252 aWeights( 37 ) = 0.004091105276611069;
253 aWeights( 38 ) = 0.006991803562326784;
254 aWeights( 39 ) = 0.0028759349852485795;
255 aWeights( 40 ) = 0.015823030840991622;
256 aWeights( 41 ) = 0.008826540523551642;
257 aWeights( 42 ) = 0.0023073453198645673;
258 aWeights( 43 ) = 0.004091105276611069;
259 aWeights( 44 ) = 0.006991803562326784;
260 aWeights( 45 ) = 0.0028759349852485795;
261 aWeights( 46 ) = 0.015823030840991622;
262 aWeights( 47 ) = 0.008826540523551642;
263 aWeights( 48 ) = 0.0023073453198645673;
264 aWeights( 49 ) = 0.004091105276611069;
265 aWeights( 50 ) = 0.006991803562326784;
266 aWeights( 51 ) = 0.0028759349852485795;
267 aWeights( 52 ) = 0.015823030840991622;
268 aWeights( 53 ) = 0.008826540523551642;
269 aWeights( 54 ) = 0.0023073453198645673;
270
271 aWeights( 0 ) = 0.0;
272 aWeights( 0 ) = 0.5 - sum( aWeights );
273 }
274
275// ----------------------------------------------------------------------------
276 } /* namespace integration */
277} /* end namespace belfem */
278
279#endif // BELFEM_FN_INTPOINTS_GAUSS_TRI55_HPP
void set_size(const size_t aNumRows, const size_t aNumCols)
Definition cl_AR_Matrix.hpp:186
void set_size(const size_t aNumRows)
change the size of the vector
Definition cl_AR_Vector.hpp:237
Sum of the entries of a vector.
Definition fn_intpoints.cpp:576
void gauss_tri55(Vector< real > &aWeights, Matrix< real > &aPoints)
16th order interpolation
Definition fn_intpoints_gauss_tri55.hpp:35
USER GUIDES:
Definition cl_Capacitor.cpp:16
unsigned int uint
Definition typedefs.hpp:30
auto sum(const Vector< T > &aA) -> decltype(sum(aA.vector_data()))
Definition fn_sum.hpp:49