Skip to content

Commit

Permalink
Merge 9ba59e9 into 9195d83
Browse files Browse the repository at this point in the history
  • Loading branch information
hadjimy committed Dec 15, 2014
2 parents 9195d83 + 9ba59e9 commit e7a24c0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 9 additions & 0 deletions src/petclaw/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,3 +307,12 @@ def get_aux_global(self):
aux0Vec.destroy()

return aux0

def __deepcopy__(self,memo={}):
r"""
Calls the pyclaw deepcopy function, but also copies the number of ghost cells
"""
result = super(State,self).__deepcopy__(memo)
result.set_num_ghost(self.q_da.stencil_width)

return result
2 changes: 0 additions & 2 deletions src/pyclaw/sharpclaw/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@ def step(self,solution):
# Use SSP22 method for starting values
import copy
s1 = copy.deepcopy(state)
s1.set_num_ghost(self.num_ghost)

deltaq=self.dq(state)
s1.q = state.q + deltaq
Expand Down Expand Up @@ -424,7 +423,6 @@ def ssp104(self,state):
elif self.time_integrator == 'LMM':
import copy
s1 = copy.deepcopy(state)
s1.set_num_ghost(self.num_ghost)
s2 = copy.deepcopy(s1)

deltaq=self.dq(state)
Expand Down

0 comments on commit e7a24c0

Please sign in to comment.