24#ifndef DUMUX_IO_VTK_PRECISION_HH
25#define DUMUX_IO_VTK_PRECISION_HH
29#include <dune/grid/io/file/vtk/common.hh>
33using Dune::VTK::Precision;
43 static const std::array<std::pair<std::string_view, Precision>, 5> nameToPrecision
45 {
"Float32", Precision::float32 },
46 {
"Float64", Precision::float64 },
47 {
"UInt32", Precision::uint32 },
48 {
"UInt8", Precision::uint8 },
49 {
"Int32", Precision::int32 },
52 for (
const auto& [name, precision] : nameToPrecision)
53 if (name == precisionName)
56 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: precision.hh:39
Definition: fieldtype.hh:27