OGS
MeshEnums.h
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#pragma once
5
6#include <string>
7#include <vector>
8
9namespace MeshLib {
10
19
21static constexpr char const* mesh_item_type_strings[] = {
22 "node", "edge", "face", "cell", "integration_point"};
23
25static constexpr char const* toString(const MeshItemType t)
26{
27 return mesh_item_type_strings[static_cast<int>(t)];
28}
29
30std::ostream& operator<<(std::ostream& os, MeshItemType const& t);
31
36enum class MeshElemType
37{
39 POINT = 1,
40 LINE = 3,
41 QUAD = 9,
45 PRISM = 16,
47};
48
52enum class CellType
53{
55 POINT1 = 1,
56 LINE2 = 2,
57 LINE3 = 3,
58 TRI3 = 4,
59 TRI6 = 5,
60 QUAD4 = 6,
61 QUAD8 = 7,
62 QUAD9 = 8,
63 TET4 = 9,
64 TET10 = 10,
65 HEX8 = 11,
66 HEX20 = 12,
67 HEX27 = 13,
68 PRISM6 = 14,
69 PRISM15 = 15,
70 PRISM18 = 16,
74};
75
88
99
101std::string MeshElemType2String(const MeshElemType t);
102
104std::string MeshElemType2StringShort(const MeshElemType t);
105
107MeshElemType String2MeshElemType(const std::string &s);
108
110std::vector<MeshElemType> getMeshElemTypes();
111
113std::vector<std::string> getMeshElemTypeStringsShort();
114
116std::string CellType2String(const CellType t);
117
118std::string MeshQualityType2String(const MeshQualityType t);
120
121} // namespace MeshLib
MeshElemType String2MeshElemType(const std::string &s)
Given a string of the shortened name of the element type, this returns the corresponding MeshElemType...
Definition MeshEnums.cpp:84
CellType
Types of mesh elements supported by OpenGeoSys.
Definition MeshEnums.h:53
static constexpr char const * mesh_item_type_strings[]
Char array names for all of MeshItemType values.
Definition MeshEnums.h:21
MeshLib::MeshQualityType String2MeshQualityType(std::string const &s)
std::string MeshElemType2String(const MeshElemType t)
Given a MeshElemType this returns the appropriate string.
Definition MeshEnums.cpp:10
MeshQualityType
Describes a mesh quality metric.
Definition MeshEnums.h:80
std::vector< MeshElemType > getMeshElemTypes()
Returns a vector of all mesh element types.
std::string MeshElemType2StringShort(const MeshElemType t)
Given a MeshElemType this returns the appropriate string with a short name.
Definition MeshEnums.cpp:47
std::vector< std::string > getMeshElemTypeStringsShort()
Returns a vector of strings of mesh element types.
std::string CellType2String(const CellType t)
Given a MeshElemType this returns the appropriate string.
std::string MeshQualityType2String(const MeshQualityType t)
std::ostream & operator<<(std::ostream &os, Element const &e)
Definition Element.cpp:97
UseIntensityAs
Selection of possible interpretations for intensities.
Definition MeshEnums.h:93
static constexpr char const * toString(const MeshItemType t)
Returns a char array for a specific MeshItemType.
Definition MeshEnums.h:25
MeshElemType
Types of mesh elements supported by OpenGeoSys. Values are from VTKCellType enum.
Definition MeshEnums.h:37