fix error

This commit is contained in:
kk
2026-03-23 22:50:00 +08:00
parent 03c7a1ab40
commit b92444ef57
10 changed files with 2621 additions and 10 deletions
@@ -130,6 +130,7 @@ while t < tend
if dt >= dtmax(k)
dt = dtmax(k);
end
emit_progress(w, sprintf('Progress: %.4f / %.4f day', t, sum(time)), count, t, dt);
if i ~= Nmax
% waitbar(t / tend);
% disp(t);
@@ -147,7 +148,21 @@ trun.leqs_solve_time=leqs_solve_time;
trun.total_simulation_time = etime(clock,t_start);
trun.Newton_step=Newton_step;
trun.Newtons_vs_time=Newtons_vs_time;
emit_progress(w, 'Calculation completed', count, t, dt);
fprintf('');
% close(h0);
end
function emit_progress(w, message, step, time_value, dt_value)
if ~isfield(w, 'progress_callback') || isempty(w.progress_callback)
return;
end
meta = struct( ...
'step', step, ...
'time', time_value, ...
'dt', dt_value, ...
'status', 'Running...');
feval(w.progress_callback, message, meta);
end