]> https://gitweb.dealii.org/ - dealii.git/commit
Fix the output order of VTK cells. 11784/head
authorDavid Wells <drwells@email.unc.edu>
Fri, 19 Feb 2021 20:46:27 +0000 (15:46 -0500)
committerDavid Wells <drwells@email.unc.edu>
Mon, 8 Mar 2021 20:06:02 +0000 (15:06 -0500)
commit7f9c1023b61b8aa13383af167044cd671f20179a
treeb7647219b9f2eee6a916fb390b5e68901d0e05a0
parentcf205655ed05ef91455895b25702ab3e2a2d6209
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.
19 files changed:
doc/news/changes/incompatibilities/20210220DavidWells [new file with mode: 0644]
include/deal.II/grid/grid_reordering.h
source/grid/grid_in.cc
source/grid/grid_out.cc
source/grid/grid_reordering.cc
tests/grid/get_coarse_mesh_description_01.output
tests/grid/grid_generator_cheese.output
tests/grid/grid_generator_general_cell_01.output
tests/grid/grid_generator_hyper_cross.output
tests/grid/grid_generator_simplex.output
tests/grid/grid_in_exodusii.with_trilinos_with_seacas=on.output
tests/grid/grid_in_vtk_3d.output
tests/grid/grid_in_vtk_3d_02.output
tests/grid/grid_in_vtk_3d_03.output
tests/grid/grid_in_vtk_3d_04.output
tests/grid/grid_out_vtk_01.output
tests/grid/grid_out_vtk_03.output
tests/grid/grid_remove_anisotropy.output
tests/grid/manifold_ids_on_boundary_01.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.