BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
fn_intpoints_gauss_tet35.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_TET35_HPP
13#define BELFEM_FN_INTPOINTS_GAUSS_TET35_HPP
14
15#include "typedefs.hpp"
16#include "cl_Vector.hpp"
17#include "cl_Matrix.hpp"
18#include "fn_sum.hpp"
19
20// ----------------------------------------------------------------------------
21namespace belfem
22{
23 namespace integration
24 {
25// ----------------------------------------------------------------------------
26
27 // 7th order in the Shunn and Ham numbering ( leading error term delta^7,
28 // their Table 1 ): exact for polynomials up to degree 6. UNUSED since
29 // 2026-09-03: requested order 7 is served by the degree-8 Witherden and
30 // Vincent table ( fn_intpoints.cpp ), because "order" means the exactness
31 // degree there and this table falls one short of it.
32 // source Shunn and Ham, 10.1016/j.cam.2012.03.032
33 inline void
35 Vector <real> & aWeights,
36 Matrix <real> & aPoints )
37 {
38 aPoints.set_size( 4, 35 );
39 aWeights.set_size( 35 );
40
41 aPoints( 0 , 0 ) = 0.9197896733368800 ;
42 aPoints( 1 , 0 ) = 0.0267367755543735 ;
43 aPoints( 2 , 0 ) = 0.0267367755543735 ;
44
45 aPoints( 0 , 1 ) = 0.0267367755543735 ;
46 aPoints( 1 , 1 ) = 0.9197896733368800 ;
47 aPoints( 2 , 1 ) = 0.0267367755543735 ;
48
49 aPoints( 0 , 2 ) = 0.0267367755543735 ;
50 aPoints( 1 , 2 ) = 0.0267367755543735 ;
51 aPoints( 2 , 2 ) = 0.9197896733368800 ;
52
53 aPoints( 0 , 3 ) = 0.0267367755543735 ;
54 aPoints( 1 , 3 ) = 0.0267367755543735 ;
55 aPoints( 2 , 3 ) = 0.0267367755543735 ;
56
57 aPoints( 0 , 4 ) = 0.1740356302468940 ;
58 aPoints( 1 , 4 ) = 0.7477598884818090 ;
59 aPoints( 2 , 4 ) = 0.0391022406356488 ;
60
61 aPoints( 0 , 5 ) = 0.7477598884818090 ;
62 aPoints( 1 , 5 ) = 0.1740356302468940 ;
63 aPoints( 2 , 5 ) = 0.0391022406356488 ;
64
65 aPoints( 0 , 6 ) = 0.1740356302468940 ;
66 aPoints( 1 , 6 ) = 0.0391022406356488 ;
67 aPoints( 2 , 6 ) = 0.7477598884818090 ;
68
69 aPoints( 0 , 7 ) = 0.7477598884818090 ;
70 aPoints( 1 , 7 ) = 0.0391022406356488 ;
71 aPoints( 2 , 7 ) = 0.1740356302468940 ;
72
73 aPoints( 0 , 8 ) = 0.1740356302468940 ;
74 aPoints( 1 , 8 ) = 0.0391022406356488 ;
75 aPoints( 2 , 8 ) = 0.0391022406356488 ;
76
77 aPoints( 0 , 9 ) = 0.7477598884818090 ;
78 aPoints( 1 , 9 ) = 0.0391022406356488 ;
79 aPoints( 2 , 9 ) = 0.0391022406356488 ;
80
81 aPoints( 0 , 10 ) = 0.0391022406356488 ;
82 aPoints( 1 , 10 ) = 0.1740356302468940 ;
83 aPoints( 2 , 10 ) = 0.7477598884818090 ;
84
85 aPoints( 0 , 11 ) = 0.0391022406356488 ;
86 aPoints( 1 , 11 ) = 0.7477598884818090 ;
87 aPoints( 2 , 11 ) = 0.1740356302468940 ;
88
89 aPoints( 0 , 12 ) = 0.0391022406356488 ;
90 aPoints( 1 , 12 ) = 0.1740356302468940 ;
91 aPoints( 2 , 12 ) = 0.0391022406356488 ;
92
93 aPoints( 0 , 13 ) = 0.0391022406356488 ;
94 aPoints( 1 , 13 ) = 0.7477598884818090 ;
95 aPoints( 2 , 13 ) = 0.0391022406356488 ;
96
97 aPoints( 0 , 14 ) = 0.0391022406356488 ;
98 aPoints( 1 , 14 ) = 0.0391022406356488 ;
99 aPoints( 2 , 14 ) = 0.1740356302468940 ;
100
101 aPoints( 0 , 15 ) = 0.0391022406356488 ;
102 aPoints( 1 , 15 ) = 0.0391022406356488 ;
103 aPoints( 2 , 15 ) = 0.7477598884818090 ;
104
105 aPoints( 0 , 16 ) = 0.4547545999844830 ;
106 aPoints( 1 , 16 ) = 0.4547545999844830 ;
107 aPoints( 2 , 16 ) = 0.0452454000155172 ;
108
109 aPoints( 0 , 17 ) = 0.4547545999844830 ;
110 aPoints( 1 , 17 ) = 0.0452454000155172 ;
111 aPoints( 2 , 17 ) = 0.4547545999844830 ;
112
113 aPoints( 0 , 18 ) = 0.4547545999844830 ;
114 aPoints( 1 , 18 ) = 0.0452454000155172 ;
115 aPoints( 2 , 18 ) = 0.0452454000155172 ;
116
117 aPoints( 0 , 19 ) = 0.0452454000155172 ;
118 aPoints( 1 , 19 ) = 0.4547545999844830 ;
119 aPoints( 2 , 19 ) = 0.4547545999844830 ;
120
121 aPoints( 0 , 20 ) = 0.0452454000155172 ;
122 aPoints( 1 , 20 ) = 0.4547545999844830 ;
123 aPoints( 2 , 20 ) = 0.0452454000155172 ;
124
125 aPoints( 0 , 21 ) = 0.0452454000155172 ;
126 aPoints( 1 , 21 ) = 0.0452454000155172 ;
127 aPoints( 2 , 21 ) = 0.4547545999844830 ;
128
129 aPoints( 0 , 22 ) = 0.5031186450145980 ;
130 aPoints( 1 , 22 ) = 0.2232010379623150 ;
131 aPoints( 2 , 22 ) = 0.2232010379623150 ;
132
133 aPoints( 0 , 23 ) = 0.2232010379623150 ;
134 aPoints( 1 , 23 ) = 0.5031186450145980 ;
135 aPoints( 2 , 23 ) = 0.2232010379623150 ;
136
137 aPoints( 0 , 24 ) = 0.2232010379623150 ;
138 aPoints( 1 , 24 ) = 0.2232010379623150 ;
139 aPoints( 2 , 24 ) = 0.5031186450145980 ;
140
141 aPoints( 0 , 25 ) = 0.5031186450145980 ;
142 aPoints( 1 , 25 ) = 0.2232010379623150 ;
143 aPoints( 2 , 25 ) = 0.0504792790607720 ;
144
145 aPoints( 0 , 26 ) = 0.2232010379623150 ;
146 aPoints( 1 , 26 ) = 0.5031186450145980 ;
147 aPoints( 2 , 26 ) = 0.0504792790607720 ;
148
149 aPoints( 0 , 27 ) = 0.2232010379623150 ;
150 aPoints( 1 , 27 ) = 0.2232010379623150 ;
151 aPoints( 2 , 27 ) = 0.0504792790607720 ;
152
153 aPoints( 0 , 28 ) = 0.5031186450145980 ;
154 aPoints( 1 , 28 ) = 0.0504792790607720 ;
155 aPoints( 2 , 28 ) = 0.2232010379623150 ;
156
157 aPoints( 0 , 29 ) = 0.2232010379623150 ;
158 aPoints( 1 , 29 ) = 0.0504792790607720 ;
159 aPoints( 2 , 29 ) = 0.5031186450145980 ;
160
161 aPoints( 0 , 30 ) = 0.2232010379623150 ;
162 aPoints( 1 , 30 ) = 0.0504792790607720 ;
163 aPoints( 2 , 30 ) = 0.2232010379623150 ;
164
165 aPoints( 0 , 31 ) = 0.0504792790607720 ;
166 aPoints( 1 , 31 ) = 0.5031186450145980 ;
167 aPoints( 2 , 31 ) = 0.2232010379623150 ;
168
169 aPoints( 0 , 32 ) = 0.0504792790607720 ;
170 aPoints( 1 , 32 ) = 0.2232010379623150 ;
171 aPoints( 2 , 32 ) = 0.5031186450145980 ;
172
173 aPoints( 0 , 33 ) = 0.0504792790607720 ;
174 aPoints( 1 , 33 ) = 0.2232010379623150 ;
175 aPoints( 2 , 33 ) = 0.2232010379623150 ;
176
177 aPoints( 0 , 34 ) = 0.25 ;
178 aPoints( 1 , 34 ) = 0.25 ;
179 aPoints( 2 , 34 ) = 0.25 ;
180
181 for( uint k=0; k<35; ++k )
182 {
183 aPoints( 3, k ) = 1.0
184 - aPoints( 0, k )
185 - aPoints( 1, k )
186 - aPoints( 2, k );
187 }
188
189 aWeights( 0 ) = 0.000365007732756467 ;
190 aWeights( 1 ) = 0.000365007732756467 ;
191 aWeights( 2 ) = 0.000365007732756467 ;
192 aWeights( 3 ) = 0.000365007732756467 ;
193
194 aWeights( 4 ) = 0.00238992783629442 ;
195 aWeights( 5 ) = 0.00238992783629442 ;
196 aWeights( 6 ) = 0.00238992783629442 ;
197 aWeights( 7 ) = 0.00238992783629442 ;
198 aWeights( 8 ) = 0.00238992783629442 ;
199 aWeights( 9 ) = 0.00238992783629442 ;
200 aWeights( 10 ) = 0.00238992783629442 ;
201 aWeights( 11 ) = 0.00238992783629442 ;
202 aWeights( 12 ) = 0.00238992783629442 ;
203 aWeights( 13 ) = 0.00238992783629442 ;
204 aWeights( 14 ) = 0.00238992783629442 ;
205 aWeights( 15 ) = 0.00238992783629442 ;
206
207 aWeights( 16 ) = 0.00417175659477910 ;
208 aWeights( 17 ) = 0.00417175659477910 ;
209 aWeights( 18 ) = 0.00417175659477910 ;
210 aWeights( 19 ) = 0.00417175659477910 ;
211 aWeights( 20 ) = 0.00417175659477910 ;
212 aWeights( 21 ) = 0.00417175659477910 ;
213
214 aWeights( 22 ) = 0.00799732221762591 ;
215 aWeights( 23 ) = 0.00799732221762591 ;
216 aWeights( 24 ) = 0.00799732221762591 ;
217 aWeights( 25 ) = 0.00799732221762591 ;
218 aWeights( 26 ) = 0.00799732221762591 ;
219 aWeights( 27 ) = 0.00799732221762591 ;
220 aWeights( 28 ) = 0.00799732221762591 ;
221 aWeights( 29 ) = 0.00799732221762591 ;
222 aWeights( 30 ) = 0.00799732221762591 ;
223 aWeights( 31 ) = 0.00799732221762591 ;
224 aWeights( 32 ) = 0.00799732221762591 ;
225 aWeights( 33 ) = 0.00799732221762591 ;
226
227 aWeights( 34 ) = 0.01552909551992230 ;
228
229 aWeights( 34 ) = 0.0;
230 aWeights( 34 ) = 1./6. - sum( aWeights );
231 }
232
233// ----------------------------------------------------------------------------
234 }
235}
236#endif //BELFEM_FN_INTPOINTS_GAUSS_TET35_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_tet35(Vector< real > &aWeights, Matrix< real > &aPoints)
Definition fn_intpoints_gauss_tet35.hpp:34
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