Skip to content

Feature/vtk variable output precision

  • Allow to write every field and the coordinated in a custom precision
  • Allow VTKFunctions to state precision other than float
  • Allow user to pass precision via the simple addVertex/CellData interfaces
  • Enable passing the precision via the field info into vtk writer
  • Enable changing precision of the coordinate output
  • Add an enum class Precision that determines with which precision a field should be written to VTK file, int32 (std::int32_t), uint8 (std::uint8_t), uint32 (std::uint32_t), float32 (float), float64 (double)
  • Add helper function that converts a precision to a VTK field type string
  • Add helper function that converts a precision to the byte size
  • Decouples VTK types from C++ types
  • Use fixed size C++ integer types to make sure we always have a format conforming VTK file

I measured runtimes for outputs with a single field + coords for 1000 to 10Mio cells, by running 10 consecutive writes in a loop measuring with Dune::Timer, and I couldn't detect any performance penalty.

ToDos:

  • Add entry to changelog
Edited by Timo Koch

Merge request reports

Loading