MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
cartesiangridcellproperties.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 GRIDCELLPROPERTIES_H_
8#define GRIDCELLPROPERTIES_H_
9
10#include <bitset>
11#include <type_traits>
12
14enum class GridCell {
16 IsHalo,
17 // IsGhost,
25 // <<< add new properties here
26 // ---
28};
29
30
31namespace maia {
32namespace grid {
33namespace cell {
34
36constexpr std::underlying_type<GridCell>::type p(const GridCell property) {
37 return static_cast<std::underlying_type<GridCell>::type>(property);
38}
39
40using BitsetType = std::bitset<p(GridCell::NumProperties)>;
41
42} // namespace cell
43} // namespace grid
44} // namespace maia
45
46#endif // GRIDCELLPROPERTIES_H_
GridCell
Grid cell Property Labels.
@ IsPartLvlAncestor
cell is ancestor of partition level
@ WasCoarsened
cell was recently coarsened
@ IsPartitionCell
cell is a partition cell
@ WasNewlyCreated
cell was recently created
@ WasRefined
cell was recently refined
constexpr std::underlying_type< GridCell >::type p(const GridCell property)
Converts property name to underlying integer value.
std::bitset< p(GridCell::NumProperties)> BitsetType
Namespace for auxiliary functions/classes.