Skip to content

Commit

Permalink
grudge.models.wave: freeze a vector before thawing it
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushikcfd committed Aug 26, 2022
1 parent beb46a7 commit 15be154
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions grudge/models/wave.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,11 @@ def __init__(self, dcoll, c, source_f=None,

actx = c.array_context
self.dcoll = dcoll
self.c = c
self.c = actx.freeze(c)
self.source_f = source_f

ones = dcoll.zeros(actx) + 1
thawed_c = dcoll._setup_actx.thaw(c)
ones = dcoll.zeros(dcoll._setup_actx) + 1
thawed_c = dcoll._setup_actx.thaw(self.c)
self.sign = dcoll._setup_actx.freeze(
actx.np.where(actx.np.greater(thawed_c, 0), ones, -ones))

Expand Down

0 comments on commit 15be154

Please sign in to comment.