6#include <boost/algorithm/string/predicate.hpp>
88 if (boost::iequals(s,
"point"))
92 if (boost::iequals(s,
"line"))
96 if (boost::iequals(s,
"quad") || boost::iequals(s,
"Quadrilateral"))
100 if (boost::iequals(s,
"hex") || boost::iequals(s,
"Hexahedron"))
104 if (boost::iequals(s,
"tri") || boost::iequals(s,
"Triangle"))
108 if (boost::iequals(s,
"tet") || boost::iequals(s,
"Tetrahedron"))
112 if (boost::iequals(s,
"pris") || boost::iequals(s,
"Prism"))
116 if (boost::iequals(s,
"pyra") || boost::iequals(s,
"Pyramid"))
125 std::vector<MeshElemType> vec;
139 std::vector<std::string> vec;
141 std::transform(mesh_elem_types.begin(), mesh_elem_types.end(),
142 std::back_inserter(vec),
143 [](
auto const& element_type)
144 { return MeshElemType2StringShort(element_type); });
150#define RETURN_CELL_TYPE_STR(t, type) \
151 if ((t) == CellType::type) \
174#undef RETURN_CELL_TYPE_STR
181 return "ElementSize";
189 return "EquiAngleSkew";
193 return "RadiusEdgeRatio";
197 return "SizeDifference";
204 if (boost::iequals(s,
"ElementSize"))
208 if (boost::iequals(s,
"EdgeRatio"))
212 if (boost::iequals(s,
"EquiAngleSkew"))
216 if (boost::iequals(s,
"RadiusEdgeRatio"))
220 if (boost::iequals(s,
"SizeDifference"))
250 "The mesh item type '{:s}' is unknown. Valid values are "
251 "'cell', 'integration_point', 'edge', 'face' and 'node'.",
#define RETURN_CELL_TYPE_STR(t, type)
MeshElemType String2MeshElemType(const std::string &s)
CellType
Types of mesh elements supported by OpenGeoSys.
MeshLib::MeshQualityType String2MeshQualityType(std::string const &s)
std::string MeshElemType2String(const MeshElemType t)
Given a MeshElemType this returns the appropriate string.
MeshQualityType
Describes a mesh quality metric.
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.
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)
static constexpr char const * toString(const MeshItemType t)
Returns a char array for a specific MeshItemType.
MeshElemType
Types of mesh elements supported by OpenGeoSys. Values are from VTKCellType enum.
MeshItemType string2MeshItemType(const std::string &s)