OGS
VtkOGSEnum.h File Reference
#include "MeshEnums.h"
Include dependency graph for VtkOGSEnum.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int OGSToVtkCellType (MeshLib::CellType ogs)

Function Documentation

◆ OGSToVtkCellType()

int OGSToVtkCellType ( MeshLib::CellType ogs)

Definition at line 11 of file VtkOGSEnum.cpp.

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
constexpr auto to_underlying(E e) noexcept
Converts an enumeration to its underlying type.
Definition cpp23.h:22

References MeshLib::HEX20, MeshLib::HEX27, MeshLib::HEX8, MeshLib::INVALID, MeshLib::LINE2, MeshLib::LINE3, OGS_FATAL, MeshLib::POINT1, MeshLib::PRISM15, MeshLib::PRISM18, MeshLib::PRISM6, MeshLib::PYRAMID13, MeshLib::PYRAMID5, MeshLib::QUAD4, MeshLib::QUAD8, MeshLib::QUAD9, MeshLib::TET10, MeshLib::TET4, BaseLib::to_underlying(), MeshLib::TRI3, and MeshLib::TRI6.

Referenced by OGSMesh::getCells(), and MeshLib::VtkMappedMeshSource::RequestData().