Skip to content

Commit

Permalink
Should not have first guess on first solve
Browse files Browse the repository at this point in the history
  • Loading branch information
atb1995 committed Oct 23, 2024
1 parent 04d7a24 commit b9c6593
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions gusto/time_discretisation/explicit_runge_kutta.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,7 @@ def solve_stage(self, x0, stage):
self.limiter.apply(self.x1)

# Set initial guess for solver
if (stage == 0):
self.x_out.assign(x0)
else:
if (stage > 0):
self.x_out.assign(self.k[stage-1])
self.solver.solve()

Expand Down
4 changes: 1 addition & 3 deletions gusto/time_discretisation/implicit_runge_kutta.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ def solve_stage(self, x0, stage):
self.xnph = self.x1 + self.butcher_matrix[stage, stage]*self.dt*self.x_out
solver = self.solvers[stage]
# Set initial guess for solver
if (stage == 0):
self.x_out.assign(x0)
else:
if (stage > 0):
self.x_out.assign(self.k[stage-1])

solver.solve()
Expand Down

0 comments on commit b9c6593

Please sign in to comment.