BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
fn_intpoints_gauss_tri16.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_TRI16_HPP
13#define BELFEM_FN_INTPOINTS_GAUSS_TRI16_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, 16 );
40
41 aPoints( 0, 0 ) = 1./3.;
42 aPoints( 1, 0 ) = 1./3.;
43
44 aPoints( 0, 1 ) = 0.4592925882927229;
45 aPoints( 1, 1 ) = 0.4592925882927229;
46
47 aPoints( 0, 2 ) = 0.05054722831703103;
48 aPoints( 1, 2 ) = 0.05054722831703103;
49
50 aPoints( 0, 3 ) = 0.1705693077517601;
51 aPoints( 1, 3 ) = 0.1705693077517601;
52
53 aPoints( 0, 4 ) = 0.4592925882927229;
54 aPoints( 1, 4 ) = 0.0814148234145542;
55
56 aPoints( 0, 5 ) = 0.05054722831703103;
57 aPoints( 1, 5 ) = 0.898905543365938;
58
59 aPoints( 0, 6 ) = 0.1705693077517601;
60 aPoints( 1, 6 ) = 0.6588613844964798;
61
62 aPoints( 0, 7 ) = 0.0814148234145542;
63 aPoints( 1, 7 ) = 0.4592925882927229;
64
65 aPoints( 0, 8 ) = 0.898905543365938;
66 aPoints( 1, 8 ) = 0.05054722831703103;
67
68 aPoints( 0, 9 ) = 0.6588613844964798;
69 aPoints( 1, 9 ) = 0.1705693077517601;
70
71 aPoints( 0, 10 ) = 0.008394777409957211;
72 aPoints( 1, 10 ) = 0.7284923929554041;
73
74 aPoints( 0, 11 ) = 0.26311282963463867;
75 aPoints( 1, 11 ) = 0.008394777409957211;
76
77 aPoints( 0, 12 ) = 0.7284923929554041;
78 aPoints( 1, 12 ) = 0.26311282963463867;
79
80 aPoints( 0, 13 ) = 0.7284923929554041;
81 aPoints( 1, 13 ) = 0.008394777409957211;
82
83 aPoints( 0, 14 ) = 0.26311282963463867;
84 aPoints( 1, 14 ) = 0.7284923929554041;
85
86 aPoints( 0, 15 ) = 0.008394777409957211;
87 aPoints( 1, 15 ) = 0.26311282963463867;
88
89 for( uint k=0; k<16; ++k )
90 {
91 aPoints( 2, k ) = 1.0
92 - aPoints( 0, k )
93 - aPoints( 1, k );
94 }
95
96 aWeights.set_size( 16 );
97
98 aWeights( 0 ) = 0.0721578038388931;
99 aWeights( 1 ) = 0.04754581713364248;
100 aWeights( 2 ) = 0.016229248811599067;
101 aWeights( 3 ) = 0.0516086852673592;
102 aWeights( 4 ) = 0.04754581713364248;
103 aWeights( 5 ) = 0.016229248811599067;
104 aWeights( 6 ) = 0.0516086852673592;
105 aWeights( 7 ) = 0.04754581713364248;
106 aWeights( 8 ) = 0.016229248811599067;
107 aWeights( 9 ) = 0.0516086852673592;
108 aWeights( 10 ) = 0.013615157087217432;
109 aWeights( 11 ) = 0.013615157087217432;
110 aWeights( 12 ) = 0.013615157087217432;
111 aWeights( 13 ) = 0.013615157087217432;
112 aWeights( 14 ) = 0.013615157087217432;
113 aWeights( 15 ) = 0.013615157087217432;
114
115 aWeights( 0 ) = 0.0;
116 aWeights( 0 ) = 0.5 - sum( aWeights );
117 }
118
119// ----------------------------------------------------------------------------
120 } /* namespace integration */
121} /* end namespace belfem */
122
123#endif // BELFEM_FN_INTPOINTS_GAUSS_TRI16_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_tri16(Vector< real > &aWeights, Matrix< real > &aPoints)
8th order interpolation
Definition fn_intpoints_gauss_tri16.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