Skip to content

Commit

Permalink
clean up higher order tstepper comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tlroy committed Dec 5, 2023
1 parent 5d8cbfc commit 38e10bb
Showing 1 changed file with 4 additions and 21 deletions.
25 changes: 4 additions & 21 deletions echemfem/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -2640,27 +2640,10 @@ def setup_forms(self, us, v):
us_old = split(self.u_old)

# Backward Euler
if True:
Form, bcs = self.steady_forms(us, v)
Form_, bcs_ = self.transient_forms(us, v, us_old)
Form += Form_
bcs += bcs_
# Crank-Nicholson would be something like this. Would sometimes need t_old as well
elif False:
Form = 0.0
Form_, bcs = self.steady_forms(us, v)
Form += 0.5 * Form_
Form_, _ = self.steady_forms(us_old, v) # at t=t_old
Form += 0.5 * Form_
Form_, bcs_ = self.transient_forms(us, v, us_old)
Form += Form_
bcs += bcs_
# Implicit midpoint method would be something like this. Would need t+1/2.
elif False:
Form, bcs = self.steady_forms(Form, bcs, (us + us_old)/2, v)
Form_, bcs_ = self.transient_forms(us, v, us_old)
Form += Form_
bcs += bcs_
Form, bcs = self.steady_forms(us, v)
Form_, bcs_ = self.transient_forms(us, v, us_old)
Form += Form_
bcs += bcs_

self.Form = Form
self.bcs = bcs
Expand Down

0 comments on commit 38e10bb

Please sign in to comment.