BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_FEM_Tmatrix.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_CL_FEM_TMATRIX_HPP
13#define BELFEM_CL_FEM_TMATRIX_HPP
14#include "typedefs.hpp"
15#include "cl_Matrix.hpp"
16
17namespace belfem
18{
19 namespace fem
20 {
21 class Tmatrix
22 {
23 const uint mNumRows ;
24 const uint mNumCols ;
25 const uint mNumNonZeros ;
26
27 // data are stored in CSR format
28 uint * mPointers = nullptr ; // for rows
29 uint * mIndices = nullptr ; // for columns
30 real * mValues = nullptr ;
31
32//------------------------------------------------------------------------------
33 public:
34//------------------------------------------------------------------------------
35
36 Tmatrix( const Matrix< real > & aMatrix );
37
38//------------------------------------------------------------------------------
39
40 ~Tmatrix() ;
41
42//------------------------------------------------------------------------------
43
47 void
48 project( const Vector< real > & aA, Vector< real > & aB ) const ;
49
50//------------------------------------------------------------------------------
51
55 void
56 project( const Matrix< real > & aA, Matrix< real > & aB ) const ;
57
58//------------------------------------------------------------------------------
59
63 void
64 get_matrix( Matrix< real > & aMatrix ) const ;
65
66//------------------------------------------------------------------------------
67
71 void
72 print() const ;
73
74//------------------------------------------------------------------------------
75 private:
76//------------------------------------------------------------------------------
77
78 uint
79 count_nnz( const Matrix< real > & aMatrix );
80
81//------------------------------------------------------------------------------
82 };
83 }
84}
85#endif //BELFEM_CL_FEM_TMATRIX_HPP
Tmatrix(const Matrix< real > &aMatrix)
Definition cl_FEM_Tmatrix.cpp:19
void project(const Vector< real > &aA, Vector< real > &aB) const
performs the operation B_j = T_ij * A_i ( B = T^T A )
Definition cl_FEM_Tmatrix.cpp:136
void get_matrix(Matrix< real > &aMatrix) const
for debugging
Definition cl_FEM_Tmatrix.cpp:158
void print() const
for debugging
Definition cl_FEM_Tmatrix.cpp:176
Definition cl_IFB_LINE3.hpp:21
USER GUIDES:
Definition cl_Capacitor.cpp:16
unsigned int uint
Definition typedefs.hpp:30
double real
Definition typedefs.hpp:36