Skip to content

Commit

Permalink
CI: modernize the freezes on DOFArrays
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushikcfd committed May 9, 2022
1 parent f4bbf3e commit a430a74
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions test/test_arraycontext.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
ArrayContext,
dataclass_array_container, with_container_arithmetic,
serialize_container, deserialize_container,
freeze, thaw,
freeze, thaw, with_array_context,
FirstAxisIsElementsTag,
PyOpenCLArrayContext,
PytatoPyOpenCLArrayContext,
Expand Down Expand Up @@ -184,12 +184,9 @@ def _raise_index_inconsistency(i, stream_i):
for i, (stream_i, v) in enumerate(iterable)))


@freeze.register(DOFArray)
def _freeze_dofarray(ary, actx=None):
assert actx is None
return type(ary)(
None,
tuple(ary.array_context.freeze(subary) for subary in ary.data))
@with_array_context.register(DOFArray)
def _with_actx_dofarray(ary, actx):
return type(ary)(actx, ary.data)


@thaw.register(DOFArray)
Expand Down

0 comments on commit a430a74

Please sign in to comment.