I/O and Visualization

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.

Writers

ModuleOutputUse
vtu.vtu UnstructuredGriddimension-generic mesh with point and cell data
vtp.vtp PolyDatasurface fields and director glyphs
pvd.pvd collectiontime series of frames indexed by simulation time
diagnostics.csvscalar diagnostics per frame
blender.obj and .mddbase mesh and vertex-cache animation
feec_fieldsper-cell arrayscochain reconstruction at cell barycenters
runrun directoryRunWriter orchestrates the writers above

Run Directory

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

Dashboard

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 energy

cartan-viz is a uv package and is not published to crates.io.