tud_lbm.io.plotting.base

Abstract base class for plot operators.

Classes

PlotOperator

Base class for a single-panel plotting operator.

AnalysisPlot

Base class for analysis plots computed from saved snapshot history.

Module Contents

class tud_lbm.io.plotting.base.PlotOperator(config: tud_lbm.config.SimulationConfig, data_dir: str | pathlib.Path | None = None)[source]

Bases: abc.ABC

Base class for a single-panel plotting operator.

name: str[source]
config[source]
data_dir[source]
abstractmethod __call__(ax: matplotlib.axes.Axes, data: dict[str, numpy.ndarray], timestep: int) None[source]

Draw this operator on the provided axes.

is_available(data: dict[str, numpy.ndarray]) bool[source]

Whether this operator has enough data to render.

class tud_lbm.io.plotting.base.AnalysisPlot(config: tud_lbm.config.SimulationConfig | None = None)[source]

Bases: abc.ABC

Base class for analysis plots computed from saved snapshot history.

name: str[source]
config = None[source]
abstractmethod compute(files: list[pathlib.Path]) dict[str, numpy.ndarray][source]

Compute time-series arrays from snapshot files.

abstractmethod render(ax: matplotlib.axes.Axes, precomputed: dict[str, numpy.ndarray]) None[source]

Render the full analysis plot from precomputed arrays.

update(ax: matplotlib.axes.Axes, files: list[pathlib.Path]) None[source]

Render analysis for a prefix of snapshot files (animation-friendly).