24#ifndef DUMUX_IO_VTK_PRECISION_HH
25#define DUMUX_IO_VTK_PRECISION_HH
30#include <dune/common/version.hh>
31#include <dune/grid/io/file/vtk/common.hh>
35#if DUNE_VERSION_LT(DUNE_GRID, 2, 7)
46using Dune::VTK::Precision;
57 static const std::array<std::pair<std::string_view, Precision>, 5> nameToPrecision
59 {
"Float32", Precision::float32 },
60 {
"Float64", Precision::float64 },
61 {
"UInt32", Precision::uint32 },
62 {
"UInt8", Precision::uint8 },
63 {
"Int32", Precision::int32 },
66 for (
const auto& [name, precision] : nameToPrecision)
67 if (name == precisionName)
70 DUNE_THROW(Dune::InvalidStateException,
"Unknown precision type " << precisionName);
Precision stringToPrecision(std::string_view precisionName)
Maps a string (e.g. from input) to a Dune precision type.
Definition: vtkprecision.hh:53
Definition: vtkfunction.hh:37