fix error
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user