BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
fn_matrix_type.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 FN_MATRIX_TYPE_HPP
13
#define FN_MATRIX_TYPE_HPP
14
#include "
en_SolverEnums.hpp
"
15
#include "
cl_SpMatrix.hpp
"
16
#include "
assert.hpp
"
17
18
namespace
belfem
19
{
20
inline
21
SpMatrixType
matrix_type
(
const
SolverType
aType )
22
{
23
switch
( aType )
24
{
25
case
SolverType::UMFPACK
:
26
{
27
return
SpMatrixType::CSC
;
28
}
29
case
SolverType::SUPERLU
:
30
{
31
return
SpMatrixType::CSC
;
32
}
33
case
SolverType::MUMPS
:
34
{
35
return
SpMatrixType::CSC
;
36
}
37
case
(
SolverType::PARDISO
) :
38
{
39
return
SpMatrixType::CSR
;
40
}
41
case
(
SolverType::PETSc
) :
42
{
43
return
SpMatrixType::CSR
;
44
}
45
case
(
SolverType::STRUMPACK
) :
46
{
47
return
SpMatrixType::CSR
;
48
}
49
default
:
50
{
51
BELFEM_ERROR
(
false
,
"Unknown solver type"
);
52
return
SpMatrixType::UNDEFINED
;
53
}
54
}
55
}
56
}
57
#endif
//FN_MATRIX_TYPE_HPP
assert.hpp
BELFEM_ERROR
#define BELFEM_ERROR(aCheck,...)
Definition
assert.hpp:264
cl_SpMatrix.hpp
en_SolverEnums.hpp
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
belfem::SpMatrixType
SpMatrixType
Definition
cl_SpMatrix.hpp:29
belfem::SpMatrixType::UNDEFINED
@ UNDEFINED
Definition
cl_SpMatrix.hpp:32
belfem::SpMatrixType::CSC
@ CSC
Definition
cl_SpMatrix.hpp:30
belfem::SpMatrixType::CSR
@ CSR
Definition
cl_SpMatrix.hpp:31
belfem::SolverType
SolverType
Definition
en_SolverEnums.hpp:23
belfem::SolverType::PETSc
@ PETSc
Definition
en_SolverEnums.hpp:29
belfem::SolverType::PARDISO
@ PARDISO
Definition
en_SolverEnums.hpp:28
belfem::SolverType::MUMPS
@ MUMPS
Definition
en_SolverEnums.hpp:26
belfem::SolverType::STRUMPACK
@ STRUMPACK
Definition
en_SolverEnums.hpp:27
belfem::SolverType::UMFPACK
@ UMFPACK
Definition
en_SolverEnums.hpp:24
belfem::SolverType::SUPERLU
@ SUPERLU
Definition
en_SolverEnums.hpp:25
belfem::matrix_type
SpMatrixType matrix_type(const SolverType aType)
Definition
fn_matrix_type.hpp:21
src
sparse
fn_matrix_type.hpp
Generated by
1.18.0