Skip to content

Commit

Permalink
add verbose assert
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHls authored Oct 31, 2023
1 parent cfce38d commit 3ac97e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tardis/plasma/properties/nlte_rate_equation_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ def calculate(
),
jac=True,
)
assert solution.success
assert solution.success, (
"No solution for NLTE population equation found or solver takes too long to converge"
)
ion_number_density_nlte[shell] = solution.x[:-1]
electron_densities_nlte[shell] = solution.x[-1]
# TODO: change the jacobian and rate matrix to use shell id and get coefficients from the attribute of the class.
Expand Down

0 comments on commit 3ac97e0

Please sign in to comment.