Open inducer opened 2 years ago
Could implement, per group, as:
res = DOFArray(
dof_array.array_context,
tuple([
actx.np.einsum("ei,i,ei->e",
dof_array.data[i], quad_weights, area_elements.data[i]
).reshape(-1, 1)
for grp, vec_grp_ary, ae_grp_ary in zip(
discr.groups, vec.data, area_elements.data
])
As implemented here:
https://github.com/inducer/grudge/blob/f3d986bb790dcfdfffd6cbeb2ccaff446440315b/grudge/reductions.py#L455-L470
It always falls into the mass-matrix logic, which is valid for nodal-interpolatory grids, but not quadrature grids.
cc @thomasgibson