vmec_jax.visualizationΒΆ

Visualization helpers (VTK export, field-line traces).

This module is intentionally dependency-free: it writes a small subset of VTK XML formats in ASCII for easy inspection in ParaView:

  • .vts: VTK XML StructuredGrid (good for (theta,zeta) surfaces)

  • .vtp: VTK XML PolyData (good for field-line polylines)

The functions here are not performance critical; they are meant for examples and debugging. They operate on NumPy arrays (not JAX) on purpose.

Functions

export_vtk_surface_and_fieldline(*, input_path)

Export one surface + a fieldline trace to VTK for ParaView.

write_vtp_polyline(path, *, points[, point_data])

Write a VTK XML PolyData (.vtp) containing a single polyline.

write_vts_structured_grid(path, *, x, y, z)

Write a VTK XML StructuredGrid (.vts) from point coordinates.