]> https://gitweb.dealii.org/ - dealii.git/commit
Fix GridIn::read_vtk().
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 20 Oct 2016 22:53:56 +0000 (17:53 -0500)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 20 Oct 2016 22:53:56 +0000 (17:53 -0500)
commit05ad2b9a9c7fe9e63bcf2c23757e42fe37c3f01a
treedd76c20e4b14d7b20c9515bebe0202876d8d3700
parent16a9077b11ca564b39c666bb3fb0d526f2e9ebb4
Fix GridIn::read_vtk().

The function reads a section of VTK files of the form

CELL_DATA 4
SCALARS MaterialID double 1
LOOKUP_TABLE default
1.000000
2.000000
3.000000
4.000000

but internally (despite the fact that the field is declared
as 'double' above) reads them as integers. This leads to
wrong results if they are given as floating point numbers,
as in the case above.

While there also add an assertion an clean things up
slightly.
source/grid/grid_in.cc
tests/grid/grid_in_vtk_3d_03.output

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.