cartan-io writes cartan meshes and DEC fields to VTK XML and Blender vertex caches.
It is the bridge from a running solver to ParaView, PyVista, and Blender.
| Module | Output | Use |
|---|---|---|
vtu | .vtu UnstructuredGrid | dimension-generic mesh with point and cell data |
vtp | .vtp PolyData | surface fields and director glyphs |
pvd | .pvd collection | time series of frames indexed by simulation time |
diagnostics | .csv | scalar diagnostics per frame |
blender | .obj and .mdd | base mesh and vertex-cache animation |
feec_fields | per-cell arrays | cochain reconstruction at cell barycenters |
run | run directory | RunWriter orchestrates the writers above |
RunWriter records one simulation frame at a time. Each push_frame writes a .vtu,
appends a diagnostics row, records an MDD frame, and on the first call writes the
Blender base mesh.
use cartan_io::run::RunWriter;
use std::path::Path;
let mut writer = RunWriter::new(Path::new("out/run"))?;
writer.push_frame(time, &complex, &coords, &b, &e, energy, residual)?;
writer.finish()?;The frame layout is:
out/run/
frames.pvd
frame_0000.vtu ...
diagnostics.csv
blender/base.obj
blender/motion.mdd
cartan-viz, a Python package built on PyVista and matplotlib, reads a run directory
and renders a dashboard video: a 3D field view on top and rolling diagnostic plots on
the bottom. Frames are synchronized by simulation time.
cargo run -p cartan-maxwell --example maxwell_record -- out/run
cd cartan-viz && uv run cartan-viz render out/run --quantity energycartan-viz is a uv package and is not published to crates.io.