BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
fn_intpoints_gauss_tri49.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_TRI49_HPP
13#define BELFEM_FN_INTPOINTS_GAUSS_TRI49_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, 49 );
40
41 aPoints( 0, 0 ) = 1./3. ;
42 aPoints( 1, 0 ) = 1./3. ;
43
44 aPoints( 0, 1 ) = 0.015811726250988645;
45 aPoints( 1, 1 ) = 0.015811726250988645;
46
47 aPoints( 0, 2 ) = 0.4949969567691262;
48 aPoints( 1, 2 ) = 0.4949969567691262;
49
50 aPoints( 0, 3 ) = 0.070173552899986;
51 aPoints( 1, 3 ) = 0.070173552899986;
52
53 aPoints( 0, 4 ) = 0.47417068143801977;
54 aPoints( 1, 4 ) = 0.47417068143801977;
55
56 aPoints( 0, 5 ) = 0.4053622141339755;
57 aPoints( 1, 5 ) = 0.4053622141339755;
58
59 aPoints( 0, 6 ) = 0.2263787134203496;
60 aPoints( 1, 6 ) = 0.2263787134203496;
61
62 aPoints( 0, 7 ) = 0.015811726250988645;
63 aPoints( 1, 7 ) = 0.9683765474980227;
64
65 aPoints( 0, 8 ) = 0.4949969567691262;
66 aPoints( 1, 8 ) = 0.01000608646174761;
67
68 aPoints( 0, 9 ) = 0.070173552899986;
69 aPoints( 1, 9 ) = 0.859652894200028;
70
71 aPoints( 0, 10 ) = 0.47417068143801977;
72 aPoints( 1, 10 ) = 0.05165863712396046;
73
74 aPoints( 0, 11 ) = 0.4053622141339755;
75 aPoints( 1, 11 ) = 0.189275571732049;
76
77 aPoints( 0, 12 ) = 0.2263787134203496;
78 aPoints( 1, 12 ) = 0.5472425731593008;
79
80 aPoints( 0, 13 ) = 0.9683765474980227;
81 aPoints( 1, 13 ) = 0.015811726250988645;
82
83 aPoints( 0, 14 ) = 0.01000608646174761;
84 aPoints( 1, 14 ) = 0.4949969567691262;
85
86 aPoints( 0, 15 ) = 0.859652894200028;
87 aPoints( 1, 15 ) = 0.070173552899986;
88
89 aPoints( 0, 16 ) = 0.05165863712396046;
90 aPoints( 1, 16 ) = 0.47417068143801977;
91
92 aPoints( 0, 17 ) = 0.189275571732049;
93 aPoints( 1, 17 ) = 0.4053622141339755;
94
95 aPoints( 0, 18 ) = 0.5472425731593008;
96 aPoints( 1, 18 ) = 0.2263787134203496;
97
98 aPoints( 0, 19 ) = 0.009139237037308401;
99 aPoints( 1, 19 ) = 0.07094860523645552;
100
101 aPoints( 0, 20 ) = 0.01863871372816639;
102 aPoints( 1, 20 ) = 0.16806864522241438;
103
104 aPoints( 0, 21 ) = 0.018376112385681043;
105 aPoints( 1, 21 ) = 0.31464824281245085;
106
107 aPoints( 0, 22 ) = 0.09424205359215543;
108 aPoints( 1, 22 ) = 0.19053558947639393;
109
110 aPoints( 0, 23 ) = 0.0957967236476086;
111 aPoints( 1, 23 ) = 0.33895061147527716;
112
113 aPoints( 0, 24 ) = 0.919912157726236;
114 aPoints( 1, 24 ) = 0.009139237037308401;
115
116 aPoints( 0, 25 ) = 0.8132926410494192;
117 aPoints( 1, 25 ) = 0.01863871372816639;
118
119 aPoints( 0, 26 ) = 0.6669756448018681;
120 aPoints( 1, 26 ) = 0.018376112385681043;
121
122 aPoints( 0, 27 ) = 0.7152223569314506;
123 aPoints( 1, 27 ) = 0.09424205359215543;
124
125 aPoints( 0, 28 ) = 0.5652526648771142;
126 aPoints( 1, 28 ) = 0.0957967236476086;
127
128 aPoints( 0, 29 ) = 0.07094860523645552;
129 aPoints( 1, 29 ) = 0.919912157726236;
130
131 aPoints( 0, 30 ) = 0.16806864522241438;
132 aPoints( 1, 30 ) = 0.8132926410494192;
133
134 aPoints( 0, 31 ) = 0.31464824281245085;
135 aPoints( 1, 31 ) = 0.6669756448018681;
136
137 aPoints( 0, 32 ) = 0.19053558947639393;
138 aPoints( 1, 32 ) = 0.7152223569314506;
139
140 aPoints( 0, 33 ) = 0.33895061147527716;
141 aPoints( 1, 33 ) = 0.5652526648771142;
142
143 aPoints( 0, 34 ) = 0.07094860523645552;
144 aPoints( 1, 34 ) = 0.009139237037308401;
145
146 aPoints( 0, 35 ) = 0.16806864522241438;
147 aPoints( 1, 35 ) = 0.01863871372816639;
148
149 aPoints( 0, 36 ) = 0.31464824281245085;
150 aPoints( 1, 36 ) = 0.018376112385681043;
151
152 aPoints( 0, 37 ) = 0.19053558947639393;
153 aPoints( 1, 37 ) = 0.09424205359215543;
154
155 aPoints( 0, 38 ) = 0.33895061147527716;
156 aPoints( 1, 38 ) = 0.0957967236476086;
157
158 aPoints( 0, 39 ) = 0.919912157726236;
159 aPoints( 1, 39 ) = 0.07094860523645552;
160
161 aPoints( 0, 40 ) = 0.8132926410494192;
162 aPoints( 1, 40 ) = 0.16806864522241438;
163
164 aPoints( 0, 41 ) = 0.6669756448018681;
165 aPoints( 1, 41 ) = 0.31464824281245085;
166
167 aPoints( 0, 42 ) = 0.7152223569314506;
168 aPoints( 1, 42 ) = 0.19053558947639393;
169
170 aPoints( 0, 43 ) = 0.5652526648771142;
171 aPoints( 1, 43 ) = 0.33895061147527716;
172
173 aPoints( 0, 44 ) = 0.009139237037308401;
174 aPoints( 1, 44 ) = 0.919912157726236;
175
176 aPoints( 0, 45 ) = 0.01863871372816639;
177 aPoints( 1, 45 ) = 0.8132926410494192;
178
179 aPoints( 0, 46 ) = 0.018376112385681043;
180 aPoints( 1, 46 ) = 0.6669756448018681;
181
182 aPoints( 0, 47 ) = 0.09424205359215543;
183 aPoints( 1, 47 ) = 0.7152223569314506;
184
185 aPoints( 0, 48 ) = 0.0957967236476086;
186 aPoints( 1, 48 ) = 0.5652526648771142;
187
188 for( uint k=0; k<49; ++k )
189 {
190 aPoints( 2, k ) = 1.0
191 - aPoints( 0, k )
192 - aPoints( 1, k );
193 }
194
195 aWeights.set_size( 49 );
196
197 aWeights( 0 ) = 0.022167693691092036;
198 aWeights( 1 ) = 0.0014803873189526877;
199 aWeights( 2 ) = 0.004786923091230043;
200 aWeights( 3 ) = 0.008222368781312581;
201 aWeights( 4 ) = 0.008698074000381707;
202 aWeights( 5 ) = 0.021356890785730283;
203 aWeights( 6 ) = 0.023391680864354815;
204 aWeights( 7 ) = 0.0014803873189526877;
205 aWeights( 8 ) = 0.004786923091230043;
206 aWeights( 9 ) = 0.008222368781312581;
207 aWeights( 10 ) = 0.008698074000381707;
208 aWeights( 11 ) = 0.021356890785730283;
209 aWeights( 12 ) = 0.023391680864354815;
210 aWeights( 13 ) = 0.0014803873189526877;
211 aWeights( 14 ) = 0.004786923091230043;
212 aWeights( 15 ) = 0.008222368781312581;
213 aWeights( 16 ) = 0.008698074000381707;
214 aWeights( 17 ) = 0.021356890785730283;
215 aWeights( 18 ) = 0.023391680864354815;
216 aWeights( 19 ) = 0.0020149266860090497;
217 aWeights( 20 ) = 0.005836310590787923;
218 aWeights( 21 ) = 0.007801286415287982;
219 aWeights( 22 ) = 0.014360293462600671;
220 aWeights( 23 ) = 0.015657738142484643;
221 aWeights( 24 ) = 0.0020149266860090497;
222 aWeights( 25 ) = 0.005836310590787923;
223 aWeights( 26 ) = 0.007801286415287982;
224 aWeights( 27 ) = 0.014360293462600671;
225 aWeights( 28 ) = 0.015657738142484643;
226 aWeights( 29 ) = 0.0020149266860090497;
227 aWeights( 30 ) = 0.005836310590787923;
228 aWeights( 31 ) = 0.007801286415287982;
229 aWeights( 32 ) = 0.014360293462600671;
230 aWeights( 33 ) = 0.015657738142484643;
231 aWeights( 34 ) = 0.0020149266860090497;
232 aWeights( 35 ) = 0.005836310590787923;
233 aWeights( 36 ) = 0.007801286415287982;
234 aWeights( 37 ) = 0.014360293462600671;
235 aWeights( 38 ) = 0.015657738142484643;
236 aWeights( 39 ) = 0.0020149266860090497;
237 aWeights( 40 ) = 0.005836310590787923;
238 aWeights( 41 ) = 0.007801286415287982;
239 aWeights( 42 ) = 0.014360293462600671;
240 aWeights( 43 ) = 0.015657738142484643;
241 aWeights( 44 ) = 0.0020149266860090497;
242 aWeights( 45 ) = 0.005836310590787923;
243 aWeights( 46 ) = 0.007801286415287982;
244 aWeights( 47 ) = 0.014360293462600671;
245 aWeights( 48 ) = 0.015657738142484643;
246
247 aWeights( 0 ) = 0.0;
248 aWeights( 0 ) = 0.5 - sum( aWeights );
249 }
250
251// ----------------------------------------------------------------------------
252 } /* namespace integration */
253} /* end namespace belfem */
254
255#endif // BELFEM_FN_INTPOINTS_GAUSS_TRI49_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_tri49(Vector< real > &aWeights, Matrix< real > &aPoints)
15th order interpolation
Definition fn_intpoints_gauss_tri49.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