Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions config.m
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@
config.visualization.plot_tick_x = [-5, 0, 5, 10, 15];
config.visualization.color_axis_range = 1e-0;

% Live visualization (disabled in CI/tests)
config.visualization.live_enable = true; % Show live heatmap during simulation
config.visualization.live_frequency = 10; % Update every N steps
config.visualization.heatmap_nx = 200; % Heatmap grid resolution in x
% ny is inferred from domain aspect ratio to keep pixels square-ish

%% Logging and Debug Parameters
% Master debug switch - set to true to enable all debug features
debug_master = false; % Master switch for all debug features
Expand Down
8 changes: 7 additions & 1 deletion simulate.m
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,12 @@
end
end

% Live max-|V| heatmap every N steps (interactive only)
if doPlot && ~isCI && ~isTest && isfield(cfg.visualization, 'live_enable') && cfg.visualization.live_enable && ...
mod(j, cfg.visualization.live_frequency) == 0
visualization('live_heatmap', cfg, xy1, W(:, j + 1), j, x_min, x_max, y_min, y_max);
end

% Advance simulation time (using current dt, which may have been adapted)
current_time = current_time + dt;
end
Expand Down Expand Up @@ -840,4 +846,4 @@
fprintf('=====================================\n\n');

%% 11) Visualization of final results
visualize_final(cfg, doPlot, xy1, W0, Nt, x_min, x_max, y_min, y_max, Dx, Dy);
visualization('final', cfg, doPlot, xy1, W0, Nt, x_min, x_max, y_min, y_max, Dx, Dy);
Loading