BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
en_CutAlgorithm.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_EN_CUTALGORITHM_HPP
13
#define BELFEM_EN_CUTALGORITHM_HPP
14
#include "
typedefs.hpp
"
15
#include "
stringtools.hpp
"
16
17
namespace
belfem
18
{
19
namespace
mesh
20
{
21
enum class
CutAlgorithm
22
{
23
Pellikka
= 0,
24
CCR
= 1,
25
BeltedTree
= 2,
26
PellikkaGeneralized
= 3,
27
UNDEFINED = 4
28
};
29
30
inline
string
31
to_string
(
CutAlgorithm
aCutAlgorithm )
32
{
33
switch
( aCutAlgorithm )
34
{
35
case
CutAlgorithm::Pellikka
:
36
return
"pellikka"
;
37
case
CutAlgorithm::CCR
:
38
return
"ccr"
;
39
case
CutAlgorithm::BeltedTree
:
40
return
"belted tree"
;
41
case
CutAlgorithm::PellikkaGeneralized
:
42
return
"generalized pellikka"
;
43
default
:
44
return
"undefined"
;
45
}
46
}
47
48
inline
CutAlgorithm
49
to_cut_algorithm
(
const
string
& aCutAlgorithm )
50
{
51
uint
tNumAlgorithms =
static_cast<
uint
>
(
CutAlgorithm::UNDEFINED
);
52
string
tCutAlgorithm =
string_to_lower
( aCutAlgorithm );
53
54
for
(
uint
a=0; a<tNumAlgorithms; ++a )
55
{
56
if
(
to_string
(
static_cast<
CutAlgorithm
>
( a ) ) == tCutAlgorithm )
57
{
58
return
static_cast<
CutAlgorithm
>
( a );
59
}
60
}
61
return
CutAlgorithm::UNDEFINED
;
62
}
63
64
}
65
}
66
67
#endif
//BELFEM_EN_CUTALGORITHM_HPP
belfem::mesh::BeltedTree
Definition
cl_BeltedTree.hpp:27
belfem::mesh
Definition
cl_EF_EdgeFunction.hpp:17
belfem::mesh::CutAlgorithm
CutAlgorithm
Definition
en_CutAlgorithm.hpp:22
belfem::mesh::CutAlgorithm::UNDEFINED
@ UNDEFINED
Definition
en_CutAlgorithm.hpp:27
belfem::mesh::CutAlgorithm::BeltedTree
@ BeltedTree
Definition
en_CutAlgorithm.hpp:25
belfem::mesh::CutAlgorithm::CCR
@ CCR
Definition
en_CutAlgorithm.hpp:24
belfem::mesh::CutAlgorithm::PellikkaGeneralized
@ PellikkaGeneralized
Definition
en_CutAlgorithm.hpp:26
belfem::mesh::CutAlgorithm::Pellikka
@ Pellikka
Definition
en_CutAlgorithm.hpp:23
belfem::mesh::to_cut_algorithm
CutAlgorithm to_cut_algorithm(const string &aCutAlgorithm)
Definition
en_CutAlgorithm.hpp:49
belfem::mesh::to_string
string to_string(CutAlgorithm aCutAlgorithm)
Definition
en_CutAlgorithm.hpp:31
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
belfem::uint
unsigned int uint
Definition
typedefs.hpp:30
belfem::string_to_lower
std::string string_to_lower(const std::string &aString)
convert the string to lower case
Definition
stringtools.cpp:267
stringtools.hpp
typedefs.hpp
src
homology
en_CutAlgorithm.hpp
Generated by
1.18.0