#1700 P1VTKFunction cannot take a std::vector
Metadata
Property | Value |
---|---|
Reported by | Bernd Flemisch (bernd@iws.uni-stuttgart.de) |
Reported at | Jul 21, 2015 16:25 |
Type | Bug Report |
Version | Git (pre2.4) [cmake] |
Operating System | Unspecified / All |
Last edited by | Jö Fahlke (jorrit@jorrit.de) |
Last edited at | Jul 24, 2015 20:23 |
Closed by | Jö Fahlke (jorrit@jorrit.de) |
Closed at | Jul 24, 2015 20:23 |
Closed in version | Unknown |
Resolution | Fixed |
Comment |
Description
The attached test fails with In file included from /temp/bernd/DUNE24/dune-grid/dune/grid/io/file/vtk/vtkwriter.hh:30:0, from /temp/bernd/DUNE24/dune-grid/dune/grid/test/test-vtk.cc:6: /temp/bernd/DUNE24/dune-grid/dune/grid/io/file/vtk/function.hh: In instantiation of ‘double Dune::P1VTKFunction<GV, V>::evaluate(int, const Entity&, const Dune::FieldVector<typename Dune::VTKFunction::ctype, dim>&) const [with GV = Dune::GridView<Dune::DefaultLeafGridViewTraits<const Dune::YaspGrid<2>, (Dune::PartitionIteratorType)4u> >; V = std::vector; Dune::P1VTKFunction<GV, V>::Entity = Dune::Entity<0, 2, const Dune::YaspGrid<2>, Dune::YaspEntity>; typename Dune::VTKFunction::ctype = double]’: /temp/bernd/DUNE24/dune-grid/dune/grid/test/test-vtk.cc:25:1: required from here /temp/bernd/DUNE24/dune-grid/dune/grid/io/file/vtk/function.hh:224:59: error: no type named ‘field_type’ in ‘class std::vector’ std::vector<FieldVector<typename V::field_type,1> > cornerValues(nVertices); ^ The reason is that the P1VTKFunction (since when?) expects a vector type that offers field_type. Which a std::vector does not. In order to restore the functionality field_type should be replaced by value_type. A patch against the master is attached. Please merge this also to 2.4.