OGS
MeshPropertyDataType.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
5
6// See https://www.xdmf.org/index.php/XDMF_Model_and_Format#Topology (Arbitrary)
7std::pair<std::string, std::size_t> ParentDataType2String(ParentDataType p)
8{
9 // not used in OGS ParentDataType::POLYGON, ParentDataType::POLYHEDRON,
10 // ParentDataType::HEXAHEDRON_24
11 if (p == ParentDataType::MIXED)
12 {
13 return {"Mixed", 1};
14 }
15
17 {
18 return {"Polyvertex", 1};
19 }
21 {
22 return {"Polyline", 2};
23 }
25 {
26 return {"Triangle", 3};
27 }
29 {
30 return {"Quadrilateral", 4};
31 }
33 {
34 return {"Tetrahedron", 4};
35 }
37 {
38 return {"Pyramid", 5};
39 }
40 if (p == ParentDataType::WEDGE)
41 {
42 return {"Wedge", 6};
43 }
45 {
46 return {"Hexahedron", 8};
47 }
49 {
50 return {"Edge_3", 3};
51 }
53 {
54 return {"Quadrilateral_9", 9};
55 }
57 {
58 return {"Triangle_6", 6};
59 }
61 {
62 return {"Quadrilateral_8", 8};
63 }
65 {
66 return {"Tetrahedron_10", 10};
67 }
69 {
70 return {"Pyramid_13", 13};
71 }
73 {
74 return {"Wedge_15", 15};
75 }
77 {
78 return {"Wedge_18", 18};
79 }
81 {
82 return {"Hexahedron_20", 20};
83 }
85 {
86 return {"Hexahedron_27", 27};
87 }
88 return {"Mixed", 1};
89}
std::pair< std::string, std::size_t > ParentDataType2String(ParentDataType p)