Skip to content
Snippets Groups Projects
Verified Commit d92caeb2 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Block (without bytecode): avoid silent failures in some corner cases

Either ensure that oo_.determinstic_simulation.status is set, or really error out.

(cherry picked from commit 4da9d1e7)
parent 8dc32f9b
Branches
Tags
No related merge requests found
......@@ -143,6 +143,14 @@ for it_=start:incr:finish
if verbose
disp('The singularity of the jacobian matrix could not be corrected')
end
if is_dynamic
oo_.deterministic_simulation.status = false;
oo_.deterministic_simulation.error = max_res;
oo_.deterministic_simulation.iterations = iter;
oo_.deterministic_simulation.block(Block_Num).status = false;% Convergency failed.
oo_.deterministic_simulation.block(Block_Num).error = max_res;
oo_.deterministic_simulation.block(Block_Num).iterations = iter;
end
info = -Block_Num*10;
return
end
......@@ -275,16 +283,11 @@ for it_=start:incr:finish
end
end
else
if verbose
disp('unknown option : ')
if is_dynamic
disp(['options_.stack_solve_algo = ' num2str(stack_solve_algo) ' not implemented'])
else
disp(['options_.solve_algo = ' num2str(options.solve_algo) ' not implemented'])
end
if is_dynamic
error(['options_.stack_solve_algo = ' num2str(stack_solve_algo) ' not implemented'])
else
error(['options_.solve_algo = ' num2str(options.solve_algo) ' not implemented'])
end
info = -Block_Num*10;
return
end
iter=iter+1;
max_resa = max_res;
......
......@@ -136,6 +136,12 @@ while ~(cvg==1 || iter>maxit_)
continue
else
disp('The singularity of the jacobian matrix could not be corrected');
oo.deterministic_simulation.status = false;
oo.deterministic_simulation.error = max_res;
oo.deterministic_simulation.iterations = iter;
oo.deterministic_simulation.block(Block_Num).status = false;% Convergency failed.
oo.deterministic_simulation.block(Block_Num).error = max_res;
oo.deterministic_simulation.block(Block_Num).iterations = iter;
return
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment