From dcaab6f5eceb4381bee6c555a56090c936c531e9 Mon Sep 17 00:00:00 2001 From: Thomas Gibson Date: Thu, 29 Apr 2021 20:46:05 -0500 Subject: [PATCH] Document DISCR_TAG_QUAD and give example usage --- grudge/dof_desc.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/grudge/dof_desc.py b/grudge/dof_desc.py index 74373eec..dc2995e0 100644 --- a/grudge/dof_desc.py +++ b/grudge/dof_desc.py @@ -115,6 +115,20 @@ class DISCR_TAG_QUAD: # noqa: N801 to distinguish the quadrature discretization (e.g. overintegration) from modal (:class:`DISCR_TAG_MODAL`) or base (:class:`DISCR_TAG_BASE`) discretizations. + + For working with multiple quadrature grids, it is + recommended to create appropriate subclasses of + :class:`DISCR_TAG_QUAD` and define appropriate + :class:`DOFDesc` objects corresponding to each + subclass. For example: + + .. code-block:: python + + class CustomQuadTag(DISCR_TAG_QUAD): + "A custom quadrature discretization tag." + + dd = DOFDesc(DTAG_VOLUME_ALL, CustomQuadTag) + """ @@ -249,7 +263,7 @@ class DOFDesc: FACE_RESTR_INTERIOR]) def uses_quadrature(self): - if self.discretization_tag is DISCR_TAG_QUAD: + if issubclass(self.discretization_tag, DISCR_TAG_QUAD): return True if isinstance(self.discretization_tag, str): return True -- GitLab