BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
fn_intpoints_gauss_tri19.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#ifndef BELFEM_FN_INTPOINTS_GAUSS_TRI19_HPP
12#define BELFEM_FN_INTPOINTS_GAUSS_TRI19_HPP
13
14#include "typedefs.hpp"
15#include "cl_Vector.hpp"
16#include "cl_Matrix.hpp"
17#include "fn_sum.hpp"
18
19namespace belfem
20{
21 namespace integration
22 {
23// ----------------------------------------------------------------------------
24
33 inline void
35 Vector< real > & aWeights,
36 Matrix< real > & aPoints )
37 {
38 aPoints.set_size( 3, 19 );
39
40 aPoints( 0, 0 ) = 1./3.;
41 aPoints( 1, 0 ) = 1./3.;
42
43 aPoints( 0, 1 ) = 0.489682519198737;
44 aPoints( 1, 1 ) = 0.489682519198737;
45
46 aPoints( 0, 2 ) = 0.4370895914929355;
47 aPoints( 1, 2 ) = 0.4370895914929355;
48
49 aPoints( 0, 3 ) = 0.1882035356190322;
50 aPoints( 1, 3 ) = 0.1882035356190322;
51
52 aPoints( 0, 4 ) = 0.04472951339445297;
53 aPoints( 1, 4 ) = 0.04472951339445297;
54
55 aPoints( 0, 5 ) = 0.489682519198737;
56 aPoints( 1, 5 ) = 0.02063496160252598;
57
58 aPoints( 0, 6 ) = 0.4370895914929355;
59 aPoints( 1, 6 ) = 0.12582081701412895;
60
61 aPoints( 0, 7 ) = 0.1882035356190322;
62 aPoints( 1, 7 ) = 0.6235929287619356;
63
64 aPoints( 0, 8 ) = 0.04472951339445297;
65 aPoints( 1, 8 ) = 0.9105409732110941;
66
67 aPoints( 0, 9 ) = 0.02063496160252598;
68 aPoints( 1, 9 ) = 0.489682519198737;
69
70 aPoints( 0, 10 ) = 0.12582081701412895;
71 aPoints( 1, 10 ) = 0.4370895914929355;
72
73 aPoints( 0, 11 ) = 0.6235929287619356;
74 aPoints( 1, 11 ) = 0.1882035356190322;
75
76 aPoints( 0, 12 ) = 0.9105409732110941;
77 aPoints( 1, 12 ) = 0.04472951339445297;
78
79 aPoints( 0, 13 ) = 0.03683841205473626;
80 aPoints( 1, 13 ) = 0.741198598784498;
81
82 aPoints( 0, 14 ) = 0.22196298916076573;
83 aPoints( 1, 14 ) = 0.03683841205473626;
84
85 aPoints( 0, 15 ) = 0.741198598784498;
86 aPoints( 1, 15 ) = 0.22196298916076573;
87
88 aPoints( 0, 16 ) = 0.741198598784498;
89 aPoints( 1, 16 ) = 0.03683841205473626;
90
91 aPoints( 0, 17 ) = 0.22196298916076573;
92 aPoints( 1, 17 ) = 0.741198598784498;
93
94 aPoints( 0, 18 ) = 0.03683841205473626;
95 aPoints( 1, 18 ) = 0.22196298916076573;
96
97 for( uint k=0; k<19; ++k )
98 {
99 aPoints( 2, k ) = 1.0
100 - aPoints( 0, k )
101 - aPoints( 1, k );
102 }
103
104 aWeights.set_size( 19 );
105
106 aWeights( 0 ) = 0.04856789814139805;
107 aWeights( 1 ) = 0.015667350113569917;
108 aWeights( 2 ) = 0.038913770502387715;
109 aWeights( 3 ) = 0.03982386946360452;
110 aWeights( 4 ) = 0.01278883782934905;
111 aWeights( 5 ) = 0.015667350113569917;
112 aWeights( 6 ) = 0.038913770502387715;
113 aWeights( 7 ) = 0.03982386946360452;
114 aWeights( 8 ) = 0.01278883782934905;
115 aWeights( 9 ) = 0.015667350113569917;
116 aWeights( 10 ) = 0.038913770502387715;
117 aWeights( 11 ) = 0.03982386946360452;
118 aWeights( 12 ) = 0.01278883782934905;
119 aWeights( 13 ) = 0.021641769688644702;
120 aWeights( 14 ) = 0.021641769688644702;
121 aWeights( 15 ) = 0.021641769688644702;
122 aWeights( 16 ) = 0.021641769688644702;
123 aWeights( 17 ) = 0.021641769688644702;
124 aWeights( 18 ) = 0.021641769688644702;
125
126 aWeights( 0 ) = 0.0;
127 aWeights( 0 ) = 0.5 - sum( aWeights );
128 }
129
130// ----------------------------------------------------------------------------
131 } /* namespace integration */
132} /* end namespace belfem */
133
134#endif // BELFEM_FN_INTPOINTS_GAUSS_TRI19_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_tri19(Vector< real > &aWeights, Matrix< real > &aPoints)
9th order interpolation
Definition fn_intpoints_gauss_tri19.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