BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
fn_preferred_matrix_format.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_PREFERRED_MATRIX_FORMAT_HPP
13
#define FN_PREFERRED_MATRIX_FORMAT_HPP
14
#include "
cl_SpMatrix.hpp
"
15
#include "
en_SolverEnums.hpp
"
16
namespace
belfem
17
{
18
inline
SpMatrixType
19
preferred_matrix_format
(
SolverType
aSolver )
20
{
21
switch
( aSolver )
22
{
23
case
(
SolverType::UMFPACK
) :
24
case
(
SolverType::SUPERLU
) :
25
{
26
return
SpMatrixType::CSC
;
27
}
28
case
(
SolverType::STRUMPACK
) :
29
case
(
SolverType::PARDISO
) :
30
case
(
SolverType::PETSc
) :
31
case
(
SolverType::MUMPS
) :
32
{
33
return
SpMatrixType::CSR
;
34
}
35
default
:
36
{
37
return
SpMatrixType::CSR
;
38
}
39
}
40
}
41
}
42
#endif
//FN_PREFERRED_MATRIX_FORMAT_HPP
cl_SpMatrix.hpp
en_SolverEnums.hpp
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
belfem::SpMatrixType
SpMatrixType
Definition
cl_SpMatrix.hpp:29
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::preferred_matrix_format
SpMatrixType preferred_matrix_format(SolverType aSolver)
Definition
fn_preferred_matrix_format.hpp:19
src
sparse
fn_preferred_matrix_format.hpp
Generated by
1.18.0