Skip to content

Commit

Permalink
Fix errors of solution not loading if only one UnitOperation was simu…
Browse files Browse the repository at this point in the history
…lated.
  • Loading branch information
ronald-jaepel authored and schmoelder committed Dec 3, 2024
1 parent e381548 commit a4267d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cadet/cadet_dll.py
Original file line number Diff line number Diff line change
Expand Up @@ -1880,10 +1880,10 @@ def load_solution(self, sim: "Cadet") -> addict.Dict:
unit_solution.update(self._load_solution_trivial(sim, unit, 'soldot_flux'))
unit_solution.update(self._load_solution_trivial(sim, unit, 'soldot_volume'))

if len(unit_solution) > 1:
if len(unit_solution) > 0:
solution[unit_index].update(unit_solution)

if len(solution) > 1:
if len(solution) > 0:
sim.root.output.solution.update(solution)

return solution
Expand Down

0 comments on commit a4267d5

Please sign in to comment.