BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
fn_intpoints_gauss_tet20.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_TET20_HPP
13#define BELFEM_FN_INTPOINTS_GAUSS_TET20_HPP
14
15#include "typedefs.hpp"
16#include "cl_Vector.hpp"
17#include "cl_Matrix.hpp"
18// ----------------------------------------------------------------------------
19namespace belfem
20{
21 namespace integration
22 {
23// ----------------------------------------------------------------------------
24
25 // 6th order in the Shunn and Ham numbering ( leading error term delta^6,
26 // their Table 1 ): exact for polynomials up to degree 5. UNUSED:
27 // fn_intpoints.cpp calls no tet20 table.
28 // source Shunn and Ham, 10.1016/j.cam.2012.03.032
29 inline void
31 Vector <real> & aWeights,
32 Matrix <real> & aPoints )
33 {
34 aPoints.set_size( 4, 20 );
35
36 aPoints( 0 , 0 ) = 0.9029422158182680 ;
37 aPoints( 1 , 0 ) = 0.0323525947272439 ;
38 aPoints( 2 , 0 ) = 0.0323525947272439 ;
39
40 aPoints( 0 , 1 ) = 0.0323525947272439 ;
41 aPoints( 1 , 1 ) = 0.9029422158182680 ;
42 aPoints( 2 , 1 ) = 0.0323525947272439 ;
43
44 aPoints( 0 , 2 ) = 0.0323525947272439 ;
45 aPoints( 1 , 2 ) = 0.0323525947272439 ;
46 aPoints( 2 , 2 ) = 0.9029422158182680 ;
47
48 aPoints( 0 , 3 ) = 0.0323525947272439 ;
49 aPoints( 1 , 3 ) = 0.0323525947272439 ;
50 aPoints( 2 , 3 ) = 0.0323525947272439 ;
51
52 aPoints( 0 , 4 ) = 0.2626825838877790 ;
53 aPoints( 1 , 4 ) = 0.6165965330619370 ;
54 aPoints( 2 , 4 ) = 0.0603604415251421 ;
55
56 aPoints( 0 , 5 ) = 0.6165965330619370 ;
57 aPoints( 1 , 5 ) = 0.2626825838877790 ;
58 aPoints( 2 , 5 ) = 0.0603604415251421 ;
59
60 aPoints( 0 , 6 ) = 0.2626825838877790 ;
61 aPoints( 1 , 6 ) = 0.0603604415251421 ;
62 aPoints( 2 , 6 ) = 0.6165965330619370 ;
63
64 aPoints( 0 , 7 ) = 0.6165965330619370 ;
65 aPoints( 1 , 7 ) = 0.0603604415251421 ;
66 aPoints( 2 , 7 ) = 0.2626825838877790 ;
67
68 aPoints( 0 , 8 ) = 0.2626825838877790 ;
69 aPoints( 1 , 8 ) = 0.0603604415251421 ;
70 aPoints( 2 , 8 ) = 0.0603604415251421 ;
71
72 aPoints( 0 , 9 ) = 0.6165965330619370 ;
73 aPoints( 1 , 9 ) = 0.0603604415251421 ;
74 aPoints( 2 , 9 ) = 0.0603604415251421 ;
75
76 aPoints( 0 , 10 ) = 0.0603604415251421 ;
77 aPoints( 1 , 10 ) = 0.2626825838877790 ;
78 aPoints( 2 , 10 ) = 0.6165965330619370 ;
79
80 aPoints( 0 , 11 ) = 0.0603604415251421 ;
81 aPoints( 1 , 11 ) = 0.6165965330619370 ;
82 aPoints( 2 , 11 ) = 0.2626825838877790 ;
83
84 aPoints( 0 , 12 ) = 0.0603604415251421 ;
85 aPoints( 1 , 12 ) = 0.2626825838877790 ;
86 aPoints( 2 , 12 ) = 0.0603604415251421 ;
87
88 aPoints( 0 , 13 ) = 0.0603604415251421 ;
89 aPoints( 1 , 13 ) = 0.6165965330619370 ;
90 aPoints( 2 , 13 ) = 0.0603604415251421 ;
91
92 aPoints( 0 , 14 ) = 0.0603604415251421 ;
93 aPoints( 1 , 14 ) = 0.0603604415251421 ;
94 aPoints( 2 , 14 ) = 0.2626825838877790 ;
95
96 aPoints( 0 , 15 ) = 0.0603604415251421 ;
97 aPoints( 1 , 15 ) = 0.0603604415251421 ;
98 aPoints( 2 , 15 ) = 0.6165965330619370 ;
99
100 aPoints( 0 , 16 ) = 0.3097693042728620 ;
101 aPoints( 1 , 16 ) = 0.3097693042728620 ;
102 aPoints( 2 , 16 ) = 0.3097693042728620 ;
103
104 aPoints( 0 , 17 ) = 0.3097693042728620 ;
105 aPoints( 1 , 17 ) = 0.3097693042728620 ;
106 aPoints( 2 , 17 ) = 0.0706920871814129 ;
107
108 aPoints( 0 , 18 ) = 0.3097693042728620 ;
109 aPoints( 1 , 18 ) = 0.0706920871814129 ;
110 aPoints( 2 , 18 ) = 0.3097693042728620 ;
111
112 aPoints( 0 , 19 ) = 0.0706920871814129 ;
113 aPoints( 1 , 19 ) = 0.3097693042728620 ;
114 aPoints( 2 , 19 ) = 0.3097693042728620 ;
115
116 for( uint k=0; k<20; ++k )
117 {
118 aPoints( 3, k ) = 1.0
119 - aPoints( 0, k )
120 - aPoints( 1, k )
121 - aPoints( 2, k );
122 }
123
124 aWeights.set_size( 20 );
125
126 aWeights( 0 ) = 0.00117784579907825 ;
127 aWeights( 1 ) = 0.00117784579907825 ;
128 aWeights( 2 ) = 0.00117784579907825 ;
129 aWeights( 3 ) = 0.00117784579907825 ;
130
131 aWeights( 4 ) = 0.0078331114953146 ;
132 aWeights( 5 ) = 0.0078331114953146 ;
133 aWeights( 6 ) = 0.0078331114953146 ;
134 aWeights( 7 ) = 0.0078331114953146 ;
135 aWeights( 8 ) = 0.0078331114953146 ;
136 aWeights( 9 ) = 0.0078331114953146 ;
137 aWeights( 10 ) = 0.0078331114953146 ;
138 aWeights( 11 ) = 0.0078331114953146 ;
139 aWeights( 12 ) = 0.0078331114953146 ;
140 aWeights( 13 ) = 0.0078331114953146 ;
141 aWeights( 14 ) = 0.0078331114953146 ;
142 aWeights( 15 ) = 0.0078331114953146 ;
143
144 aWeights( 16 ) = 0.0169894863816446 ;
145 aWeights( 17 ) = 0.0169894863816446 ;
146 aWeights( 18 ) = 0.0169894863816446 ;
147 aWeights( 19 ) = 0.0169894863816446 ;
148 }
149
150// ----------------------------------------------------------------------------
151 }
152}
153#endif //BELFEM_FN_INTPOINTS_GAUSS_TET20_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
Definition fn_intpoints.cpp:576
void gauss_tet20(Vector< real > &aWeights, Matrix< real > &aPoints)
Definition fn_intpoints_gauss_tet20.hpp:30
USER GUIDES:
Definition cl_Capacitor.cpp:16
unsigned int uint
Definition typedefs.hpp:30