Skip to content

Commit

Permalink
Remove extraneous system slicing in timestepping
Browse files Browse the repository at this point in the history
  • Loading branch information
kburns committed Jul 7, 2023
1 parent 978a129 commit 9091051
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dedalus/core/timesteppers.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def step(self, dt, wall_time):
sp.LHS = (a0*sp.M_min + b0*sp.L_min) @ sp.pre_right # CREATES TEMPORARY
sp.LHS_solver = solver.matsolver(sp.LHS, solver)
# Slice out valid subdata, skipping invalid components
spRHS = RHS.get_subdata(sp)[:sp.LHS.shape[0]]
spRHS = RHS.get_subdata(sp)
spX = sp.LHS_solver.solve(spRHS) # CREATES TEMPORARY
# Make output buffer including invalid components for scatter
spX2 = np.zeros((sp.pre_right.shape[0], len(sp.subsystems)), dtype=spX.dtype) # CREATES TEMPORARY
Expand Down Expand Up @@ -625,7 +625,7 @@ def step(self, dt, wall_time):
sp.LHS = (sp.M_min + (k*H[i,i])*sp.L_min) @ sp.pre_right # CREATES TEMPORARY
sp.LHS_solvers[i] = solver.matsolver(sp.LHS, solver)
# Slice out valid subdata, skipping invalid components
spRHS = RHS.get_subdata(sp)[:sp.LHS.shape[0]]
spRHS = RHS.get_subdata(sp)
spX = sp.LHS_solvers[i].solve(spRHS) # CREATES TEMPORARY
# Make output buffer including invalid components for scatter
spX2 = np.zeros((sp.pre_right.shape[0], len(sp.subsystems)), dtype=spX.dtype) # CREATES TEMPORARY
Expand Down

0 comments on commit 9091051

Please sign in to comment.