Skip to content

Commit

Permalink
Write failed solution when restart_failed_analysis is False (#343)
Browse files Browse the repository at this point in the history
* Write failed solution when restart_failed_analysis is False

* Option to specify number of leading zeros in solution filename number (#345)

* New option for digits in solution filename numbering

* Fixed incorrect option name

* Specified solution digits for failed mesh too
  • Loading branch information
eytanadler authored Mar 7, 2024
1 parent de01140 commit 5a8c177
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions adflow/mphys/mphys_adflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,11 @@ def solve_nonlinear(self, inputs, outputs):
print("###############################################################")
print("# Solve Failed, not attempting a clean restart")
print("###############################################################")

# write the solution so that we can diagnose
solver.writeSolution(baseName="analysis_fail", number=self.solution_counter)
self.solution_counter += 1

raise AnalysisError("ADFLOW Solver Fatal Fail")

else:
Expand Down

0 comments on commit 5a8c177

Please sign in to comment.