BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
fn_intpoints_gauss_tri37.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_TRI37_HPP
13#define BELFEM_FN_INTPOINTS_GAUSS_TRI37_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, 37 );
40
41 aPoints( 0, 0 ) = 1./3.;
42 aPoints( 1, 0 ) = 1./3.;
43
44 aPoints( 0, 1 ) = 0.4961358947410461;
45 aPoints( 1, 1 ) = 0.4961358947410461;
46
47 aPoints( 0, 2 ) = 0.4696086896534919;
48 aPoints( 1, 2 ) = 0.4696086896534919;
49
50 aPoints( 0, 3 ) = 0.23111028494908226;
51 aPoints( 1, 3 ) = 0.23111028494908226;
52
53 aPoints( 0, 4 ) = 0.4144775702790546;
54 aPoints( 1, 4 ) = 0.4144775702790546;
55
56 aPoints( 0, 5 ) = 0.11355991257213327;
57 aPoints( 1, 5 ) = 0.11355991257213327;
58
59 aPoints( 0, 6 ) = 0.024895931491216494;
60 aPoints( 1, 6 ) = 0.024895931491216494;
61
62 aPoints( 0, 7 ) = 0.4961358947410461;
63 aPoints( 1, 7 ) = 0.007728210517907841;
64
65 aPoints( 0, 8 ) = 0.4696086896534919;
66 aPoints( 1, 8 ) = 0.06078262069301621;
67
68 aPoints( 0, 9 ) = 0.23111028494908226;
69 aPoints( 1, 9 ) = 0.5377794301018355;
70
71 aPoints( 0, 10 ) = 0.4144775702790546;
72 aPoints( 1, 10 ) = 0.17104485944189085;
73
74 aPoints( 0, 11 ) = 0.11355991257213327;
75 aPoints( 1, 11 ) = 0.7728801748557335;
76
77 aPoints( 0, 12 ) = 0.024895931491216494;
78 aPoints( 1, 12 ) = 0.950208137017567;
79
80 aPoints( 0, 13 ) = 0.007728210517907841;
81 aPoints( 1, 13 ) = 0.4961358947410461;
82
83 aPoints( 0, 14 ) = 0.06078262069301621;
84 aPoints( 1, 14 ) = 0.4696086896534919;
85
86 aPoints( 0, 15 ) = 0.5377794301018355;
87 aPoints( 1, 15 ) = 0.23111028494908226;
88
89 aPoints( 0, 16 ) = 0.17104485944189085;
90 aPoints( 1, 16 ) = 0.4144775702790546;
91
92 aPoints( 0, 17 ) = 0.7728801748557335;
93 aPoints( 1, 17 ) = 0.11355991257213327;
94
95 aPoints( 0, 18 ) = 0.950208137017567;
96 aPoints( 1, 18 ) = 0.024895931491216494;
97
98 aPoints( 0, 19 ) = 0.01898800438375904;
99 aPoints( 1, 19 ) = 0.2920786885766364;
100
101 aPoints( 0, 20 ) = 0.09773603106601653;
102 aPoints( 1, 20 ) = 0.26674525331035115;
103
104 aPoints( 0, 21 ) = 0.021966344206529244;
105 aPoints( 1, 21 ) = 0.1267997757838373;
106
107 aPoints( 0, 22 ) = 0.6889333070396046;
108 aPoints( 1, 22 ) = 0.01898800438375904;
109
110 aPoints( 0, 23 ) = 0.6355187156236324;
111 aPoints( 1, 23 ) = 0.09773603106601653;
112
113 aPoints( 0, 24 ) = 0.8512338800096335;
114 aPoints( 1, 24 ) = 0.021966344206529244;
115
116 aPoints( 0, 25 ) = 0.2920786885766364;
117 aPoints( 1, 25 ) = 0.6889333070396046;
118
119 aPoints( 0, 26 ) = 0.26674525331035115;
120 aPoints( 1, 26 ) = 0.6355187156236324;
121
122 aPoints( 0, 27 ) = 0.1267997757838373;
123 aPoints( 1, 27 ) = 0.8512338800096335;
124
125 aPoints( 0, 28 ) = 0.2920786885766364;
126 aPoints( 1, 28 ) = 0.01898800438375904;
127
128 aPoints( 0, 29 ) = 0.26674525331035115;
129 aPoints( 1, 29 ) = 0.09773603106601653;
130
131 aPoints( 0, 30 ) = 0.1267997757838373;
132 aPoints( 1, 30 ) = 0.021966344206529244;
133
134 aPoints( 0, 31 ) = 0.6889333070396046;
135 aPoints( 1, 31 ) = 0.2920786885766364;
136
137 aPoints( 0, 32 ) = 0.6355187156236324;
138 aPoints( 1, 32 ) = 0.26674525331035115;
139
140 aPoints( 0, 33 ) = 0.8512338800096335;
141 aPoints( 1, 33 ) = 0.1267997757838373;
142
143 aPoints( 0, 34 ) = 0.01898800438375904;
144 aPoints( 1, 34 ) = 0.6889333070396046;
145
146 aPoints( 0, 35 ) = 0.09773603106601653;
147 aPoints( 1, 35 ) = 0.6355187156236324;
148
149 aPoints( 0, 36 ) = 0.021966344206529244;
150 aPoints( 1, 36 ) = 0.8512338800096335;
151
152 for( uint k=0; k<37; ++k )
153 {
154 aPoints( 2, k ) = 1.0
155 - aPoints( 0, k )
156 - aPoints( 1, k );
157 }
158
159 aWeights.set_size( 37 );
160
161 aWeights( 0 ) = 0.02581132333214541;
162 aWeights( 1 ) = 0.004970738180536294;
163 aWeights( 2 ) = 0.01639062080186149;
164 aWeights( 3 ) = 0.023031204796389124;
165 aWeights( 4 ) = 0.0234735477710776;
166 aWeights( 5 ) = 0.015451548987879897;
167 aWeights( 6 ) = 0.0040146998976292115;
168 aWeights( 7 ) = 0.004970738180536294;
169 aWeights( 8 ) = 0.01639062080186149;
170 aWeights( 9 ) = 0.023031204796389124;
171 aWeights( 10 ) = 0.0234735477710776;
172 aWeights( 11 ) = 0.015451548987879897;
173 aWeights( 12 ) = 0.0040146998976292115;
174 aWeights( 13 ) = 0.004970738180536294;
175 aWeights( 14 ) = 0.01639062080186149;
176 aWeights( 15 ) = 0.023031204796389124;
177 aWeights( 16 ) = 0.0234735477710776;
178 aWeights( 17 ) = 0.015451548987879897;
179 aWeights( 18 ) = 0.0040146998976292115;
180 aWeights( 19 ) = 0.00906274932310044;
181 aWeights( 20 ) = 0.018605980228630768;
182 aWeights( 21 ) = 0.007696536341891089;
183 aWeights( 22 ) = 0.00906274932310044;
184 aWeights( 23 ) = 0.018605980228630768;
185 aWeights( 24 ) = 0.007696536341891089;
186 aWeights( 25 ) = 0.00906274932310044;
187 aWeights( 26 ) = 0.018605980228630768;
188 aWeights( 27 ) = 0.007696536341891089;
189 aWeights( 28 ) = 0.00906274932310044;
190 aWeights( 29 ) = 0.018605980228630768;
191 aWeights( 30 ) = 0.007696536341891089;
192 aWeights( 31 ) = 0.00906274932310044;
193 aWeights( 32 ) = 0.018605980228630768;
194 aWeights( 33 ) = 0.007696536341891089;
195 aWeights( 34 ) = 0.00906274932310044;
196 aWeights( 35 ) = 0.018605980228630768;
197 aWeights( 36 ) = 0.007696536341891089;
198
199 aWeights( 0 ) = 0.0;
200 aWeights( 0 ) = 0.5 - sum( aWeights );
201 }
202
203// ----------------------------------------------------------------------------
204 } /* namespace integration */
205} /* end namespace belfem */
206
207#endif // BELFEM_FN_INTPOINTS_GAUSS_TRI37_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_tri37(Vector< real > &aWeights, Matrix< real > &aPoints)
13th order interpolation
Definition fn_intpoints_gauss_tri37.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