BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
fn_intpoints_gauss_tet4.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_TET4_HPP
13#define BELFEM_FN_INTPOINTS_GAUSS_TET4_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 inline void
26 Vector <real> & aWeights,
27 Matrix <real> & aPoints )
28 {
29 real tAlpha = ( 5.0 - std::sqrt( 5.0 ) )/20.0;
30 real tBeta = 1.0 - 3.0*tAlpha;
31
32 aPoints.set_size( 4, 4 );
33
34 aPoints( 0, 0 ) = tBeta;
35 aPoints( 1, 0 ) = tAlpha;
36 aPoints( 2, 0 ) = tAlpha;
37 aPoints( 3, 0 ) = tAlpha;
38
39 aPoints( 0, 1 ) = tAlpha;
40 aPoints( 1, 1 ) = tBeta;
41 aPoints( 2, 1 ) = tAlpha;
42 aPoints( 3, 1 ) = tAlpha;
43
44 aPoints( 0, 2 ) = tAlpha;
45 aPoints( 1, 2 ) = tAlpha;
46 aPoints( 2, 2 ) = tBeta;
47 aPoints( 3, 2 ) = tAlpha;
48
49 aPoints( 0, 3 ) = tAlpha;
50 aPoints( 1, 3 ) = tAlpha;
51 aPoints( 2, 3 ) = tAlpha;
52 aPoints( 3, 3 ) = tBeta;
53
54 aWeights.set_size( 4, 1.0/24.0 );
55 }
56
57// ----------------------------------------------------------------------------
58 } /* namespace integration */
59} /* namespace belfem */
60
61#endif //BELFEM_FN_INTPOINTS_GAUSS_TET4_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_tet4(Vector< real > &aWeights, Matrix< real > &aPoints)
Definition fn_intpoints_gauss_tet4.hpp:25
USER GUIDES:
Definition cl_Capacitor.cpp:16
double real
Definition typedefs.hpp:36