OGS
VtkOGSEnum.cpp
Go to the documentation of this file.
1
11#include "VtkOGSEnum.h"
12
13#include <vtkCellType.h>
14
15#include "BaseLib/Error.h"
16#include "BaseLib/cpp23.h"
17
19{
20 switch (ogs)
21 {
23 return VTK_VERTEX;
25 return VTK_LINE;
27 return VTK_QUADRATIC_EDGE;
29 return VTK_TRIANGLE;
31 return VTK_QUADRATIC_TRIANGLE;
33 return VTK_QUAD;
35 return VTK_QUADRATIC_QUAD;
37 return VTK_BIQUADRATIC_QUAD;
39 return VTK_HEXAHEDRON;
41 return VTK_QUADRATIC_HEXAHEDRON;
43 return VTK_TRIQUADRATIC_HEXAHEDRON;
45 return VTK_TETRA;
47 return VTK_QUADRATIC_TETRA;
49 return VTK_WEDGE;
51 return VTK_QUADRATIC_WEDGE;
53 return VTK_BIQUADRATIC_QUADRATIC_WEDGE;
55 return VTK_PYRAMID;
57 return VTK_QUADRATIC_PYRAMID;
59 return -1;
60 default:
62 "Unknown cell type in conversion from OGS to VTK. Given cell "
63 "type value is {}.",
65 }
66}
#define OGS_FATAL(...)
Definition Error.h:26
int OGSToVtkCellType(MeshLib::CellType ogs)
constexpr auto to_underlying(E e) noexcept
Converts an enumeration to its underlying type.
Definition cpp23.h:29
CellType
Types of mesh elements supported by OpenGeoSys.
Definition MeshEnums.h:43