Skip to content

Commit

Permalink
added docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
RemDelaporteMathurin committed Oct 9, 2023
1 parent f72e22b commit 9035525
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion festim/stepsize.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,16 @@ def adapt(self, t, nb_it, converged):
):
self.value.assign((next_milestone - t))

def next_milestone(self, current_time):
def next_milestone(self, current_time: float):
"""Returns the next milestone that the simulation must pass.
Returns None if there are no more milestones.
Args:
current_time (float): current time.
Returns:
float: next milestone.
"""
if self.milestones is None:
return None
for milestone in self.milestones:
Expand Down

0 comments on commit 9035525

Please sign in to comment.