Skip to content
Cory edited this page Jul 6, 2023 · 7 revisions

MachLine is most-easily used with VTK files. The subroutines for reading and writing VTK files are contained in vtk_mod, which is defined in vtk.f90.

Most of the subroutines in this module deal with writing to a VTK. There are subroutines for beginning and ending a VTK file, and subroutines for writing out different data types in between. A good example of these in use can be found in the surface_mesh subroutine surface_mesh_write_body. Note, it is important to write out the data in the following order:

  1. Points/vertices
  2. Panels
  3. Cell data (one piece of information for each panel)
  4. Point data (one piece of information for each vertex)

VTK files are read in to the MachLine data types using load_surface_vtk. Part of reading in a VTK file is calling collapse_duplicate_vertices (defined in stl_mod). This allows for reading in MachLine result files as mesh files, as this subroutine will "zip" wake-shedding edges back together.

load_surface_vtk will call one of two other subroutines based on the VTK file version it detects. This is iffy at best, at the moment. Someone really needs to find a source of consistent documentation for the VTK file formats.

Clone this wiki locally