BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
fn_intpoints_gauss_tet15.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_TET15_HPP
13#define BELFEM_FN_INTPOINTS_GAUSS_TET15_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 inline void
27 Vector <real> & aWeights,
28 Matrix <real> & aPoints )
29 {
30 // source 10.1016/0045-7825(86)90059-9
31
32 real tAlpha1 = 1.0/3.0;
33 real tBeta1 = 0.0;
34
35 real tAlpha2 = 90.0/990.0;
36 real tBeta2 = 1.0 - 3.0*tAlpha2;
37
38 real tAlpha3 = 0.0665501535736642813;
39 real tBeta3 = 0.5 - tAlpha3;
40
41 aPoints.set_size( 4, 15 );
42
43 aPoints( 0, 0 ) = 0.25;
44 aPoints( 1, 0 ) = 0.25;
45 aPoints( 2, 0 ) = 0.25;
46
47 aPoints( 0, 1 ) = tAlpha1;
48 aPoints( 1, 1 ) = tAlpha1;
49 aPoints( 2, 1 ) = tAlpha1;
50
51 aPoints( 0, 2 ) = tAlpha1;
52 aPoints( 1, 2 ) = tAlpha1;
53 aPoints( 2, 2 ) = tBeta1;
54
55 aPoints( 0, 3 ) = tAlpha1;
56 aPoints( 1, 3 ) = tBeta1;
57 aPoints( 2, 3 ) = tAlpha1;
58
59 aPoints( 0, 4 ) = tBeta1;
60 aPoints( 1, 4 ) = tAlpha1;
61 aPoints( 2, 4 ) = tAlpha1;
62
63
64 aPoints( 0, 5 ) = tAlpha2;
65 aPoints( 1, 5 ) = tAlpha2;
66 aPoints( 2, 5 ) = tAlpha2;
67
68 aPoints( 0, 6 ) = tAlpha2;
69 aPoints( 1, 6 ) = tAlpha2;
70 aPoints( 2, 6 ) = tBeta2;
71
72 aPoints( 0, 7 ) = tAlpha2;
73 aPoints( 1, 7 ) = tBeta2;
74 aPoints( 2, 7 ) = tAlpha2;
75
76 aPoints( 0, 8 ) = tBeta2;
77 aPoints( 1, 8 ) = tAlpha2;
78 aPoints( 2, 8 ) = tAlpha2;
79
80 aPoints( 0, 9 ) = tAlpha3;
81 aPoints( 1, 9 ) = tAlpha3;
82 aPoints( 2, 9 ) = tBeta3;
83
84 aPoints( 0, 10 ) = tAlpha3;
85 aPoints( 1, 10 ) = tBeta3;
86 aPoints( 2, 10 ) = tAlpha3;
87
88 aPoints( 0, 11 ) = tAlpha3;
89 aPoints( 1, 11 ) = tBeta3;
90 aPoints( 2, 11 ) = tBeta3;
91
92 aPoints( 0, 12 ) = tBeta3;
93 aPoints( 1, 12 ) = tAlpha3;
94 aPoints( 2, 12 ) = tAlpha3;
95
96 aPoints( 0, 13 ) = tBeta3;
97 aPoints( 1, 13 ) = tAlpha3;
98 aPoints( 2, 13 ) = tBeta3;
99
100 aPoints( 0, 14 ) = tBeta3;
101 aPoints( 1, 14 ) = tBeta3;
102 aPoints( 2, 14 ) = tAlpha3;
103
104 for( uint k=0; k<15; ++k )
105 {
106 aPoints( 3, k ) = 1.0
107 - aPoints( 0, k )
108 - aPoints( 1, k )
109 - aPoints( 2, k );
110 }
111
112 aWeights.set_size( 15 );
113
114 aWeights( 0 ) = 0.0302836780970891856;
115
116 aWeights( 1 ) = 0.00602678571428571597;
117 aWeights( 2 ) = 0.00602678571428571597;
118 aWeights( 3 ) = 0.00602678571428571597;
119 aWeights( 4 ) = 0.00602678571428571597;
120
121 aWeights( 5 ) = 0.0116452490860289742;
122 aWeights( 6 ) = 0.0116452490860289742;
123 aWeights( 7 ) = 0.0116452490860289742;
124 aWeights( 8 ) = 0.0116452490860289742;
125
126 aWeights( 9 ) = 0.0109491415613864534;
127 aWeights( 10 ) = 0.0109491415613864534;
128 aWeights( 11 ) = 0.0109491415613864534;
129 aWeights( 12 ) = 0.0109491415613864534;
130 aWeights( 13 ) = 0.0109491415613864534;
131 aWeights( 14 ) = 0.0109491415613864534;
132
133 aWeights( 0 ) = 0.0 ;
134 aWeights( 0 ) = 1./6. - sum( aWeights );
135 }
136
137// ----------------------------------------------------------------------------
138 } /* namespace integration */
139} /* namespace belfem */
140
141#endif //BELFEM_FN_INTPOINTS_GAUSS_TET15_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_tet15(Vector< real > &aWeights, Matrix< real > &aPoints)
Definition fn_intpoints_gauss_tet15.hpp:26
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
double real
Definition typedefs.hpp:36