BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
fn_compliance_matrix.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_COMPLIANCE_MATRIX_HPP
13#define BELFEM_FN_COMPLIANCE_MATRIX_HPP
14#include "cl_Matrix.hpp"
15namespace belfem
16{
17 template< typename T >
18 inline void
19 compliance_matrix( const T & aE1,
20 const T & aE2,
21 const T & aE3,
22 const T & aNu23,
23 const T & aNu13,
24 const T & aNu12,
25 const T & aG23,
26 const T & aG31,
27 const T & aG12,
28 Matrix <T> & aS )
29 {
30 BELFEM_ASSERT( aS.n_rows() == 6
31 && aS.n_cols() == 6,
32 "target matrix must be allocated as 6x6" );
33
34 aS.fill( 0.0 );
35
36 aS( 0, 0 ) = 1.0 / aE1 ;
37 aS( 1, 0 ) = -aNu12 / aE2 ;
38 aS( 2, 0 ) = -aNu13 / aE3 ;
39
40 aS( 0, 1 ) = aS( 1, 0 ) ;
41 aS( 1, 1 ) = 1.0 / aE2 ;
42 aS( 2, 1 ) = -aNu23 / aE2 ;
43
44 aS( 0, 2 ) = aS( 2, 0 );
45 aS( 1, 2 ) = aS( 2, 1 ) ;
46 aS( 2, 2 ) = 1.0 / aE3 ;
47
48 aS( 3, 3 ) = 1.0 / aG23 ;
49 aS( 4, 4 ) = 1.0 / aG31 ;
50 aS( 5, 5 ) = 1.0 / aG12 ;
51 }
52}
53#endif //BELFEM_FN_COMPLIANCE_MATRIX_HPP
#define BELFEM_ASSERT(aCheck,...)
Definition assert.hpp:244
void fill(const T &aValue)
Definition cl_AR_Matrix.hpp:178
size_t n_rows() const
Definition cl_AR_Matrix.hpp:205
size_t n_cols() const
Definition cl_AR_Matrix.hpp:213
USER GUIDES:
Definition cl_Capacitor.cpp:16
void compliance_matrix(const T &aE1, const T &aE2, const T &aE3, const T &aNu23, const T &aNu13, const T &aNu12, const T &aG23, const T &aG31, const T &aG12, Matrix< T > &aS)
Definition fn_compliance_matrix.hpp:19