Skip to content
Snippets Groups Projects
Commit ed614b81 authored by Tom Fischer's avatar Tom Fischer
Browse files

[MeL/IO/XDMF] Values from website-docu to enum ParentDataType

parent ab809570
No related branches found
No related tags found
No related merge requests found
/**
* \file
* \brief Enum ParentDataType to string translations
* \copyright
* Copyright (c) 2012-2024, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*/
#include "MeshPropertyDataType.h"
// See https://www.xdmf.org/index.php/XDMF_Model_and_Format#Topology (Arbitrary)
std::string ParentDataType2String(ParentDataType p)
{
// not used in OGS ParentDataType::POLYGON, ParentDataType::POLYHEDRON,
// ParentDataType::HEXAHEDRON_24
if (p == ParentDataType::MIXED)
{
return "Mixed";
}
if (p == ParentDataType::POLYVERTEX)
{
return "Polyvertex";
}
if (p == ParentDataType::POLYLINE)
{
return "Polyline";
}
if (p == ParentDataType::TRIANGLE)
{
return "Triangle";
}
if (p == ParentDataType::QUADRILATERAL)
{
return "Quadrilateral";
}
if (p == ParentDataType::TETRAHEDRON)
{
return "Tetrahedron";
}
if (p == ParentDataType::PYRAMID)
{
return "Pyramid";
}
if (p == ParentDataType::WEDGE)
{
return "Wedge";
}
if (p == ParentDataType::HEXAHEDRON)
{
return "Hexahedron";
}
if (p == ParentDataType::EDGE_3)
{
return "Edge_3";
}
if (p == ParentDataType::QUADRILATERAL_9)
{
return "Quadrilateral_9";
}
if (p == ParentDataType::TRIANGLE_6)
{
return "Triangle_6";
}
if (p == ParentDataType::QUADRILATERAL_8)
{
return "Quadrilateral_8";
}
if (p == ParentDataType::TETRAHEDRON_10)
{
return "Tetrahedron_10";
}
if (p == ParentDataType::PYRAMID_13)
{
return "Pyramid_13";
}
if (p == ParentDataType::WEDGE_15)
{
return "Wedge_15";
}
if (p == ParentDataType::WEDGE_18)
{
return "Wedge_18";
}
if (p == ParentDataType::HEXAHEDRON_20)
{
return "Hexahedron_20";
}
if (p == ParentDataType::HEXAHEDRON_27)
{
return "Hexahedron_27";
}
return "Mixed";
}
......@@ -2,7 +2,7 @@
* \file
* \author Tobias Meisel
* \date 2020-12-15
* \brief Enum for all propertyVector data types
* \brief Enum for all propertyVector data types and XDMF ParentDataTypes
* \copyright
* Copyright (c) 2012-2024, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
......@@ -12,6 +12,8 @@
#pragma once
#include <string>
// TODO (tm) If used on several other places move definition of propertyVector
enum class MeshPropertyDataType
{
......@@ -29,12 +31,33 @@ enum class MeshPropertyDataType
enum_length
};
// See https://www.xdmf.org/index.php/XDMF_Model_and_Format - only relevant of
// See https://www.xdmf.org/index.php/XDMF_Model_and_Format - only relevant if
// TopologyType(s) added, structure is open to be extended with GridType(s)
// and ItemType(s).
enum class ParentDataType
{
Polyvertex=0,
Mixed,
};
\ No newline at end of file
MIXED = 0,
POLYVERTEX = 1,
POLYLINE = 2,
// POLYGON = 3, // not used in OGS
TRIANGLE = 4,
QUADRILATERAL = 5,
TETRAHEDRON = 6,
PYRAMID = 7,
WEDGE = 8,
HEXAHEDRON = 9,
// POLYHEDRON = 16, // not used in OGS
EDGE_3 = 34,
QUADRILATERAL_9 = 35,
TRIANGLE_6 = 36,
QUADRILATERAL_8 = 37,
TETRAHEDRON_10 = 38,
PYRAMID_13 = 39,
WEDGE_15 = 40,
WEDGE_18 = 41,
HEXAHEDRON_20 = 48,
// HEXAHEDRON_24 = 49, // not used in OGS
HEXAHEDRON_27 = 50
};
std::string ParentDataType2String(ParentDataType p);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment