FluidityProject / fluidity

Fluidity
http://fluidity-project.org
Other
365 stars 115 forks source link

VTK mesh output for quads and hexahedrals is inconsistent #302

Closed gnikit closed 3 years ago

gnikit commented 3 years ago

For some strange reason the renumbering of node connectivity for VTK quads and hexahedrals is separated between VKT_interfaces.F90, vtkfortran.cpp and vtkmeshio.cpp. This leads to generating wrong vtus when creating a quad/hexahedral mesh from within Fluidity and then outputting it.

For example this results into the following bug if one decides to create a quad mesh and output it into a VTU

image

while the output mesh should be looking like this

image

I already have a fix for this and I will open a PR soon, but in general I think that libvtkfortran needs a revision and a refactoring to modernise the code (maybe a job for another time). I will make sure I add a unittest testing as many VTK elements I can.