BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
fn_intpoints_gauss_tri28.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_TRI28_HPP
13#define BELFEM_FN_INTPOINTS_GAUSS_TRI28_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, 28 );
40
41 aPoints( 0, 0 ) = 1./3.;
42 aPoints( 1, 0 ) = 1./3.;
43
44 aPoints( 0, 1 ) = 0.030846895635588123;
45 aPoints( 1, 1 ) = 0.030846895635588123;
46
47 aPoints( 0, 2 ) = 0.49878016517846074;
48 aPoints( 1, 2 ) = 0.49878016517846074;
49
50 aPoints( 0, 3 ) = 0.11320782728669404;
51 aPoints( 1, 3 ) = 0.11320782728669404;
52
53 aPoints( 0, 4 ) = 0.4366550163931761;
54 aPoints( 1, 4 ) = 0.4366550163931761;
55
56 aPoints( 0, 5 ) = 0.21448345861926937;
57 aPoints( 1, 5 ) = 0.21448345861926937;
58
59 aPoints( 0, 6 ) = 0.030846895635588123;
60 aPoints( 1, 6 ) = 0.9383062087288238;
61
62 aPoints( 0, 7 ) = 0.49878016517846074;
63 aPoints( 1, 7 ) = 0.0024396696430785125;
64
65 aPoints( 0, 8 ) = 0.11320782728669404;
66 aPoints( 1, 8 ) = 0.7735843454266119;
67
68 aPoints( 0, 9 ) = 0.4366550163931761;
69 aPoints( 1, 9 ) = 0.12668996721364778;
70
71 aPoints( 0, 10 ) = 0.21448345861926937;
72 aPoints( 1, 10 ) = 0.5710330827614613;
73
74 aPoints( 0, 11 ) = 0.9383062087288238;
75 aPoints( 1, 11 ) = 0.030846895635588123;
76
77 aPoints( 0, 12 ) = 0.0024396696430785125;
78 aPoints( 1, 12 ) = 0.49878016517846074;
79
80 aPoints( 0, 13 ) = 0.7735843454266119;
81 aPoints( 1, 13 ) = 0.11320782728669404;
82
83 aPoints( 0, 14 ) = 0.12668996721364778;
84 aPoints( 1, 14 ) = 0.4366550163931761;
85
86 aPoints( 0, 15 ) = 0.5710330827614613;
87 aPoints( 1, 15 ) = 0.21448345861926937;
88
89 aPoints( 0, 16 ) = 0.014366662569555624;
90 aPoints( 1, 16 ) = 0.1593036198376935;
91
92 aPoints( 0, 17 ) = 0.04766406697215078;
93 aPoints( 1, 17 ) = 0.31063121631346313;
94
95 aPoints( 0, 18 ) = 0.8263297175927509;
96 aPoints( 1, 18 ) = 0.014366662569555624;
97
98 aPoints( 0, 19 ) = 0.6417047167143861;
99 aPoints( 1, 19 ) = 0.04766406697215078;
100
101 aPoints( 0, 20 ) = 0.1593036198376935;
102 aPoints( 1, 20 ) = 0.8263297175927509;
103
104 aPoints( 0, 21 ) = 0.31063121631346313;
105 aPoints( 1, 21 ) = 0.6417047167143861;
106
107 aPoints( 0, 22 ) = 0.1593036198376935;
108 aPoints( 1, 22 ) = 0.014366662569555624;
109
110 aPoints( 0, 23 ) = 0.31063121631346313;
111 aPoints( 1, 23 ) = 0.04766406697215078;
112
113 aPoints( 0, 24 ) = 0.8263297175927509;
114 aPoints( 1, 24 ) = 0.1593036198376935;
115
116 aPoints( 0, 25 ) = 0.6417047167143861;
117 aPoints( 1, 25 ) = 0.31063121631346313;
118
119 aPoints( 0, 26 ) = 0.014366662569555624;
120 aPoints( 1, 26 ) = 0.8263297175927509;
121
122 aPoints( 0, 27 ) = 0.04766406697215078;
123 aPoints( 1, 27 ) = 0.6417047167143861;
124
125 for( uint k=0; k<28; ++k )
126 {
127 aPoints( 2, k ) = 1.0
128 - aPoints( 0, k )
129 - aPoints( 1, k );
130 }
131
132 aWeights.set_size( 28 );
133
134 aWeights( 0 ) = 0.040722567354675644;
135 aWeights( 1 ) = 0.006124648475353982;
136 aWeights( 2 ) = 0.0062327459369406904;
137 aWeights( 3 ) = 0.02006462119065416;
138 aWeights( 4 ) = 0.031547436079949344;
139 aWeights( 5 ) = 0.033922553871847574;
140 aWeights( 6 ) = 0.006124648475353982;
141 aWeights( 7 ) = 0.0062327459369406904;
142 aWeights( 8 ) = 0.02006462119065416;
143 aWeights( 9 ) = 0.031547436079949344;
144 aWeights( 10 ) = 0.033922553871847574;
145 aWeights( 11 ) = 0.006124648475353982;
146 aWeights( 12 ) = 0.0062327459369406904;
147 aWeights( 13 ) = 0.02006462119065416;
148 aWeights( 14 ) = 0.031547436079949344;
149 aWeights( 15 ) = 0.033922553871847574;
150 aWeights( 16 ) = 0.007278811668904623;
151 aWeights( 17 ) = 0.020321424327943236;
152 aWeights( 18 ) = 0.007278811668904623;
153 aWeights( 19 ) = 0.020321424327943236;
154 aWeights( 20 ) = 0.007278811668904623;
155 aWeights( 21 ) = 0.020321424327943236;
156 aWeights( 22 ) = 0.007278811668904623;
157 aWeights( 23 ) = 0.020321424327943236;
158 aWeights( 24 ) = 0.007278811668904623;
159 aWeights( 25 ) = 0.020321424327943236;
160 aWeights( 26 ) = 0.007278811668904623;
161 aWeights( 27 ) = 0.020321424327943236;
162
163 aWeights( 0 ) = 0.0;
164 aWeights( 0 ) = 0.5 - sum( aWeights );
165 }
166
167// ----------------------------------------------------------------------------
168 } /* namespace integration */
169} /* end namespace belfem */
170
171#endif // BELFEM_FN_INTPOINTS_GAUSS_TRI28_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_tri28(Vector< real > &aWeights, Matrix< real > &aPoints)
11th order interpolation
Definition fn_intpoints_gauss_tri28.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