OGS
VtkOGSEnum.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#include "VtkOGSEnum.h"
5
6#include <vtkCellType.h>
7
8#include "BaseLib/Error.h"
9#include "BaseLib/cpp23.h"
10
12{
13 switch (ogs)
14 {
16 return VTK_VERTEX;
18 return VTK_LINE;
20 return VTK_QUADRATIC_EDGE;
22 return VTK_TRIANGLE;
24 return VTK_QUADRATIC_TRIANGLE;
26 return VTK_QUAD;
28 return VTK_QUADRATIC_QUAD;
30 return VTK_BIQUADRATIC_QUAD;
32 return VTK_HEXAHEDRON;
34 return VTK_QUADRATIC_HEXAHEDRON;
36 return VTK_TRIQUADRATIC_HEXAHEDRON;
38 return VTK_TETRA;
40 return VTK_QUADRATIC_TETRA;
42 return VTK_WEDGE;
44 return VTK_QUADRATIC_WEDGE;
46 return VTK_BIQUADRATIC_QUADRATIC_WEDGE;
48 return VTK_PYRAMID;
50 return VTK_QUADRATIC_PYRAMID;
52 return -1;
53 default:
55 "Unknown cell type in conversion from OGS to VTK. Given cell "
56 "type value is {}.",
58 }
59}
#define OGS_FATAL(...)
Definition Error.h:19
int OGSToVtkCellType(MeshLib::CellType ogs)
constexpr auto to_underlying(E e) noexcept
Converts an enumeration to its underlying type.
Definition cpp23.h:22
CellType
Types of mesh elements supported by OpenGeoSys.
Definition MeshEnums.h:53