BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_DatabaseProjector.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_DATABASEPROJECTOR_HPP
13#define BELFEM_CL_DATABASEPROJECTOR_HPP
14
15#include "typedefs.hpp"
16#include "cl_Mesh.hpp"
17
18#include "cl_Vector.hpp"
19#include "cl_Matrix.hpp"
20#include "cl_Solver.hpp"
21#include "cl_SpMatrix.hpp"
22
23namespace belfem
24{
25 namespace database
26 {
34 {
35 const proc_t mCommRank ;
36 const proc_t mCommSize ;
37 const TensorMeshConfig * mConfig ;
38 Mesh * mMesh ;
39 string mLabel ;
40 SpMatrix * mA = nullptr;
41 Solver * mSolver = nullptr;
43 Matrix< real > mMel ;
44 Matrix< real > mAel ;
45 Matrix< real > mBel ;
46
47 public:
48
49 Projector( Mesh * aMesh ) ;
50
51 ~Projector();
52
53 void
54 project( const string & aField, Vector< real > & aResult );
55
56
57 void
58 set_label( const string & aLabel );
59
60 const string &
61 label() const ;
62
63 private:
64
65 void
66 allocate_system_matrix( Mesh * aMesh );
67
68 void
69 compute_element_matrices();
70
71 };
72
73 inline void
74 Projector::set_label( const string & aLabel )
75 {
76 mLabel = aLabel ;
77 }
78
79 inline const string &
81 {
82 return mLabel ;
83 }
84
85 }
86}
87#endif // BELFEM_CL_DATABASEPROJECTOR_HPP
Top-level container for all mesh entities.
Definition cl_Mesh.hpp:60
Unified interface to the sparse direct solvers.
Definition cl_Solver.hpp:34
Sparse matrix in CSR or CSC format.
Definition cl_SpMatrix.hpp:52
Definition cl_TensorMeshConfig.hpp:22
Projector(Mesh *aMesh)
Definition cl_DatabaseProjector.cpp:29
const string & label() const
Definition cl_DatabaseProjector.hpp:80
void set_label(const string &aLabel)
Definition cl_DatabaseProjector.hpp:74
void project(const string &aField, Vector< real > &aResult)
Definition cl_DatabaseProjector.cpp:216
Definition cl_DatabaseProjector.cpp:28
USER GUIDES:
Definition cl_Capacitor.cpp:16
int proc_t
Definition commtypes.hpp:29