spectral_galerkin_heat.runner ============================= .. py:module:: spectral_galerkin_heat.runner .. autoapi-nested-parse:: StandaloneHeatRunner: self-contained simulation runner. Owns the time-stepping loop, I/O and telemetry. This is the entry point for running spectral_galerkin_heat from a YAML config file. Classes ------- .. autoapisummary:: spectral_galerkin_heat.runner.StandaloneHeatRunner Functions --------- .. autoapisummary:: spectral_galerkin_heat.runner.initialize_run_logging Module Contents --------------- .. py:function:: initialize_run_logging(config, yaml_path, out_dir) Prepare the run directory for traceability before the simulation starts. Copies the YAML config (and G-code file if present) into *out_dir*, then writes a human-readable ASCII header to ``logs/simulation.log``. The header is written directly to the file so it sits above any timestamped log lines produced by the Python logging handlers. Must be called after the output directory tree has been created by ``LocalFSIOManager.initialize()``. :param config: :type config: Raw YAML config dict as returned by ``load_config()``. :param yaml_path: :type yaml_path: Absolute path to the original YAML configuration file. :param out_dir: :type out_dir: Run output directory (``io_manager.base_dir``). .. py:class:: StandaloneHeatRunner(context, heat_solver, io_manager = None, config = None, yaml_path = None) Orchestrates the full simulation lifecycle in standalone mode. Responsibilities ---------------- * Runs the time-stepping loop (``while t < t_end``). * Delegates periodic / end-of-run output to the ``LocalFSIOManager``. * Prints ETA / telemetry to the logger. :param context: Fully populated simulation parameters. :type context: SimulationContext :param heat_solver: The solver to run; build one with :func:`spectral_galerkin_heat.solvers.build_solver`. :type heat_solver: HeatSolver :param io_manager: Output handler. Defaults to a fresh :class:`LocalFSIOManager`. :type io_manager: LocalFSIOManager, optional .. py:method:: run() Executes the main simulation loop. It initializes the logging mechanism and file outputs, builds the initial state via the solver interface, and proceeds to perform the chronological advancement loop until `t_end` is reached. Final states are serialized before cleanup.