BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
fn_intpoints_gauss_tri25.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_TRI25_HPP
13#define BELFEM_FN_INTPOINTS_GAUSS_TRI25_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, 25 );
40
41 aPoints( 0, 0 ) = 1./3.;
42 aPoints( 1, 0 ) = 1./3.;
43
44 aPoints( 0, 1 ) = 0.03205537321694352;
45 aPoints( 1, 1 ) = 0.03205537321694352;
46
47 aPoints( 0, 2 ) = 0.14216110105656438;
48 aPoints( 1, 2 ) = 0.14216110105656438;
49
50 aPoints( 0, 3 ) = 0.03205537321694352;
51 aPoints( 1, 3 ) = 0.935889253566113;
52
53 aPoints( 0, 4 ) = 0.14216110105656438;
54 aPoints( 1, 4 ) = 0.7156777978868712;
55
56 aPoints( 0, 5 ) = 0.935889253566113;
57 aPoints( 1, 5 ) = 0.03205537321694352;
58
59 aPoints( 0, 6 ) = 0.7156777978868712;
60 aPoints( 1, 6 ) = 0.14216110105656438;
61
62 aPoints( 0, 7 ) = 0.028367665339938453;
63 aPoints( 1, 7 ) = 0.1637017337371825;
64
65 aPoints( 0, 8 ) = 0.029619889488729734;
66 aPoints( 1, 8 ) = 0.369146781827811;
67
68 aPoints( 0, 9 ) = 0.14813288578382056;
69 aPoints( 1, 9 ) = 0.32181299528883545;
70
71 aPoints( 0, 10 ) = 0.807930600922879;
72 aPoints( 1, 10 ) = 0.028367665339938453;
73
74 aPoints( 0, 11 ) = 0.6012333286834592;
75 aPoints( 1, 11 ) = 0.029619889488729734;
76
77 aPoints( 0, 12 ) = 0.530054118927344;
78 aPoints( 1, 12 ) = 0.14813288578382056;
79
80 aPoints( 0, 13 ) = 0.1637017337371825;
81 aPoints( 1, 13 ) = 0.807930600922879;
82
83 aPoints( 0, 14 ) = 0.369146781827811;
84 aPoints( 1, 14 ) = 0.6012333286834592;
85
86 aPoints( 0, 15 ) = 0.32181299528883545;
87 aPoints( 1, 15 ) = 0.530054118927344;
88
89 aPoints( 0, 16 ) = 0.1637017337371825;
90 aPoints( 1, 16 ) = 0.028367665339938453;
91
92 aPoints( 0, 17 ) = 0.369146781827811;
93 aPoints( 1, 17 ) = 0.029619889488729734;
94
95 aPoints( 0, 18 ) = 0.32181299528883545;
96 aPoints( 1, 18 ) = 0.14813288578382056;
97
98 aPoints( 0, 19 ) = 0.807930600922879;
99 aPoints( 1, 19 ) = 0.1637017337371825;
100
101 aPoints( 0, 20 ) = 0.6012333286834592;
102 aPoints( 1, 20 ) = 0.369146781827811;
103
104 aPoints( 0, 21 ) = 0.530054118927344;
105 aPoints( 1, 21 ) = 0.32181299528883545;
106
107 aPoints( 0, 22 ) = 0.028367665339938453;
108 aPoints( 1, 22 ) = 0.807930600922879;
109
110 aPoints( 0, 23 ) = 0.029619889488729734;
111 aPoints( 1, 23 ) = 0.6012333286834592;
112
113 aPoints( 0, 24 ) = 0.14813288578382056;
114 aPoints( 1, 24 ) = 0.530054118927344;
115
116 for( uint k=0; k<25; ++k )
117 {
118 aPoints( 2, k ) = 1.0
119 - aPoints( 0, k )
120 - aPoints( 1, k );
121 }
122
123 aWeights.set_size( 25 );
124
125 aWeights( 0 ) = 0.040871664573142986;
126 aWeights( 1 ) = 0.006676484406574783;
127 aWeights( 2 ) = 0.022978981802372365;
128 aWeights( 3 ) = 0.006676484406574783;
129 aWeights( 4 ) = 0.022978981802372365;
130 aWeights( 5 ) = 0.006676484406574783;
131 aWeights( 6 ) = 0.022978981802372365;
132 aWeights( 7 ) = 0.012648878853644192;
133 aWeights( 8 ) = 0.017092324081479714;
134 aWeights( 9 ) = 0.03195245319821202;
135 aWeights( 10 ) = 0.012648878853644192;
136 aWeights( 11 ) = 0.017092324081479714;
137 aWeights( 12 ) = 0.03195245319821202;
138 aWeights( 13 ) = 0.012648878853644192;
139 aWeights( 14 ) = 0.017092324081479714;
140 aWeights( 15 ) = 0.03195245319821202;
141 aWeights( 16 ) = 0.012648878853644192;
142 aWeights( 17 ) = 0.017092324081479714;
143 aWeights( 18 ) = 0.03195245319821202;
144 aWeights( 19 ) = 0.012648878853644192;
145 aWeights( 20 ) = 0.017092324081479714;
146 aWeights( 21 ) = 0.03195245319821202;
147 aWeights( 22 ) = 0.012648878853644192;
148 aWeights( 23 ) = 0.017092324081479714;
149 aWeights( 24 ) = 0.03195245319821202;
150
151 aWeights( 0 ) = 0.0;
152 aWeights( 0 ) = 0.5 - sum( aWeights );
153 }
154
155// ----------------------------------------------------------------------------
156 } /* namespace integration */
157} /* end namespace belfem */
158
159#endif // BELFEM_FN_INTPOINTS_GAUSS_TRI25_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_tri25(Vector< real > &aWeights, Matrix< real > &aPoints)
10th order interpolation
Definition fn_intpoints_gauss_tri25.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