Skip to content

Commit

Permalink
convert to DOFDesc
Browse files Browse the repository at this point in the history
  • Loading branch information
majosm committed May 16, 2023
1 parent 018ff2f commit cc7dfc5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mirgecom/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,11 @@ def normalize_boundaries(boundaries):

def project_from_base(dcoll, tgt_dd, field):
"""Project *field* from *DISCR_TAG_BASE* to the same discr. as *tgt_dd*."""
from grudge.dof_desc import DISCR_TAG_BASE
from grudge.dof_desc import DISCR_TAG_BASE, as_dofdesc
from grudge.op import project

tgt_dd = as_dofdesc(tgt_dd)

if tgt_dd.discretization_tag is not DISCR_TAG_BASE:
tgt_dd_base = tgt_dd.with_discr_tag(DISCR_TAG_BASE)
return project(dcoll, tgt_dd_base, tgt_dd, field)
Expand Down

0 comments on commit cc7dfc5

Please sign in to comment.