Skip to content

Commit

Permalink
fix some deprecations in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl authored and inducer committed Jul 16, 2024
1 parent 65fc71c commit f63eccb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/moving-geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def source(t, x):
if __name__ == "__main__":
cl_ctx = cl.create_some_context()
queue = cl.CommandQueue(cl_ctx)
actx = PyOpenCLArrayContext(queue)
actx = PyOpenCLArrayContext(queue, force_device_scalars=True)

from pytools import ProcessTimer
for _ in range(1):
Expand Down
2 changes: 1 addition & 1 deletion examples/plot-connectivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
def main():
cl_ctx = cl.create_some_context()
queue = cl.CommandQueue(cl_ctx)
actx = PyOpenCLArrayContext(queue)
actx = PyOpenCLArrayContext(queue, force_device_scalars=True)

from meshmode.mesh.generation import ( # noqa: F401
generate_icosahedron,
Expand Down
4 changes: 3 additions & 1 deletion examples/simple-dg.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,9 @@ def bump(actx, discr, t=0):
/ source_width**2))


@with_container_arithmetic(bcast_obj_array=True, rel_comparison=True)
@with_container_arithmetic(bcast_obj_array=True,
rel_comparison=True,
_cls_has_array_context_attr=True)
@dataclass_array_container
@dataclass(frozen=True)
class WaveState:
Expand Down

0 comments on commit f63eccb

Please sign in to comment.