From 893f8cc0fe54b99e7365e23f1768df1de0b5bab9 Mon Sep 17 00:00:00 2001 From: Robert K <robertk@posteo.org> Date: Wed, 19 Oct 2016 11:04:50 +0200 Subject: [PATCH] [feature] add vtk type polygon to geometry types. Grid output works, just the type was missing. --- dune/grid/io/file/vtk/common.hh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dune/grid/io/file/vtk/common.hh b/dune/grid/io/file/vtk/common.hh index e501814791..a184eea8bc 100644 --- a/dune/grid/io/file/vtk/common.hh +++ b/dune/grid/io/file/vtk/common.hh @@ -179,11 +179,12 @@ namespace Dune vertex = 1, line = 3, triangle = 5, + polygon = 7, quadrilateral = 9, tetrahedron = 10, hexahedron = 12, prism = 13, - pyramid = 14 + pyramid = 14 //, polyhedron = 42 }; //! mapping from GeometryType to VTKGeometryType @@ -203,6 +204,12 @@ namespace Dune if (t.isPrism()) return prism; if (t.isHexahedron()) return hexahedron; + if (t.isNone() ) + { + if( t.dim() == 2 ) return polygon; + // if( t.dim() == 3 ) return polyhedron; + } + DUNE_THROW(IOError,"VTKWriter: unsupported GeometryType " << t); } -- GitLab