From 60088e39917d1cf149aca6b0c04330427eed4131 Mon Sep 17 00:00:00 2001 From: Thomas Gibson Date: Tue, 27 Apr 2021 16:18:05 -0500 Subject: [PATCH] Catch QTAG_NONE tags in op.project --- grudge/op.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/grudge/op.py b/grudge/op.py index b3c402ca..d0b5bc2d 100644 --- a/grudge/op.py +++ b/grudge/op.py @@ -62,6 +62,8 @@ from meshmode.dof_array import freeze, flatten, unflatten from grudge.symbolic.primitives import TracePair +from warnings import warn + # def interp(dcoll, src, tgt, vec): # from warnings import warn @@ -82,6 +84,21 @@ def project(dcoll, src, tgt, vec): """ src = dof_desc.as_dofdesc(src) tgt = dof_desc.as_dofdesc(tgt) + + # FIXME: QTAG_NONE hunting + if src.discretization_tag is dof_desc.QTAG_NONE: + warn("`DOFDesc.QTAG_NONE` is deprecated and will be dropped " + "in version 2022.x. Use `DOFDesc.DISCR_TAG_BASE` instead.", + DeprecationWarning, stacklevel=2) + src = src.with_discr_tag(dof_desc.DISCR_TAG_BASE) + + # FIXME: QTAG_NONE hunting + if tgt.discretization_tag is dof_desc.QTAG_NONE: + warn("`DOFDesc.QTAG_NONE` is deprecated and will be dropped " + "in version 2022.x. Use `DOFDesc.DISCR_TAG_BASE` instead.", + DeprecationWarning, stacklevel=2) + tgt = tgt.with_discr_tag(dof_desc.DISCR_TAG_BASE) + if src == tgt: return vec -- GitLab