BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
fn_intpoints_gauss_tri4.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_TRI4_HPP
13#define BELFEM_FN_INTPOINTS_GAUSS_TRI4_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
26 inline void
28 Vector <real> & aWeights,
29 Matrix <real> & aPoints )
30 {
31 // source : 10.1002/nme.1620070316
32 aPoints.set_size( 3, 4 );
33
34 aPoints( 0, 0 ) = 1.0 / 3.0;
35 aPoints( 1, 0 ) = 1.0 / 3.0;
36 aPoints( 2, 0 ) = 1.0 / 3.0;
37
38 aPoints( 0, 1 ) = 0.6;
39 aPoints( 1, 1 ) = 0.2;
40 aPoints( 2, 1 ) = 0.2;
41
42 aPoints( 0, 2 ) = 0.2;
43 aPoints( 1, 2 ) = 0.6;
44 aPoints( 2, 2 ) = 0.2;
45
46 aPoints( 0, 3 ) = 0.2;
47 aPoints( 1, 3 ) = 0.2;
48 aPoints( 2, 3 ) = 0.6;
49
50 aWeights.set_size( 4 );
51
52 aWeights( 0 ) = -27.0 / 96.0;
53 aWeights( 1 ) = 25.0 / 96.0;
54 aWeights( 2 ) = aWeights( 1 );
55 aWeights( 3 ) = aWeights( 1 );
56
57 aWeights( 0 ) = 0.0;
58 aWeights( 0 ) = 0.5 - sum( aWeights );
59
60 }
61
62// ----------------------------------------------------------------------------
63 } /* namespace integration */
64} /* namespace belfem */
65
66#endif //BELFEM_FN_INTPOINTS_GAUSS_TRI3_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_tri4(Vector< real > &aWeights, Matrix< real > &aPoints)
Definition fn_intpoints_gauss_tri4.hpp:27
USER GUIDES:
Definition cl_Capacitor.cpp:16
auto sum(const Vector< T > &aA) -> decltype(sum(aA.vector_data()))
Definition fn_sum.hpp:49