|
31 | 31 | import pyopencl as cl |
32 | 32 | import pyopencl.tools as cl_tools |
33 | 33 |
|
34 | | -from arraycontext import thaw |
35 | 34 | from grudge.array_context import PyOpenCLArrayContext |
36 | 35 |
|
37 | 36 | from meshmode.dof_array import flatten |
@@ -62,7 +61,7 @@ def __init__(self, actx, dcoll, order, visualize=True): |
62 | 61 | import matplotlib.pyplot as pt |
63 | 62 | self.fig = pt.figure(figsize=(8, 8), dpi=300) |
64 | 63 |
|
65 | | - x = thaw(dcoll.discr_from_dd(dof_desc.DD_VOLUME).nodes(), actx) |
| 64 | + x = actx.thaw(dcoll.discr_from_dd(dof_desc.DD_VOLUME).nodes()) |
66 | 65 | self.x = actx.to_numpy(flatten(actx.np.arctan2(x[1], x[0]))) |
67 | 66 | elif self.ambient_dim == 3: |
68 | 67 | from grudge.shortcuts import make_visualizer |
@@ -174,7 +173,7 @@ def main(ctx_factory, dim=2, order=4, use_quad=False, visualize=False): |
174 | 173 | # {{{ Surface advection operator |
175 | 174 |
|
176 | 175 | # velocity field |
177 | | - x = thaw(dcoll.nodes(), actx) |
| 176 | + x = actx.thaw(dcoll.nodes()) |
178 | 177 | c = make_obj_array([-x[1], x[0], 0.0])[:dim] |
179 | 178 |
|
180 | 179 | def f_initial_condition(x): |
@@ -238,7 +237,7 @@ def rhs(t, u): |
238 | 237 |
|
239 | 238 | df = dof_desc.DOFDesc(FACE_RESTR_INTERIOR) |
240 | 239 | face_discr = dcoll.discr_from_dd(df) |
241 | | - face_normal = thaw(dcoll.normal(dd=df), actx) |
| 240 | + face_normal = actx.thaw(dcoll.normal(dd=df)) |
242 | 241 |
|
243 | 242 | from meshmode.discretization.visualization import make_visualizer |
244 | 243 | vis = make_visualizer(actx, face_discr) |
|
0 commit comments