From 15be154dbe32cec30cbcd1915238c0500cf28fbe Mon Sep 17 00:00:00 2001 From: Kaushik Kulkarni Date: Tue, 21 Jun 2022 20:14:34 -0500 Subject: [PATCH] grudge.models.wave: freeze a vector before thawing it --- grudge/models/wave.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grudge/models/wave.py b/grudge/models/wave.py index ff8ee57e..7ac802b7 100644 --- a/grudge/models/wave.py +++ b/grudge/models/wave.py @@ -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))