Fix the output order of VTK cells.
This commit fixes the volume (previously, volumes were off by a factor of -1) of
hexahedra written by GridOut::write_vtk.
Fixing this uncovered a second bug with the way we read in VTK grids - the
vertices were read in as though they were in the UCD format, but VTK uses a
different format where the z = 0 vertices are ordered (using deal.II's
convention) as 0 - 1 - 3 - 2 and the z = 1 vertices are numbered as 4 - 5 - 7 -
6. This had to be fixed in such a way that GridOut composed with GridIn remained
idempotent. Hence, we now correctly renumber each VTK quad and hex to correspond
with the lexical (deal.II 6.0 and newer) nodal numbering.
Fixing this uncovered a (minor) third bug (though its one we talked about at the
workshop in 2019) where GridReordering::invert_all_cells_of_negative_grid
assumes its inputs are still ordered with UCD. To preserve reading of VTK grids
where some cells are flipped that function was updated to understand inputs
numbered lexically.
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