Skip to content

Commit

Permalink
Merge pull request #77 from tbody-cfs/fix-unbound-local-in-picard
Browse files Browse the repository at this point in the history
Set an initial value for bndry_change to prevent UnboundLocalError
  • Loading branch information
bendudson committed Dec 14, 2022
2 parents 937c01f + 56827ce commit 5baad4d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions freegs/picard.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ def solve(
# Initial psi_bndry (set low to prevent immediate convergence)
bndry = 0.0

# Set an initial value for bndry_change (set high to prevent immediate convergence)
bndry_change = 10.0

# Plasma assumed to not be limited at first
has_been_limited = False

Expand Down

0 comments on commit 5baad4d

Please sign in to comment.