Add CLI visualization command (./mfc.sh viz)#1233
Merged
sbryngelson merged 105 commits intoMFlowCode:masterfrom Mar 1, 2026
Merged
Add CLI visualization command (./mfc.sh viz)#1233sbryngelson merged 105 commits intoMFlowCode:masterfrom
sbryngelson merged 105 commits intoMFlowCode:masterfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
./mfc.sh viz— a built-in CLI visualization command for rendering post-processed MFC output directly from the terminal. No ParaView or VisIt required.Features
format=2) and Silo-HDF5 (format=1) with automatic detection--interactivelaunches a Dash/Plotly web UI with live controls for slice position, isosurface thresholds, volume rendering, colormap, log scale, vmin/vmax, variable switching, and timestep playback--tuilaunches a fully keyboard-driven terminal UI (works over SSH, no browser/port-forwarding needed) with:spaceautoplay,,/.step navigation,↑/↓variable selectionllog scale toggle,ffreeze color range,ccycle colormap--cmap,--vmin/vmax,--dpi,--log-scale,--slice-axis/value/index,--mp4,--fps--list-stepsand--list-varsto inspect available data before plottingUsage
Architecture
Other changes
VIZ_COMMANDincommands.py, dispatch inmain.py(skips cmake check)toolchain/mfc/viz.py(oldmfc.viz.CaseAPI) and its dependent example scripts (nD_perfect_reactor/analyze.py,nD_perfect_reactor/export.py,1D_reactive_shocktube/viz.py,1D_inert_shocktube/viz.py) removed; superseded by./mfc.sh vizvisualization.md, added quick-start togetting-started.md, viz examples inrunning.md, troubleshooting sectionrequires-python = ">=3.10"added topyproject.toml[project.optional-dependencies] viz— not installed by default, auto-installed on first./mfc.sh vizrunDependencies
imageio+imageio-ffmpegfor portable MP4 encodingh5pyfor Silo-HDF5 readingdash>=2.0+plotlyfor interactive modetextual>=0.47.0+textual-plotext+plotextfor TUI modeCorrectness notes
_step_cacheuses athreading.Lockfor safe concurrent access from Dash callbacks; reads happen before eviction so a failed read never discards a valid cache entry--stepis honoured so users can limit the loaded set for large 3D cases that would otherwise exceed the 50-step memory limitKeyboardInterruptstill triggers temp-dir cleanupTest plan
./mfc.sh viz <1d_case> --var pres --step 0./mfc.sh viz <2d_case> --var pres --step 0:1000:100 --mp4./mfc.sh viz <3d_case> --var pres --step 0 --slice-axis z./mfc.sh viz <silo_case> --var pres --step 0./mfc.sh viz <case> --interactive./mfc.sh viz <case> --tui--list-varsand--list-stepsinfo commands