From 4624c4b3543bb2e5bc99bbea491e219489987449 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Wed, 17 Jun 2020 13:01:05 -0500 Subject: [PATCH] Follow-on fixes for dagrt-fusion example --- examples/dagrt-fusion.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/dagrt-fusion.py b/examples/dagrt-fusion.py index d8b6dcc7..9ab70e2c 100755 --- a/examples/dagrt-fusion.py +++ b/examples/dagrt-fusion.py @@ -1116,21 +1116,23 @@ else: def problem_stats(order=3): cl_ctx = cl.create_some_context() + queue = cl.CommandQueue(cl_ctx) + actx = PyOpenCLArrayContext(queue) with open_output_file("grudge-problem-stats.txt") as outf: _, dg_discr_2d = get_strong_wave_op_with_discr_direct( - cl_ctx, dims=2, order=order) + actx, dims=2, order=order) print("Number of 2D elements:", dg_discr_2d.mesh.nelements, file=outf) vol_discr_2d = dg_discr_2d.discr_from_dd("vol") - dofs_2d = {group.nunit_nodes for group in vol_discr_2d.groups} + dofs_2d = {group.nunit_dofs for group in vol_discr_2d.groups} from pytools import one print("Number of DOFs per 2D element:", one(dofs_2d), file=outf) _, dg_discr_3d = get_strong_wave_op_with_discr_direct( - cl_ctx, dims=3, order=order) + actx, dims=3, order=order) print("Number of 3D elements:", dg_discr_3d.mesh.nelements, file=outf) vol_discr_3d = dg_discr_3d.discr_from_dd("vol") - dofs_3d = {group.nunit_nodes for group in vol_discr_3d.groups} + dofs_3d = {group.nunit_dofs for group in vol_discr_3d.groups} from pytools import one print("Number of DOFs per 3D element:", one(dofs_3d), file=outf) -- GitLab