MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
lscartesiancellproperties.h
Go to the documentation of this file.
1// Copyright (C) 2024 The m-AIA AUTHORS
2//
3// This file is part of m-AIA (https://git.rwth-aachen.de/aia/m-AIA/m-AIA)
4//
5// SPDX-License-Identifier: LGPL-3.0-only
6
7#ifndef LSCELLPROPERTIES_H_
8#define LSCELLPROPERTIES_H_
9
10#include <bitset>
11#include <type_traits>
12
15
17// (for each set!)
19
20
21namespace maia {
22namespace ls {
23namespace cell {
24
26constexpr std::underlying_type<LsCell>::type p(const LsCell property) {
27 return static_cast<std::underlying_type<LsCell>::type>(property);
28}
29
30using BitsetType = std::bitset<p(LsCell::NumProperties)>;
31
32
34constexpr std::underlying_type<LsSet>::type setP(const LsSet property) {
35 return static_cast<std::underlying_type<LsSet>::type>(property);
36}
37
38using BitsetTypeSet = std::bitset<setP(LsSet::NumSetProperties)>;
39
40
41} // namespace cell
42} // namespace ls
43} // namespace maia
44
45#endif // LSCELLPROPERTIES_H_
LsSet
LS set Property Labels.
@ NumSetProperties
@ HasPositiveSign
@ WasGZero
@ IsGBndryCell
LsCell
LS cell Property Labels.
@ NumProperties
@ RegridTrigger
std::bitset< p(LsCell::NumProperties)> BitsetType
constexpr std::underlying_type< LsSet >::type setP(const LsSet property)
Converts property name to underlying integer value.
constexpr std::underlying_type< LsCell >::type p(const LsCell property)
Converts property name to underlying integer value.
std::bitset< setP(LsSet::NumSetProperties)> BitsetTypeSet
Namespace for auxiliary functions/classes.